From 7c987513f10767901a1f832a9626e90d3c2958d8 Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Fri, 4 Oct 2019 17:58:18 +0500 Subject: [PATCH] a --- cdist/conf/type/__prometheus_alertmanager/manifest | 3 ++- cdist/conf/type/__prometheus_server/manifest | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cdist/conf/type/__prometheus_alertmanager/manifest b/cdist/conf/type/__prometheus_alertmanager/manifest index 8ee818c3..cf410c44 100755 --- a/cdist/conf/type/__prometheus_alertmanager/manifest +++ b/cdist/conf/type/__prometheus_alertmanager/manifest @@ -30,6 +30,7 @@ if [ -f "$__object/parameter/install-from-backports" ]; then *) echo "--install-from-backports is only supported on Devuan -- ignoring." >&2 echo "Send a pull request if you require it." >&2 + exit 1 ;; esac else @@ -60,5 +61,5 @@ require="$require __directory/$storage_path $require_pkg" \ __config_file $CONF \ --source "$config" \ --group prometheus --mode 640 \ - --onchange "service prometheus-alertmanager reload" # TODO when a config-check tool is available, check config here + --onchange "service prometheus-alertmanager restart" # 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 8685130f..9756169e 100755 --- a/cdist/conf/type/__prometheus_server/manifest +++ b/cdist/conf/type/__prometheus_server/manifest @@ -33,11 +33,13 @@ if [ -f "$__object/parameter/install-from-backports" ]; then *) echo "--install-from-backports is only supported on Devuan -- ignoring." >&2 echo "Send a pull request if you require it." >&2 + exit 1 ;; esac else __package prometheus - require_pkg="__package/prometheus" + __package prometheus-blackbox-exporter + require_pkg="__package/prometheus __package/prometheus-blackbox-exporter" fi ##### PREPARE PATHS AND SUCH ################################################ @@ -58,7 +60,7 @@ require="$require __directory/$storage_path $require_pkg" \ __config_file $CONF \ --source "$config" \ --group prometheus --mode 640 \ - --onchange "promtool check config $CONF && service prometheus reload" + --onchange "promtool check config $CONF && service prometheus restart" for file in $rule_files; do dest=$CONF_DIR/$(basename "$file") @@ -66,6 +68,6 @@ for file in $rule_files; do __config_file "$dest" \ --source "$file" \ --owner prometheus \ - --onchange "promtool check rules '$dest' && service prometheus reload" + --onchange "promtool check rules '$dest' && service prometheus restart" done