feat(node_exporter): add reboot required flag
This commit is contained in:
1 parent
4ff34458cc
commit
832c7bdafb
1 file changed
+11
-1
@@ -3,7 +3,7 @@
|
||||
OUT=/docker/monitoring/node_exporter/textfile_collector/custom.prom
|
||||
TS=$(date +%s%3N)
|
||||
if [[ "$(hostname)" == "mediahost" ]]; then
|
||||
DOCKER_CONTAINER_NUM=47
|
||||
DOCKER_CONTAINER_NUM=50
|
||||
elif [[ "$(hostname)" == "serverhost" ]]; then
|
||||
DOCKER_CONTAINER_NUM=4
|
||||
elif [[ "$(hostname)" == "quiethost" ]]; then
|
||||
@@ -47,6 +47,16 @@ fi
|
||||
LON=$(jq -r '.lon' <<< "$IP_JSON")
|
||||
|
||||
echo "public_ip_info{ip=\"$IP\",country=\"$COUNTRY\",city=\"$CITY\",isp=\"$ISP\",countrycode=\"$COUNTRYCODE\",lat=\"$LAT\",lon=\"$LON\",exported_host=\"$(hostname)\"} 1"
|
||||
|
||||
if [ -f /var/run/reboot-required ]; then
|
||||
# HELP reboot_required Reboot required
|
||||
# TYPE reboot_required gauge
|
||||
echo reboot_required 1
|
||||
else
|
||||
# HELP reboot_required Reboot required
|
||||
# TYPE reboot_required gauge
|
||||
echo reboot_required 0
|
||||
fi
|
||||
echo "custom_metrics_last_update_timestamp_seconds $(date +%s)"
|
||||
} > "$OUT.$$"
|
||||
|
||||
|
||||
Reference in new issue
Block a user