Skip to content

kolla: Scrape the Ceph mgr when OSISM deploys Ceph - #330

Merged
berendt merged 1 commit into
mainfrom
enable-ceph-mgr-scrape
Oct 16, 2026
Merged

berendt merged 1 commit into
mainfrom
enable-ceph-mgr-scrape

Conversation

@ideaship

@ideaship ideaship commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

The Ceph mgr prometheus module is enabled on every cephadm deployment, but the Prometheus that OSISM deploys does not scrape it. On 2024.1 and 2024.2 the scrape job came from kolla-operations (prometheus.yml.d/50-ceph.yml). kolla-operations is not used from 2025.1 on, so since then a deployment has no Ceph metrics unless the operator adds a prometheus.yml.d overlay.

kolla-ansible already has a ceph_mgr_exporter scrape job. This turns it on in all/099-kolla.yml:

  • enable_prometheus_ceph_mgr_exporter is true when Prometheus is enabled, kolla-operations is not, and the ceph-mgr group has hosts, i.e. when OSISM deploys Ceph. With an external Ceph the group is empty.
  • prometheus_ceph_mgr_exporter_endpoints lists every ceph-mgr host on port 9283, at the address kolla uses for the node exporter on that host (the API address, or prometheus_target_address). Standby mgrs answer with an empty body, so the metrics follow the active mgr without duplicates.

Tested on a 2026.1 deployment with three mgrs: the job renders with the three API addresses, all targets are up, ceph_health_status exists once, and after ceph mgr fail it comes from the new active mgr. The enable expression is false without a ceph-mgr group, with Prometheus off, and with kolla-operations on.

Upgrade impact: a deployment that already scrapes the mgr through its own overlay gets every Ceph series twice, under two job names, until it removes the overlay. testbed has such an overlay:

🤖 Generated with Claude Code

The prometheus module of the Ceph mgr is enabled on every cephadm
deployment (ceph_mgr_modules), but the Prometheus that OSISM deploys
does not scrape it. On 2024.1 and 2024.2 the scrape job came from
kolla-operations (prometheus.yml.d/50-ceph.yml). kolla-operations is
not used from 2025.1 on, so since then a deployment has no Ceph metrics
in Prometheus unless the operator adds a prometheus.yml.d overlay.

kolla-ansible already has a ceph_mgr_exporter job for this, gated on
enable_prometheus_ceph_mgr_exporter and fed by
prometheus_ceph_mgr_exporter_endpoints. Turn it on when Prometheus is
enabled, kolla-operations is not, and the ceph-mgr group has hosts,
which is the case when OSISM deploys Ceph; with an external Ceph the
group is empty. The endpoints are all ceph-mgr hosts on port 9283, at
the same address kolla uses for the node exporter on those hosts (the
API address, or prometheus_target_address). The module listens on all
addresses. Standby mgrs answer with an empty body, so listing all of
them makes the metrics follow the active mgr without duplicates.

Tested on a 2026.1 deployment with three mgrs and Prometheus on the
manager: osism apply prometheus renders the job with the three API
addresses, all targets are up, ceph_health_status exists once, and
after ceph mgr fail it comes from the new active mgr. The enable
expression evaluates to false without a ceph-mgr group, with
Prometheus off, and with kolla-operations on.

A deployment that already scrapes the mgr through its own overlay gets
the metrics twice, under two job names, until the overlay is removed.

UpgradeImpact
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
@ideaship ideaship self-assigned this Oct 16, 2026
@ideaship
ideaship marked this pull request as ready for review October 16, 2026 16:17
@ideaship
ideaship requested a review from berendt October 16, 2026 16:17
@berendt
berendt merged commit 3e8b180 into main Oct 16, 2026
3 checks passed
@berendt
berendt deleted the enable-ceph-mgr-scrape branch October 16, 2026 16:27
@github-project-automation github-project-automation Bot moved this from New to Done in Human Board Oct 16, 2026
berendt pushed a commit to osism/testbed that referenced this pull request Oct 16, 2026
prometheus.yml.d/50-ceph.yml adds a "ceph" scrape job for the Ceph mgr
prometheus module, with one target per host in the mons group at its
storage_interface address. osism/defaults now enables kolla-ansible's
own ceph_mgr_exporter job whenever OSISM deploys Ceph and Prometheus
is on, with every ceph-mgr host as a target (osism/defaults#330). With
both in place, Prometheus scrapes every Ceph series twice under two
job names.

Remove the overlay and its ansible-lint exclusion, which existed only
because the file is a Jinja template.

This depends on osism/defaults#330. Until a release carries it,
deployments of that release lose the Ceph scrape.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants