Skip to content

monitoring: compare NVMe-oF gateway CPU in percent - #72211

Merged
aaSharma14 merged 2 commits into
ceph:mainfrom
banlor:fix/nvmeof-cpu-percent-ar007
Nov 13, 2026
Merged

aaSharma14 merged 2 commits into
ceph:mainfrom
banlor:fix/nvmeof-cpu-percent-ar007

Conversation

@banlor

@banlor banlor commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

The NVMe-oF gateway reactor counter accumulates busy seconds. Its per-second rate is a fraction, but NVMeoFHighGatewayCPU compares that fraction with the configured threshold of 80. In the full-rule replay, a gateway at 90% stayed silent after 15 minutes.

Scale the averaged rate by 100 in both the Ceph mixin source and shipped rules. The configured threshold stays 80, and the 10-minute for, labels, and annotations are unchanged. The regression exercises two gateways, multiple reactor threads, the pending period, and the exact 80% boundary.

Gateway load Before, at 15m After, at 15m
90% no alert alert
80% no alert no alert
50% no alert no alert

promtool test rules tests_alerts/test_nvmeof_cpu.yml and promtool check rules prometheus_alerts.yml pass. The existing all-alert fixture has the same unrelated failures on base and this branch under promtool 3.15.0; the isolated regression passes and is registered with both tox and CTest. The new CTest registration was exercised in isolation, not through a full Ceph build. Jsonnet generation produces the same changed NVMe-oF expression, while the repository's checked-in YAML already differs from generated output in unrelated rules.

AI tools assisted with the patch, tests and review. Found while studying alert rules across projects; the study reports results only in aggregate. This is a source-backed synthetic replay of ceph-nvmeof 1.7.23, not a claim about a live gateway.

Tracker: https://tracker.ceph.com/issues/81134

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)

Reactor busy seconds accumulate elapsed time. Scale the average rate to
percent before comparing it with the configured threshold of 80.
Add a full-rule regression to the tox and CTest alert checks.

Fixes: https://tracker.ceph.com/issues/81134
Signed-off-by: Mikhail Basov <[email protected]>
@banlor
banlor requested a review from a team as a code owner September 29, 2026 19:55
@banlor
banlor requested review from nmunet and pujaoshahu September 29, 2026 19:55
@github-actions

Copy link
Copy Markdown

Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR ci-approved to allow Jenkins CI jobs to run.

@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

@github-project-automation github-project-automation Bot moved this from New to Reviewer approved in Ceph-Dashboard Oct 28, 2026
@aaSharma14
aaSharma14 requested a review from afreen23 October 28, 2026 06:14
@aaSharma14

Copy link
Copy Markdown
Contributor

Hi @banlor , the newly added run_promtool_nvmeof_cpu tests are failing in the make check. Can you please check and update?

make check runs promtool 2.31 from Ubuntu 22.04, which rejects the
fuzzy_compare field added in Prometheus 3.5. Round the percentages in
the expression check instead, so the expected values stay exact with
both older and current promtool.

Signed-off-by: Mikhail Basov <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@banlor

banlor commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @aaSharma14. The CI promtool (2.31) does not support fuzzy_compare, which was added in Prometheus 3.5. I removed it and rounded the checked values instead; the test passes with promtool 2.47 and 3.15. Could you please re-approve CI?

@banlor

banlor commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@aaSharma14, the promtool test fix from 29 October is in; could someone approve the CI run when you have a moment?

@aaSharma14

Copy link
Copy Markdown
Contributor

jenkins test api

@aaSharma14
aaSharma14 merged commit 02dd9b1 into ceph:main Nov 13, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Ceph-Dashboard Nov 13, 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.

2 participants