summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD26
-rw-r--r--prometheus-systemd-exporter.service14
4 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fe81ac457714
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = prometheus-systemd-exporter
+ pkgdesc = Prometheus exporter for systemd units, written in Go.
+ pkgver = 0.4.0
+ pkgrel = 0
+ url = https://github.com/povilasv/systemd_exporter
+ arch = x86_64
+ license = Apache
+ source = prometheus-systemd-exporter-0.4.0.tar.gz::https://github.com/povilasv/systemd_exporter/releases/download/v0.4.0/systemd_exporter-0.4.0.linux-amd64.tar.gz
+ source = prometheus-systemd-exporter.service
+ sha256sums = e417e279c55789e7c0bd6dc68643ae164dc819425116e84c8a7e0c5a316cae03
+ sha256sums = c821d8a3a93241c6ee9b2dd8d3cc0ab0c3e6e23159bed7dc43ca7b84a9b8119b
+
+pkgname = prometheus-systemd-exporter
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b20752a93bec
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.tar.gz
+*.tar.xz
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e5cde1ba17d8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Matthias Loibl <mail@matthiasloibl.com>
+
+pkgname=prometheus-systemd-exporter
+pkgver=0.4.0
+pkgrel=0
+
+pkgdesc='Prometheus exporter for systemd units, written in Go.'
+url='https://github.com/povilasv/systemd_exporter'
+arch=('x86_64')
+license=('Apache')
+
+source=("$pkgname-$pkgver.tar.gz::https://github.com/povilasv/systemd_exporter/releases/download/v$pkgver/systemd_exporter-$pkgver.linux-amd64.tar.gz"
+ prometheus-systemd-exporter.service
+)
+
+sha256sums=(
+ 'e417e279c55789e7c0bd6dc68643ae164dc819425116e84c8a7e0c5a316cae03'
+ 'c821d8a3a93241c6ee9b2dd8d3cc0ab0c3e6e23159bed7dc43ca7b84a9b8119b'
+)
+
+package () {
+ install -Dm644 prometheus-systemd-exporter.service "$pkgdir"/usr/lib/systemd/system/prometheus-systemd-exporter.service
+
+ cd "$srcdir"/systemd_exporter-$pkgver.linux-amd64
+ install -Dm755 systemd_exporter "$pkgdir"/usr/bin/$pkgname
+}
diff --git a/prometheus-systemd-exporter.service b/prometheus-systemd-exporter.service
new file mode 100644
index 000000000000..f5df7ec87833
--- /dev/null
+++ b/prometheus-systemd-exporter.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Prometheus exporter for systemd units, written in Go.
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+Restart=on-failure
+ExecStart=/usr/bin/prometheus-systemd-exporter --web.listen-address=127.0.0.1:9558
+NoNewPrivileges=true
+ProtectHome=read-only
+ProtectSystem=strict
+
+[Install]
+WantedBy=multi-user.target