forked from ISTI-ansible-roles/ansible-roles
20 lines
540 B
Plaintext
20 lines
540 B
Plaintext
|
description "Prometheus"
|
||
|
start on (local-filesystems and net-device-up IFACE!=lo)
|
||
|
stop on runlevel [016]
|
||
|
|
||
|
respawn
|
||
|
respawn limit 10 5
|
||
|
setuid prometheus
|
||
|
setgid prometheus
|
||
|
|
||
|
script
|
||
|
. /etc/default/prometheus
|
||
|
export GOMAXPROCS
|
||
|
export PROMETHEUS_CMD
|
||
|
export PROMETHEUS_LOGDIR
|
||
|
export PROMETHEUS_DATADIR
|
||
|
export PROMETHEUS_LOGLEVEL
|
||
|
export PROMETHEUS_CONF
|
||
|
exec $PROMETHEUS_CMD --config.file=$PROMETHEUS_CONF --storage.tsdb.path="$PROMETHEUS_DATADIR" --log.level=$PROMETHEUS_LOGLEVEL > $PROMETHEUS_LOGDIR/prometheus.log 2>&1
|
||
|
end script
|
||
|
|