From 7564038f045722367809e393d1d59169790fb083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamila=20Sou=C4=8Dkov=C3=A1?= Date: Sat, 2 Sep 2017 21:22:33 +0200 Subject: [PATCH] fixes to __prometheus_{server,alertmanager} (#565) --- cdist/conf/type/__prometheus_alertmanager/manifest | 11 ++++++----- cdist/conf/type/__prometheus_server/manifest | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cdist/conf/type/__prometheus_alertmanager/manifest b/cdist/conf/type/__prometheus_alertmanager/manifest index 555ab1a1..0dbce3c2 100755 --- a/cdist/conf/type/__prometheus_alertmanager/manifest +++ b/cdist/conf/type/__prometheus_alertmanager/manifest @@ -21,13 +21,14 @@ REAL_FLAGS="$(echo "$FLAGS" | sed -nE 's/^([^#]+).*/ --\1 \\/p')" __go_get github.com/prometheus/alertmanager/cmd/... __user prometheus --system -require="__user/prometheus" __directory "$storage_path" --owner prometheus -require="__user/prometheus" __directory "$CONF_DIR" --owner prometheus +require="__user/prometheus" __directory "$storage_path" --owner prometheus --parents +require="__user/prometheus" __directory "$CONF_DIR" --owner prometheus --parents __daemontools_service alertmanager --run "setuidgid prometheus $GOBIN/alertmanager $REAL_FLAGS" require="$require __directory/$storage_path __user/prometheus" \ __config_file $CONF \ - --source $config \ - --group prometheus --mode 640 \ - --onchange "$ONCHANGE" + --source $config \ + --group prometheus --mode 640 \ + --onchange "svc -h /service/alertmanager" # TODO when a config-check tool is available, check config here + diff --git a/cdist/conf/type/__prometheus_server/manifest b/cdist/conf/type/__prometheus_server/manifest index dee81bc2..96717ed6 100755 --- a/cdist/conf/type/__prometheus_server/manifest +++ b/cdist/conf/type/__prometheus_server/manifest @@ -30,8 +30,8 @@ REAL_FLAGS="$(echo "$FLAGS" | sed -nE 's/^([^#]+).*/ --\1 \\/p')" __go_get github.com/prometheus/prometheus/cmd/... __user prometheus --system -require="__user/prometheus" __directory "$storage_path" --owner prometheus -require="__user/prometheus" __directory "$CONF_DIR" --owner prometheus +require="__user/prometheus" __directory "$storage_path" --owner prometheus --parents +require="__user/prometheus" __directory "$CONF_DIR" --owner prometheus --parents __daemontools_service prometheus --run "setuidgid prometheus $GOBIN/prometheus $REAL_FLAGS"