CephLXXVIII · Monitoring the Monitoring PathMonitoring the Monitoring Path
Redundant Alertmanager
What you'll learn
- Configure an Alertmanager cluster
- Understand what the gossip protocol synchronises
- Verify cluster membership
- Recognise the remaining failure modes
Prerequisites
None — start here.
Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18
Why this matters in production
Alertmanager is where alerts become notifications. A single instance failing means alerts fire correctly and nobody hears them.
The cluster
alertmanager \
--config.file=/etc/alertmanager/alertmanager.yml \
--cluster.listen-address=0.0.0.0:9094 \
--cluster.peer=alertmanager-02:9094 \
--cluster.peer=alertmanager-03:9094
Each instance lists the others as peers. They form a gossip cluster and coordinate rather than acting independently.
amtool cluster show --alertmanager.url=http://alertmanager-01:9093
curl -s http://alertmanager-01:9093/api/v2/status | python3 -c '
import sys,json; d=json.load(sys.stdin)
print("name:", d["cluster"]["name"], "status:", d["cluster"]["status"])
print("peers:", [p["address"] for p in d["cluster"]["peers"]])'
What the gossip protocol synchronises
| Synchronised | Not synchronised |
|---|---|
| Silences | configuration files |
| Notification log (what has been sent) | the alert data itself |
| Cluster membership | receiver credentials |
The notification log is the important one: it prevents every instance sending the same notification. Instances coordinate so one sends and the others record that it was sent.
# a silence created on one instance appears on all
amtool silence add alertname=CephNearfull --duration=4h \
--alertmanager.url=http://alertmanager-01:9093
amtool silence query --alertmanager.url=http://alertmanager-02:9093
Verifying membership
for a in alertmanager-01 alertmanager-02 alertmanager-03; do
printf '%-18s ' "$a"
curl -s "http://$a:9093/api/v2/status" | python3 -c '
import sys,json; d=json.load(sys.stdin)
print(d["cluster"]["status"], len(d["cluster"]["peers"]), "peers")' 2>/dev/null || echo unreachable
done
A cluster where instances cannot see each other is worse than a single instance: each acts independently and every notification is sent multiple times.
- alert: AlertmanagerClusterDegraded
expr: alertmanager_cluster_members < 3
for: 10m
labels: { severity: ticket }
The remaining failure modes
| Failure | Covered by clustering? |
|---|---|
| One instance fails | yes |
| Configuration differs between instances | no — and behaviour becomes unpredictable |
| The notification channel is down | no |
| All instances partitioned from the channel | no |
| Receiver credentials expired | no |
Configuration drift between instances is the subtle one: each applies its own routing, so an alert may be routed differently depending on which instance handles it.
# verify configuration is identical
for a in alertmanager-01 alertmanager-02; do
curl -s "http://$a:9093/api/v2/status" | python3 -c '
import sys,json,hashlib
print(hashlib.sha256(json.load(sys.stdin)["config"]["original"].encode()).hexdigest()[:16])'
done
Quiz
Knowledge check · 4 questions
Q1. Why does Alertmanager gossip a notification log rather than electing a leader?
Q2. Three running Alertmanager instances always produce one notification per alert.
Q3. Diagnose triplicate notifications.
Every Ceph alert is arriving three times. Three Alertmanager instances are running and all report healthy.
Q4. What does Alertmanager gossip synchronise, and what does it not?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Monitor alertmanager_cluster_members — partitioned instances each
appear healthy while every notification is sent once per instance. Verify
configuration is identical across instances; gossip does not synchronise
it, and drift produces routing that depends on which instance handles the
alert.
Cross-course references
- Kubernetes: gossip-based coordination appears in many controllers for the same reason
- Linux: split-brain in any clustered service produces duplicated rather than absent work