summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlashbunny2017-01-28 15:35:31 -0500
committerSlashbunny2017-01-28 15:35:31 -0500
commitf3595be465667b4b92957c0c867e995c04338a2a (patch)
tree80bb1179b65d1b4587f03b382b1834dae7ca7f72
downloadaur-f3595be465667b4b92957c0c867e995c04338a2a.tar.gz
Initial commit
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD35
-rw-r--r--prometheus-haproxy-exporter.confd3
-rw-r--r--prometheus-haproxy-exporter.service10
5 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..70f86526b20
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+# Generated by mksrcinfo v8
+# Sat Jan 28 20:35:16 UTC 2017
+pkgbase = prometheus-haproxy-exporter-bin
+ pkgdesc = Simple server that scrapes HAProxy stats and exports them via HTTP for Prometheus consumption (binary, not built from source)
+ pkgver = 0.7.1
+ pkgrel = 1
+ url = https://github.com/prometheus/haproxy_exporter
+ arch = x86_64
+ license = Apache
+ provides = prometheus-haproxy-exporter
+ conflicts = prometheus-haproxy-exporter
+ backup = etc/conf.d/prometheus-haproxy-exporter
+ source = prometheus-haproxy-exporter.service
+ source = prometheus-haproxy-exporter.confd
+ source = https://github.com/prometheus/haproxy_exporter/releases/download/v0.7.1/haproxy_exporter-0.7.1.linux-amd64.tar.gz
+ sha256sums = 59d6753ca5cff752304a7391de336443cd7394bae6095c5986a07c4e431efe4f
+ sha256sums = 7b363fa314f1ab2630ea5dbc4a888c5b7b2b0472a474a745bd8a55d385e5a568
+ sha256sums = 25426aafa337e717e04af1d0de15ea8848a63342a609019a539df3e937699f1a
+
+pkgname = prometheus-haproxy-exporter-bin
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..ec12590d0aa
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+src/
+pkg/
+*.pkg.tar.xz
+*.pkg.tar
+*.src.tar.gz
+haproxy_exporter-*.linux-amd64.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..8c5058f3450
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Slashbunny <demodevil5[at]yahoo>
+
+pkgname=prometheus-haproxy-exporter-bin
+pkgver=0.7.1
+pkgrel=1
+pkgdesc="Simple server that scrapes HAProxy stats and exports them via HTTP for Prometheus consumption (binary, not built from source)"
+arch=('x86_64')
+url="https://github.com/prometheus/haproxy_exporter"
+license=('Apache')
+depends=()
+makedepends=()
+backup=('etc/conf.d/prometheus-haproxy-exporter')
+provides=('prometheus-haproxy-exporter')
+conflicts=('prometheus-haproxy-exporter')
+source=( 'prometheus-haproxy-exporter.service' 'prometheus-haproxy-exporter.confd'
+"https://github.com/prometheus/haproxy_exporter/releases/download/v${pkgver}/haproxy_exporter-${pkgver}.linux-amd64.tar.gz")
+sha256sums=('59d6753ca5cff752304a7391de336443cd7394bae6095c5986a07c4e431efe4f'
+ '7b363fa314f1ab2630ea5dbc4a888c5b7b2b0472a474a745bd8a55d385e5a568'
+ '25426aafa337e717e04af1d0de15ea8848a63342a609019a539df3e937699f1a')
+
+package() {
+ cd "${srcdir}/haproxy_exporter-${pkgver}.linux-amd64"
+
+ # Install Binary
+ install -D -m0755 haproxy_exporter \
+ "${pkgdir}/usr/bin/prometheus_haproxy_exporter"
+
+ # Install Daemon Configuration
+ install -D -m0644 "${srcdir}/prometheus-haproxy-exporter.confd" \
+ "${pkgdir}/etc/conf.d/prometheus-haproxy-exporter"
+
+ # Install SystemD Service File
+ install -D -m0755 "${srcdir}/prometheus-haproxy-exporter.service" \
+ "${pkgdir}/usr/lib/systemd/system/prometheus-haproxy-exporter.service"
+}
diff --git a/prometheus-haproxy-exporter.confd b/prometheus-haproxy-exporter.confd
new file mode 100644
index 00000000000..66481ebf622
--- /dev/null
+++ b/prometheus-haproxy-exporter.confd
@@ -0,0 +1,3 @@
+# You can specify additional daemon options here
+DAEMON_OPTIONS=""
+
diff --git a/prometheus-haproxy-exporter.service b/prometheus-haproxy-exporter.service
new file mode 100644
index 00000000000..a4882ac8bf8
--- /dev/null
+++ b/prometheus-haproxy-exporter.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Prometheus HAProxy Exporter
+After=network.target
+
+[Service]
+EnvironmentFile=/etc/conf.d/prometheus-haproxy-exporter
+ExecStart=/usr/bin/prometheus_haproxy_exporter ${DAEMON_OPTIONS}
+
+[Install]
+WantedBy=multi-user.target