prometheus: add a new variable to add arbitrary options to the command line.
This commit is contained in:
parent
ea729161be
commit
b2ae79e61f
|
@ -11,3 +11,4 @@ prometheus_confdir: '/opt/prometheus/conf'
|
|||
prometheus_cmd: '{{ prometheus_dist_dir }}/{{ prometheus_dir }}/prometheus'
|
||||
prometheus_loglevel: info
|
||||
prometheus_http_port: 9090
|
||||
prometheus_opts: '--storage.tsdb.retention=120d'
|
||||
|
|
|
@ -15,6 +15,7 @@ script
|
|||
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
|
||||
export PROMETHEUS_OPTS
|
||||
exec $PROMETHEUS_CMD --config.file=$PROMETHEUS_CONF --storage.tsdb.path="$PROMETHEUS_DATADIR" --log.level=$PROMETHEUS_LOGLEVEL $PROMETHEUS_OPTS > $PROMETHEUS_LOGDIR/prometheus.log 2>&1
|
||||
end script
|
||||
|
|
@ -4,5 +4,6 @@ PROMETHEUS_LOGDIR={{ prometheus_home }}/logs
|
|||
PROMETHEUS_DATADIR={{ prometheus_home }}/data
|
||||
PROMETHEUS_LOGLEVEL={{ prometheus_loglevel }}
|
||||
PROMETHEUS_CONF={{ prometheus_confdir }}/prometheus.yml
|
||||
PROMETHEUS_OPTS="{{ prometheus_opts }}"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue