ansible-roles/prometheus/files/prometheus.upstart

20 lines
540 B
Plaintext
Raw Normal View History

2018-01-10 17:44:57 +01:00
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