monitoring: alert on unknown servers in the Hetzner project
Some checks failed
deploy / ansible (push) Failing after 41s

The VPC ping sweep misses a server that drops ICMP or is not attached
to the private network. Prometheus now lists the project's servers from
the Hetzner API with a read-only token and marks each one known or not
against monitoring_hcloud_servers.

Nothing is scraped from the servers: every discovered target is
Prometheus itself with all samples dropped, which leaves one `up`
series per server. A second alert fires when the list stops updating,
so a revoked token does not silently disable the check.

Assisted-by: Claude:fable-5-2
This commit is contained in:
Sergei Poljanski 2026-11-16 00:13:00 +04:00
commit ebd4f110f4
Signed by: asxpi
GPG key ID: 4F8851660FA4121B

View file

@ -32,3 +32,8 @@ monitoring_textfile_dir: /var/lib/node_exporter/textfile
monitoring_grafana_host: gf.asxp.io
monitoring_grafana_admin_password: "{{ vault_grafana_admin_password }}"
monitoring_forgejo_metrics_token: "{{ vault_forgejo_metrics_token }}"
# Read-only Hetzner Cloud token: Prometheus lists the project's servers
# and alerts on one that is not named here.
monitoring_hcloud_token: "{{ vault_hcloud_ro_token }}"
monitoring_hcloud_servers: [asxpio-ops, asxpio-services]