Used to monitor if Prometheus and Alertmanager are running, and if the entire machine is offline or unresponsive.
sudovim/etc/default/healthchecks.sh
Edit UNIQUE_ID
#!/bin/bash# Healthchecks.io URL# ***********# CHANGE HERE# โโโโโโโโโโโhealthchecks_io_url="https://hc-ping.com/<UNIQUE_ID>"# URLs for the health endpoints of Prometheus and Alertmanagerprometheus_health_url="http://localhost:9090/-/healthy"alertmanager_health_url="http://localhost:9093/-/healthy"# Check health of Prometheusifcurl-f ${prometheus_health_url}; then# Check health of Alertmanagerifcurl-f ${alertmanager_health_url}; then# Send heartbeat to Healthchecks.iocurl-fsS--retry3 ${healthchecks_io_url} >/dev/nullelseecho"Alertmanager is not healthy."fielseecho"Prometheus is not healthy."fi