From 6c8e287001eadce31066b90d9c5aab8d8789d15c Mon Sep 17 00:00:00 2001 From: Kamila Souckova Date: Sat, 2 Sep 2017 11:51:28 +0200 Subject: [PATCH] fixes to __prometheus_{server,alertmanager} --- 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"