Skip to content

mgr/dashboard: Add hardware monitoring dashboard using node proxy metrics - #69750

Merged
afreen23 merged 8 commits into
ceph:mainfrom
rhcs-dashboard:atollon-dash
Jul 2, 2026
Merged

afreen23 merged 8 commits into
ceph:mainfrom
rhcs-dashboard:atollon-dash

Conversation

@afreen23

@afreen23 afreen23 commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor
Screenshot 2026-07-01 at 02-43-56 Ceph Hardware - Overview - Dashboards - Grafana

@afreen23

Copy link
Copy Markdown
Contributor Author

jenkins test dashboard

@afreen23

Copy link
Copy Markdown
Contributor Author

jenkins test dashbiard cephadm

@afreen23

Copy link
Copy Markdown
Contributor Author

jenkins test dashboard cephadm

1 similar comment
@afreen23

Copy link
Copy Markdown
Contributor Author

jenkins test dashboard cephadm

@guits guits left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a couple of nit comments that can be safely ignored or addressed later.
from node-proxy perspective that looks good to me

Comment thread src/pybind/mgr/prometheus/module.py Resolved
Comment thread src/pybind/mgr/prometheus/module.py Resolved
@github-project-automation github-project-automation Bot moved this from New to Reviewer approved in Ceph-Dashboard Jun 30, 2026
@afreen23
afreen23 force-pushed the atollon-dash branch 2 times, most recently from f5f5cbd to 3fa289e Compare July 1, 2026 17:14
@afreen23

afreen23 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Just a repush - tests were stuck

@afreen23

afreen23 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@afreen23

afreen23 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@afreen23

afreen23 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test dashboard

@afreen23

afreen23 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@afreen23

afreen23 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test windows

return

try:
report = raise_if_exception(self.node_proxy_fullreport())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the fullreport from cache? Or to put it another way, if the data is coming from cache, what happens to the data sent to prometheus if node-proxy is down/failed on one host would old state be continued to be sent?
is there a node-proxy status up/down/unknown state that could be checked?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pcuzner yes, the data is read from the cache (NodeProxyCache).
if node-proxy stops reporting on a host, the last cached fullreport for that host will keep being exported until a new report overwrites it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afreen23

afreen23 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

afreen23 added 8 commits July 2, 2026 14:20
The hardware metrics exporter was reading cephadm's private KV store
directly via get_store_prefix('mgr/cephadm/node_proxy/data'). This
had two problems:

1. get_store_prefix() is module-scoped, so from the prometheus module
   it searched under prometheus's own namespace instead of cephadm's,
   resulting in zero metrics being exported despite metric definitions
   appearing at /metrics.

2. The firmware key was accessed as 'firmwares' (plural) but the
   stored field is 'firmware' (singular), causing all firmware version
   metrics to be silently empty.

Use node_proxy_fullreport() and node_proxy_firmware() via the
OrchestratorClientMixin instead. This routes through cephadm's
NodeProxyCache which handles KV access and firmware key compat
correctly. Follows the same pattern as set_cephadm_daemon_status_metrics()
and get_smb_metadata().

Signed-off-by: Afreen Misbah <[email protected]>
Assisted-by: Claude
Signed-off-by: Afreen Misbah <[email protected]>
- Fix fan repeating panels: set multi=true on fan_speeds template
  variable so Grafana generates one panel per fan instead of one
- Remove TACH-only regex filter on fan_speeds template and AVG
  Cooling query so all system fans are visible regardless of naming
- Replace duplicate Power Control panel with Network health panel
- Fix NVMe drive count to use storage_capacity_bytes{protocol=NVMe}
  instead of counting temperature sensors (inaccurate proxy)
- Normalize all hostname filters to regex match (=~) for consistency
- Register hardware.libsonnet in dashboards.libsonnet so the
  dashboard JSON is generated during ceph-mixin builds
- Add temperatures category to prometheus health metrics loop

Signed-off-by: Afreen Misbah <[email protected]>
Assisted-by: Claude
Signed-off-by: Afreen Misbah <[email protected]>
…emory_capacity_bytes

Prometheus naming conventions require base units (bytes not MiB)

Signed-off-by: Afreen Misbah <[email protected]>
- CPU/NVMe temp: change from stat to gauge panels with colored
  arc thresholds (green/yellow/red) and proper °C units
- Health panels: wrap queries in max() aggregation to show
  single worst-case value instead of overlapping series
- Pie charts: switch to donut style with visible legends
- Fan RPM: use locale unit for comma formatting instead of
  short which auto-scaled to "K"
- Fix temperature panels units
- Add Device List and Platform Firmware table panels

Fixes https://tracker.ceph.com/issues/77723

Signed-off-by: Afreen Misbah <[email protected]>
- export `firmware_version` labels from `node_proxy_storage_capacity_bytes` metrics to be used in device firmware panel
- improve iterations for performance - dropping redundant node_proxy_firmware() RPC; firmware data is already
  present in the fullreport response, and removing unnecessary loops.
- replace health if/elif chain with HEALTH_STATUS_MAP dict lookup
- rename metrics to ceph_hardware_*, fix component labels and add tests
- added unit test cases
- add serial name, slot info to capacity metric
- fix health metrics showing ID instead of component name

Signed-off-by: Afreen Misbah <[email protected]>
- Update tests to check for queries in nested row panels
- fix tox tests
- add named tuple

Signed-off-by: Afreen Misbah <[email protected]>
@afreen23

afreen23 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test dashboard

@aaSharma14 aaSharma14 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@afreen23

afreen23 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test api

@afreen23

afreen23 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test dashboard

@cloudbehl

Copy link
Copy Markdown
Contributor

@afreen23 are you plannin to squash the commits?

@afreen23

afreen23 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

@afreen23 are you plannin to squash the commits?

No @cloudbehl

@afreen23
afreen23 merged commit 8a39773 into ceph:main Jul 2, 2026
6 checks passed
@afreen23
afreen23 deleted the atollon-dash branch July 2, 2026 15:54
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Ceph-Dashboard Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants