summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Feuls2019-02-15 15:40:33 +0100
committerCarsten Feuls2019-02-15 15:40:33 +0100
commit504a0f8d5cab2a1dfbb1c684ccd9a6cf7d7d2dd3 (patch)
treedb4a2a1b9861f10c7919eb010232976ba26a5e04
parent04830907a7aac633f58011fc2b30a4dd4331481b (diff)
downloadaur-504a0f8d5cab2a1dfbb1c684ccd9a6cf7d7d2dd3.tar.gz
Add downsample and change config from sidecar
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD23
-rw-r--r--thanos-downsample.conf24
-rw-r--r--thanos-downsample.service23
-rw-r--r--thanos-sidecar.conf2
-rw-r--r--thanos-sidecar.service4
6 files changed, 78 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b663e7e2cc72..1e083be22a5a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,39 +1,47 @@
# Generated by mksrcinfo v8
-# Thu Feb 14 15:18:52 UTC 2019
+# Fri Feb 15 14:39:53 UTC 2019
pkgbase = prometheus-thanos
pkgdesc = Highly available Prometheus setup with long term storage capabilities. (binary, not built from source)
pkgver = 0.3.0
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/improbable-eng/thanos
arch = x86_64
license = Apache
+ optdepends = prometheus: To Store the data with thanos sidecar
+ optdepends = grafana: To display the Resulst von thanos Query
+ optdepends = minio: To Provide S3 Storage for sidecar and store
backup = etc/thanos/sidecar.conf
backup = etc/thanos/store.conf
backup = etc/thanos/query.conf
backup = etc/thanos/rule.conf
backup = etc/thanos/compact.conf
+ backup = etc/thanos/downsample.conf
source_x86_64 = thanos-sidecar.service
source_x86_64 = thanos-store.service
source_x86_64 = thanos-query.service
source_x86_64 = thanos-rule.service
source_x86_64 = thanos-compact.service
+ source_x86_64 = thanos-downsample.service
source_x86_64 = thanos-sidecar.conf
source_x86_64 = thanos-store.conf
source_x86_64 = thanos-query.conf
source_x86_64 = thanos-rule.conf
source_x86_64 = thanos-compact.conf
+ source_x86_64 = thanos-downsample.conf
source_x86_64 = thanos.sysuser
source_x86_64 = https://github.com/improbable-eng/thanos/releases/download/v0.3.0/thanos-0.3.0.linux-amd64.tar.gz
- sha256sums_x86_64 = b1b266f51d558b9ca6c9b726c697c72a91e6979ac841b4f5991ae17cd35ad2f2
+ sha256sums_x86_64 = c5d8fe78aae3e3c5e32790e5a4e8f1ff4d4ac8e608926bf735a7e22a23a4531a
sha256sums_x86_64 = b48a1cdd78c56e010655a015bd89a06ae8b8ba9043aba7a518a9254a735b8f5d
sha256sums_x86_64 = f14e3dab682a4e2777ed4c02da1d2be677327f166588767047aa10e853f7d928
sha256sums_x86_64 = 0e8b5a5be042c6bdb1f279bd835720007d13ea7624592aab0703fc1b8c871b75
sha256sums_x86_64 = 03b829963a127cd8d65cd3da331a36cd8309517baad46aaed411ac16adb7f3f7
- sha256sums_x86_64 = ee773959c8a399ebef04c55bdef28767e3fe9618216515a9070489e587969721
+ sha256sums_x86_64 = 542f8cba235ac7a1d33b8a36eba4a39e152b0777a507b81edc0fe4c68b9357c8
+ sha256sums_x86_64 = 2bcd2bdb25490982ef5ce6886836ece58f591c3bd4505655cb8babb374a5052b
sha256sums_x86_64 = 5213e5e7187acddb5c2199782fdd0ca85aad93c221162c020c1cea1607b12a0c
sha256sums_x86_64 = 29b5dc83449240ecd9554cead75196e4e4843da3b2ce62db66c9bac04c847027
sha256sums_x86_64 = f9eca0f9a2751255af2a1f3b992cd8a168851a296e0466c7c4a47ec804f46f74
sha256sums_x86_64 = 572baa54d9191e7a26865efde62b9170cea41fdc5c94131ae2089b4b3961d3ab
+ sha256sums_x86_64 = 3ec0605d3b8d2286f05c7ebfafcae87cf191caf65405e74b38f5e880cbdf08cd
sha256sums_x86_64 = 0d2ee33fa0a91ea2a93c652fdcc8d50f2b69a3598bc6819f14c57239ce3fcc82
sha256sums_x86_64 = fe1cb7ed940dac645309bbf0ce99c278ded8727a6cab9842bd9f572d205f60a6
diff --git a/PKGBUILD b/PKGBUILD
index 776c48cace32..f8b2bbbb00d6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,41 +3,50 @@
_pkgname=thanos
pkgname=prometheus-$_pkgname
pkgver=0.3.0
-pkgrel=2
+pkgrel=3
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=()
+optdepends=('prometheus: To Store the data with thanos sidecar'
+ 'grafana: To display the Resulst von thanos Query'
+ 'minio: To Provide S3 Storage for sidecar and store')
backup=("etc/thanos/sidecar.conf"
"etc/thanos/store.conf"
"etc/thanos/query.conf"
"etc/thanos/rule.conf"
- "etc/thanos/compact.conf")
+ "etc/thanos/compact.conf"
+ "etc/thanos/downsample.conf")
source_x86_64=("thanos-sidecar.service"
"thanos-store.service"
"thanos-query.service"
"thanos-rule.service"
"thanos-compact.service"
+ "thanos-downsample.service"
"thanos-sidecar.conf"
"thanos-store.conf"
"thanos-query.conf"
"thanos-rule.conf"
"thanos-compact.conf"
+ "thanos-downsample.conf"
"thanos.sysuser"
"https://github.com/improbable-eng/$_pkgname/releases/download/v$pkgver/$_pkgname-$pkgver.linux-amd64.tar.gz")
-sha256sums_x86_64=('b1b266f51d558b9ca6c9b726c697c72a91e6979ac841b4f5991ae17cd35ad2f2'
+
+sha256sums_x86_64=('c5d8fe78aae3e3c5e32790e5a4e8f1ff4d4ac8e608926bf735a7e22a23a4531a'
'b48a1cdd78c56e010655a015bd89a06ae8b8ba9043aba7a518a9254a735b8f5d'
'f14e3dab682a4e2777ed4c02da1d2be677327f166588767047aa10e853f7d928'
'0e8b5a5be042c6bdb1f279bd835720007d13ea7624592aab0703fc1b8c871b75'
'03b829963a127cd8d65cd3da331a36cd8309517baad46aaed411ac16adb7f3f7'
- 'ee773959c8a399ebef04c55bdef28767e3fe9618216515a9070489e587969721'
+ '542f8cba235ac7a1d33b8a36eba4a39e152b0777a507b81edc0fe4c68b9357c8'
+ '2bcd2bdb25490982ef5ce6886836ece58f591c3bd4505655cb8babb374a5052b'
'5213e5e7187acddb5c2199782fdd0ca85aad93c221162c020c1cea1607b12a0c'
'29b5dc83449240ecd9554cead75196e4e4843da3b2ce62db66c9bac04c847027'
'f9eca0f9a2751255af2a1f3b992cd8a168851a296e0466c7c4a47ec804f46f74'
'572baa54d9191e7a26865efde62b9170cea41fdc5c94131ae2089b4b3961d3ab'
+ '3ec0605d3b8d2286f05c7ebfafcae87cf191caf65405e74b38f5e880cbdf08cd'
'0d2ee33fa0a91ea2a93c652fdcc8d50f2b69a3598bc6819f14c57239ce3fcc82'
'fe1cb7ed940dac645309bbf0ce99c278ded8727a6cab9842bd9f572d205f60a6')
@@ -53,15 +62,14 @@ package() {
install -D -m0644 "${srcdir}/thanos-query.service" "${pkgdir}/usr/lib/systemd/system/thanos-query.service"
install -D -m0644 "${srcdir}/thanos-rule.service" "${pkgdir}/usr/lib/systemd/system/thanos-rule.service"
install -D -m0644 "${srcdir}/thanos-compact.service" "${pkgdir}/usr/lib/systemd/system/thanos-compact.service"
+ install -D -m0644 "${srcdir}/thanos-downsample.service" "${pkgdir}/usr/lib/systemd/system/thanos-downsample.service"
install -D -m0644 "${srcdir}/thanos.sysuser" "${pkgdir}/usr/lib/sysusers.d/thanos.conf"
install -d -m0755 -o212 -g212 "${pkgdir}/etc/thanos/"
install -d -m0755 -o212 -g212 "${pkgdir}/etc/thanos/rules/"
install -d -m0755 -o212 -g212 "${pkgdir}/var/lib/thanos/compact/"
install -d -m0755 -o212 -g212 "${pkgdir}/var/lib/thanos/rule/"
- install -d -m0755 -o212 -g212 "${pkgdir}/var/lib/thanos/sidecar/"
- install -d -m0755 -o212 -g212 "${pkgdir}/var/lib/thanos/sidecar/upload"
- ln -s "/var/lib/prometheus/data/wal" "${pkgdir}/var/lib/thanos/sidecar/wal"
+ install -d -m0755 -o212 -g212 "${pkgdir}/var/lib/thanos/downsample/"
# Install thanos config
@@ -70,4 +78,5 @@ package() {
install -D -m644 -o212 -g212 "${srcdir}/thanos-query.conf" "${pkgdir}/etc/thanos/query.conf"
install -D -m644 -o212 -g212 "${srcdir}/thanos-rule.conf" "${pkgdir}/etc/thanos/rule.conf"
install -D -m644 -o212 -g212 "${srcdir}/thanos-compact.conf" "${pkgdir}/etc/thanos/compact.conf"
+ install -D -m644 -o212 -g212 "${srcdir}/thanos-downsample.conf" "${pkgdir}/etc/thanos/downsample.conf"
}
diff --git a/thanos-downsample.conf b/thanos-downsample.conf
new file mode 100644
index 000000000000..c4f4c67a5c4a
--- /dev/null
+++ b/thanos-downsample.conf
@@ -0,0 +1,24 @@
+# Log filtering level.
+LOG_LEVEL="--log.level=info"
+
+# Log format to use.
+LOG_FORMAT="--log.format=logfmt"
+
+# GCP project to send Google Cloud Trace tracings to.
+# If empty, tracing will be disabled.
+#GCLOUDTRACE_PROJECT="--gcloudtrace.project=GCLOUDTRACE.PROJECT"
+
+# How often we send traces (1/<sample-factor>).
+# If 0 no trace will be sent periodically, unless forced by baggage item.
+# See `pkg/tracing/tracing.go` for details.
+#GCLOUDTRACE_SAMPLE="--gcloudtrace.sample-factor=1"
+
+# Data directory in which to cache blocks and process downsamplings.
+DATA_DIR="--data-dir=/var/lib/thanos/downsample/"
+
+# Path to YAML file that contains object store configuration.
+#OBJSTORE_CONFIG_FILE="--objstore.config-file=<bucket.config-yaml-path>"
+
+# Alternative to 'objstore.config-file' flag.
+# Object store configuration in YAML.
+#OBJSTORE_CONFIG="--objstore.config=<bucket.config-yaml>"
diff --git a/thanos-downsample.service b/thanos-downsample.service
new file mode 100644
index 000000000000..bb5b62439c70
--- /dev/null
+++ b/thanos-downsample.service
@@ -0,0 +1,23 @@
+[Unit]
+Description=Thanos Downsample continuously downsamples blocks in an object store bucket.
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+User=thanos
+Group=thanos
+Restart=on-failure
+EnvironmentFile=-/etc/thanos/downsample.conf
+ExecStart=/usr/bin/thanos downsample \
+ $LOG_LEVEL \
+ $LOG_FORMAT \
+ $GCLOUDTRACE_PROJECT \
+ $GCLOUDTRACE_SAMPLE \
+ $DATA_DIR \
+ $OBJSTORE_CONFIG_FILE \
+ $OBJSTORE_CONFIG
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/thanos-sidecar.conf b/thanos-sidecar.conf
index 0a0c23374c9b..7e07b7f943dd 100644
--- a/thanos-sidecar.conf
+++ b/thanos-sidecar.conf
@@ -77,7 +77,7 @@ CLUSTER_NETWORK_TYPE="--cluster.network-type=lan"
#PROMETHEUS_URL="--prometheus.url=http://localhost:9090"
# Data directory of TSDB.
-TSDB_PATH="--tsdb.path=/var/lib/thanos/data"
+TSDB_PATH="--tsdb.path=/var/lib/prometheus/data"
# Config file watched by the reloader.
#RELOADER_CONFIG="--reloader.config-file="
diff --git a/thanos-sidecar.service b/thanos-sidecar.service
index 65af216d63d5..c85ac77cad3a 100644
--- a/thanos-sidecar.service
+++ b/thanos-sidecar.service
@@ -4,8 +4,8 @@ Requires=network-online.target
After=network-online.target
[Service]
-User=thanos
-Group=thanos
+User=prometheus
+Group=prometheus
Restart=on-failure
EnvironmentFile=-/etc/thanos/sidecar.conf
ExecStart=/usr/bin/thanos sidecar \