summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Feuls2019-02-07 15:23:01 +0100
committerCarsten Feuls2019-02-07 15:23:01 +0100
commit044df48b23cfe407d63ec670006ead11cffa122c (patch)
treed2acfe0021471a10f64a31d041570679ebc8df12
downloadaur-044df48b23cfe407d63ec670006ead11cffa122c.tar.gz
Initialer Commit
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD33
-rw-r--r--thanos6
-rw-r--r--thanos.service18
5 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e2161299154a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+# Generated by mksrcinfo v8
+# Thu Feb 7 14:22:41 UTC 2019
+pkgbase = prometheus-thanos
+ pkgdesc = Highly available Prometheus setup with long term storage capabilities. (binary, not built from source)
+ pkgver = 0.2.1
+ pkgrel = 1
+ url = https://github.com/improbable-eng/thanos
+ arch = x86_64
+ license = Apache
+ backup = etc/conf.d/thanos
+ source_x86_64 = thanos.service
+ source_x86_64 = thanos
+ source_x86_64 = https://github.com/improbable-eng/thanos/releases/download/v0.2.1/thanos-0.2.1.linux-amd64.tar.gz
+ sha256sums_x86_64 = f94f769c2af513e8dac3bfdb07e290e68f770e0b68778326206d49793a98b3ee
+ sha256sums_x86_64 = 248ec0edb4015f795e24f76a8b14d077cca3509b1709c2d28d18530590ecf2d1
+ sha256sums_x86_64 = 5feb8488b81e7869abfd3fa92f92a033f68c627cb8a591f1bcc338fee39833b1
+
+pkgname = prometheus-thanos
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..ac0c1b801919
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*
+!.gitignore
+!PKGBUILD
+!.SRCINFO
+!thanos
+!thanos.service
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2df330f5f451
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+#Submitter: Carsten Feuls <archlinux@carstenfeuls.de>
+
+_pkgname=thanos
+pkgname=prometheus-$_pkgname
+pkgver=0.2.1
+pkgrel=1
+pkgdesc="Highly available Prometheus setup with long term storage capabilities. (binary, not built from source)"
+arch=("x86_64")
+url="https://github.com/improbable-eng/thanos"
+license=("Apache")
+depends=()
+makedepends=()
+backup=("etc/conf.d/thanos")
+
+source_x86_64=("thanos.service"
+ "thanos"
+ "https://github.com/improbable-eng/$_pkgname/releases/download/v$pkgver/$_pkgname-$pkgver.linux-amd64.tar.gz")
+sha256sums_x86_64=('f94f769c2af513e8dac3bfdb07e290e68f770e0b68778326206d49793a98b3ee'
+ '248ec0edb4015f795e24f76a8b14d077cca3509b1709c2d28d18530590ecf2d1'
+ '5feb8488b81e7869abfd3fa92f92a033f68c627cb8a591f1bcc338fee39833b1')
+
+package() {
+ cd "${srcdir}/$_pkgname-$pkgver.linux-amd64"
+
+ # Install Binary
+ install -D -m0755 thanos "${pkgdir}/usr/bin/thanos"
+
+ # Install SystemD Service File
+ install -D -m0644 "${srcdir}/thanos.service" "${pkgdir}/usr/lib/systemd/system/thanos.service"
+
+ # Install thanos config
+ install -D -m644 "${srcdir}/thanos" "${pkgdir}/etc/conf.d/thanos"
+}
diff --git a/thanos b/thanos
new file mode 100644
index 000000000000..7bf1d3590092
--- /dev/null
+++ b/thanos
@@ -0,0 +1,6 @@
+CLUSTER_ARGS="--cluster.address=0.0.0.0:10900 --cluster.network-type=lan"
+
+# Run sidecar on the Prometheus Query Server
+#THANOS_ARGS="sidecar --tsdb.path=/var/lib/prometheus/data"
+# Run Query on the Grafana Node
+#THANOS_ARGS="query"
diff --git a/thanos.service b/thanos.service
new file mode 100644
index 000000000000..c8616b769e14
--- /dev/null
+++ b/thanos.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Thanos for Prometheus
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+User=thanos
+Group=thanos
+Restart=on-failure
+EnvironmentFile=-/etc/conf.d/thanos
+ExecStart=/usr/bin/thanos $THANOS_ARGS $CLUSTER_ARGS
+ExecReload=/bin/kill -HUP $MAINPID
+NoNewPrivileges=true
+ProtectHome=true
+ProtectSystem=strict
+
+[Install]
+WantedBy=multi-user.target