Monitore your websites availability, http status code (current and history), certificate, redirects and more with Grafana and Prometheus blackbox exporter.
Monitore your websites availability, http status code (current and history), certificate, redirects and more with
git clone [email protected]:mbelloiseau/website-monitoring.git && cd website-monitoring
config/prometheus/targets.yml
(see targets.yml.example) or use ./gen_target.sh website-1.tld website-2.tld ...
docker-compose up -d
If you already have Prometheus and Prometheus blackbox exporter up and running just import the dashboards (website-monitoring or overview) and use the right datasource and jobs (http_job and icmp_job)
Some useful PromQL queries
(probe_ssl_earliest_cert_expiry{instance=~"$target",job="$http_job"} - time()) / (60*60*24)
probe_http_status_code{job="$http_job",instance=~"$target"} != 200
count_values("code", probe_http_status_code)
((count(count by (instance) (probe_http_status_code == 200))) / (count(count by (instance) (probe_http_status_code)))) * 100
curl -s "localhost:9115/probe?module=http_2xx&target=target.tld"