forked from STI/Astroport.ONE
take care of prometheus & node_exporter
This commit is contained in:
parent
54d4837fd6
commit
e7998f7bf8
|
@ -123,6 +123,9 @@ if [[ -s ~/.zen/prometheus/prometheus ]]; then
|
||||||
echo "UPDATING ~/.zen/prometheus/prometheus.yml"
|
echo "UPDATING ~/.zen/prometheus/prometheus.yml"
|
||||||
## ADD ALL SWARM NODES TO MONITORING LIST for prometheus (GRAFANA) node
|
## ADD ALL SWARM NODES TO MONITORING LIST for prometheus (GRAFANA) node
|
||||||
|
|
||||||
|
ncrunning=$(ps axf --sort=+utime | grep -w 'prometheus' | grep -v -E 'color=auto|grep' | tail -n 1 | xargs | cut -d " " -f 1)
|
||||||
|
[[ $ncrunning ]] && echo "RESTARTING" && kill -HUP $ncrunning
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ncrunning=$(ps axf --sort=+utime | grep -w 'node_exporter' | grep -v -E 'color=auto|grep' | tail -n 1 | xargs | cut -d " " -f 1)
|
ncrunning=$(ps axf --sort=+utime | grep -w 'node_exporter' | grep -v -E 'color=auto|grep' | tail -n 1 | xargs | cut -d " " -f 1)
|
||||||
|
|
Loading…
Reference in New Issue