Skip to main content
RunBook Academy

CephLXXVIII · Monitoring the Monitoring PathMonitoring the Monitoring Path

Redundant Prometheus for Ceph monitoring

Advanced⏱ ~17 minprometheusalertmanager

What you'll learn

  • Configure redundant Prometheus instances
  • Understand what redundancy provides and what it does not
  • Handle the resulting duplicate alerts
  • Decide whether HA is warranted

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

Not yet marked complete on this device.

Why this matters in production

Prometheus is a single process with local storage, and its failure removes all Ceph visibility. Redundancy is cheap and the deduplication is handled for you.

The configuration

# both instances: identical scrape and rule configuration
global:
  external_labels:
    replica: 'prom-01'      # differs per instance
    cluster: 'prod-ceph-01'

scrape_configs:
  - job_name: 'ceph'
    static_configs:
      - targets: ['mgr-01:9283', 'mgr-02:9283', 'mgr-03:9283']

alerting:
  alertmanagers:
    - static_configs:
        - targets: ['alertmanager-01:9093', 'alertmanager-02:9093']

Two instances scraping the same targets with the same rules, distinguished only by the replica external label.

Deduplication

Alertmanager receives the same alert from both replicas.
It deduplicates by the alert's label set, excluding replica labels.
One notification is sent.
# Alertmanager must not group by the replica label
route:
  group_by: ['alertname', 'cluster', 'service']

Including replica in group_by defeats the deduplication entirely and produces two notifications per alert, which is the most common misconfiguration in this setup.

What redundancy provides

FailureCovered?
One Prometheus process diesyes
One Prometheus host failsyes, if on different hosts
One Prometheus runs out of diskyes
A bad rule deployed to bothno
The Ceph exporter failsno
Alertmanager failsno — needs its own redundancy
A network partition isolating bothno

Redundancy at one layer covers failures at that layer only, which is why the Alertmanager and the notification path need their own treatment.

The data divergence

Each replica stores its own scrapes independently.
After a restart, one has a gap the other does not.
Queries against different replicas return different data.

This matters for dashboards: a Grafana datasource pointing at one replica shows that replica’s gaps. Options:

ApproachEffect
Load balancer across replicasqueries land on either; gaps appear intermittently
Pin dashboards to one replicaconsistent, but that replica’s gaps are permanent
Thanos or Mimirmerges replicas, removing gaps

For alerting the divergence is harmless — either replica firing produces the notification. For historical dashboards it is visible.

Deciding whether HA is warranted

SituationHA warranted?
Ceph is production-criticalyes
Alerts drive an on-call rotationyes
Monitoring is best-effortprobably not
A single small clusterprobably not

Quiz

Knowledge check · 4 questions

  1. Q1. What is the most common misconfiguration when running redundant Prometheus instances?

  2. Q2. Running two Prometheus replicas makes alerting slightly more sensitive rather than more conservative.

  3. Q3. Add Prometheus redundancy for a critical Ceph cluster.

    A production Ceph cluster is monitored by a single Prometheus instance. Its host failed last month and Ceph was unmonitored for six hours before anyone noticed.

  4. Q4. Why do Prometheus replicas show different historical data?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Set a distinct replica external label on each Prometheus and keep it out of Alertmanager’s group_by — including it doubles every notification. Remember that Prometheus redundancy covers only that layer; Alertmanager and the notification path need their own.

Cross-course references

  • Kubernetes: kube-prometheus ships this replica-and-dedup pattern by default
  • Linux: redundancy at one layer never covers the layers around it