__prometheus_{server,alertmanager}: restart when cli parameters change
This commit is contained in:
parent
e63c3429da
commit
f03a0e586e
2 changed files with 9 additions and 3 deletions
|
@ -42,14 +42,18 @@ require="$require $require_pkg" __directory "$storage_path" --owner prometheus -
|
||||||
|
|
||||||
# TODO this is a bug in the init script, patching it like this is awful and it should be reported
|
# TODO this is a bug in the init script, patching it like this is awful and it should be reported
|
||||||
require="$require $require_pkg" \
|
require="$require $require_pkg" \
|
||||||
__key_value alertmanager_fix_init_script --file /etc/init.d/prometheus-alertmanager --key="NAME" --value="prometheus-alertmanager" --delimiter "="
|
__key_value alertmanager_fix_init_script --file /etc/init.d/prometheus-alertmanager \
|
||||||
|
--key "NAME" --value "prometheus-alertmanager" --delimiter "=" \
|
||||||
|
--onchange "service prometheus-alertmanager restart"
|
||||||
|
|
||||||
##### CONFIGURE #############################################################
|
##### CONFIGURE #############################################################
|
||||||
|
|
||||||
FLAGS="--storage.path $storage_path --data.retention $(($retention_days*24))h --web.listen-address [::]:9093"
|
FLAGS="--storage.path $storage_path --data.retention $(($retention_days*24))h --web.listen-address [::]:9093"
|
||||||
|
|
||||||
require="$require $require_pkg" \
|
require="$require $require_pkg" \
|
||||||
__key_value alertmanager_args --file /etc/default/prometheus-alertmanager --key="ARGS" --value="\"$FLAGS\"" --delimiter "="
|
__key_value alertmanager_args --file /etc/default/prometheus-alertmanager \
|
||||||
|
--key "ARGS" --value "\"$FLAGS\"" --delimiter "=" \
|
||||||
|
--onchange "service prometheus-alertmanager restart"
|
||||||
|
|
||||||
require="$require __directory/$storage_path $require_pkg" \
|
require="$require __directory/$storage_path $require_pkg" \
|
||||||
__config_file $CONF \
|
__config_file $CONF \
|
||||||
|
|
|
@ -49,7 +49,9 @@ FLAGS="--storage.tsdb.path $storage_path --storage.tsdb.retention $(($retention_
|
||||||
|
|
||||||
# TODO it would be neat to restart prometheus on change -- __key_value really should have an --onchange parameter
|
# TODO it would be neat to restart prometheus on change -- __key_value really should have an --onchange parameter
|
||||||
require="$require $require_pkg" \
|
require="$require $require_pkg" \
|
||||||
__key_value prometheus_args --file /etc/default/prometheus --key "ARGS" --value "\"$FLAGS\"" --delimiter "="
|
__key_value prometheus_args --file /etc/default/prometheus \
|
||||||
|
--key "ARGS" --value "\"$FLAGS\"" --delimiter "=" \
|
||||||
|
--onchange "service prometheus restart"
|
||||||
|
|
||||||
require="$require __directory/$storage_path $require_pkg" \
|
require="$require __directory/$storage_path $require_pkg" \
|
||||||
__config_file $CONF \
|
__config_file $CONF \
|
||||||
|
|
Loading…
Reference in a new issue