Created
October 26, 2017 16:05
-
-
Save Roadmaster/3f9bee20193e3396cdebc57bede6ee37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env PROMETHEUS=/usr/bin/prometheus | |
env CONFIG=/etc/prometheus/prometheus.yml | |
env USER=prometheus | |
env GROUP=prometheus | |
env DEFAULTS=/etc/default/prometheus | |
env RUNDIR=/var/run/prometheus | |
env PID_FILE=/var/run/prometheus/prometheus.pid | |
pre-start script | |
[ -e $DEFAULTS ] && . $DEFAULTS | |
mkdir -p $RUNDIR || true | |
chmod 0755 $RUNDIR || true | |
chown $USER:$GROUP $RUNDIR || true | |
end script | |
script | |
# read settings like GOMAXPROCS from "/etc/default/prometheus", if available. | |
[ -e $DEFAULTS ] && . $DEFAULTS | |
export GOMAXPROCS=${GOMAXPROCS:-2} | |
exec start-stop-daemon -c $USER -g $GROUP -p $PID_FILE -x $PROMETHEUS -S -- -config.file=$CONFIG \ | |
-storage.local.path=/var/lib/prometheus/metrics \ | |
-web.console.templates=/etc/prometheus/consoles \ | |
-web.console.libraries=/etc/prometheus/console_libraries \ | |
$ARGS | |
end script | |
respawn | |
respawn limit 10 10 | |
kill timeout 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment