node_exporter: fix runit collector by default
This commit is contained in:
parent
26ce644e2c
commit
b7112ea6c7
2 changed files with 7 additions and 4 deletions
|
@ -3,8 +3,11 @@
|
|||
# Add $ARGS for more arguments to node_exporter
|
||||
[ -f ./conf ] && . ./conf
|
||||
|
||||
: ${USER:=_node_exporter}
|
||||
: ${RUNIT_COLLECTOR:='--collector.runit --collector.runit.servicedir /var/service'}
|
||||
[ -n "$LISTEN_ADDR" ] && LISTEN_ADDR="--web.listen-address ${LISTEN_ADDR}"
|
||||
[ -n "${LISTEN_ADDR}" ] && LISTEN_ADDR="--web.listen-address ${LISTEN_ADDR}"
|
||||
|
||||
exec chpst -u $USER node_exporter ${RUNIT_COLLECTOR} ${LISTEN_ADDR} ${ARGS}
|
||||
# Not by default since the runit collector needs root, no magic group for runit access.
|
||||
[ -n "${USE_LOCAL_USER}" ] && : ${USER:=_node_exporter}
|
||||
[ -n "${USER}" ] && CHPST_USER="-u ${USER}"
|
||||
|
||||
exec chpst $CHPST_USER node_exporter ${RUNIT_COLLECTOR} ${LISTEN_ADDR} ${ARGS}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'node_exporter'
|
||||
pkgname=node_exporter
|
||||
version=0.15.2
|
||||
revision=2
|
||||
revision=3
|
||||
build_style=go
|
||||
go_import_path="github.com/prometheus/node_exporter"
|
||||
go_ldflags="-X ${go_import_path}/version.Version=${version}
|
||||
|
|
Loading…
Reference in a new issue