Prometheus / Alertmanager / Grafana
Common parts of every card (states, backoff, Unit and ExecReload, Test config, manual commands) are described in Monitor window.
| Detected by | systemd units prometheus, prometheus-alertmanager, alertmanager, prometheus-node-exporter, node_exporter, grafana-server, grafana or binaries prometheus, alertmanager, node_exporter, prometheus-node-exporter, grafana-server, grafana |
| Read every | 60 s while the Monitor window shows the tab |
| Active probe | yes, off by default |
| Test config | on demand |
What the card reads and shows
Section titled “What the card reads and shows”Prometheus, Alertmanager, node_exporter and Grafana: scrape jobs and their targets, down targets with their last error, firing alerts, the Alertmanager cluster and Grafana’s health.
Passive: processes and the options of the first trusted process of each (--config.file, --web.listen-address, …). Prometheus’ configuration (--config.file or /etc/prometheus/prometheus.yml) through yaml.awk: global intervals, per job its name, interval, metrics path, scheme and the number of static targets, rule_files, the number of Alertmanager targets; never basic_auth, authorization, bearer_token, oauth2, tls_config, relabelling or service discovery settings. Alertmanager: only route.receiver and the receiver names (never their URLs or keys). Grafana: only [server] http_port, http_addr, protocol of grafana.ini.
Active (off by default), on the loopback through the shared HTTP helper, each only when a trusted process of that service holds the port: Prometheus build info, count by (job) (up), up == 0, active alerts (name, severity, state), TSDB head series and, only when a target is down, /api/v1/targets (job, instance, health, last error); Alertmanager /api/v2/status (cluster status, peer count, version, uptime) and active unsilenced alerts (name, severity, state); Grafana /api/health (version, database). Never /-/reload, /-/quit, /api/v1/admin/* or a POST.
Active probe
Section titled “Active probe”Runs: Prometheus: GET /api/v1/status/buildinfo, two instant queries (count by (job) (up), up == 0), /api/v1/alerts, /api/v1/status/tsdb and, only when a target is down, /api/v1/targets?state=active; Alertmanager: GET /api/v2/status and active unsilenced alerts; Grafana: GET /api/health. On 127.0.0.1/[::1] through the shared HTTP helper (trusted curl under env -i and GNU timeout, no proxy, no redirects), each only when the port is held by the trusted process whose options were read. Never /-/reload, /-/quit, /api/v1/admin or a POST. Only jobs, instances, health, last errors, alert names, severities and states, counts and versions leave the host
Traces on the host: up to nine requests every 60 s; with query logging on (query_log_file), Prometheus writes the two queries to that log
Test config
Section titled “Test config”What it does, as the card says: checks the configuration and the rule files it names (syntax, templates, that referenced files exist) and exits; does not scrape, connect or touch the running Prometheus.
What it does, as the card says: checks the configuration and its templates and exits; prints the receiver and route summary; does not send notifications or touch the running Alertmanager.