Skip to content

PMM-15091: stop double-counting RAID md devices in Disk Details - #5675

Open
mattiasimonato wants to merge 7 commits into
mainfrom
PMM-15091-exclude-md-from-disk-details
Open

PMM-15091: stop double-counting RAID md devices in Disk Details#5675
mattiasimonato wants to merge 7 commits into
mainfrom
PMM-15091-exclude-md-from-disk-details

Conversation

@mattiasimonato

@mattiasimonato mattiasimonato commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Ticket number: PMM-15091

Feature build: SUBMODULES-4488

Total Performance on Disk Details sums metrics over $device. That variable already skipped LVM devices (dm-*), but still included both the RAID array (md0) and its member disks (sda, sdb). Summing those together counted the same I/O twice, so panels showed about 2× real IOPS/throughput.

Fix: exclude RAID arrays in the $device query with device!~"dm-.+|md.+", same idea as LVM. Panels keep using $device, so Total Performance stops double-counting. Used md.+ (not md[0-9].+) so names like md0 match.

Summary by CodeRabbit

  • Bug Fixes
    • Updated the Device filter in the Disk Details dashboard to properly exclude both device-mapper and software RAID devices from monitoring queries, improving data accuracy.

Copilot AI 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.

Pull request overview

Updates the Disk Details Grafana dashboard variable query to avoid double-counting I/O when both Linux software RAID (md*) devices and their member disks are present, improving the accuracy of “Total Performance” panels that aggregate over $device.

Changes:

  • Exclude md* devices from the $device template variable query (in addition to existing dm-* exclusion) to prevent RAID array + member disk double aggregation.
  • Apply the same exclusion to both the variable definition and query fields for consistency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.03%. Comparing base (31318c7) to head (a4afc89).
⚠️ Report is 87 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5675      +/-   ##
==========================================
- Coverage   43.59%   37.03%   -6.56%     
==========================================
  Files         415      215     -200     
  Lines       43134     7168   -35966     
  Branches        0      592     +592     
==========================================
- Hits        18804     2655   -16149     
+ Misses      22454     4317   -18137     
+ Partials     1876      196    -1680     
Flag Coverage Δ
admin 34.96% <ø> (+0.17%) ⬆️
agent ?
managed ?
unittests 41.29% <ø> (?)
vmproxy ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mattiasimonato
mattiasimonato marked this pull request as ready for review July 21, 2026 10:16
@mattiasimonato
mattiasimonato requested review from a team and Nailya as code owners July 21, 2026 10:16
@mattiasimonato
mattiasimonato requested review from fabio-silva and matejkubinec and removed request for a team July 21, 2026 10:16
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b50241e7-0225-47db-9dc7-8aab900968f0

📥 Commits

Reviewing files that changed from the base of the PR and between c6029fc and a4afc89.

📒 Files selected for processing (1)
  • dashboards/dashboards/OS/Disk_Details.json

Walkthrough

The OS Disk Details dashboard now excludes both device-mapper (dm-*) and software RAID (md*) devices from the Device variable query.

Changes

Disk device filtering

Layer / File(s) Summary
Update Device variable query
dashboards/dashboards/OS/Disk_Details.json
The Device variable definition and nested query now exclude dm-* and md* device names.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: nailya

Poem

A rabbit checks the disks with care,
And skips mapped devices there.
dm-* and md* hide from view,
The dashboard query now filters true.
Hop, hop—clean results come through!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: excluding RAID md devices from the Disk Details device variable to prevent double-counting in the Total Performance metric.
Description check ✅ Passed The description includes the ticket number and feature build, explains the problem and solution clearly, and provides implementation details. The API documentation checkbox is not applicable here.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch PMM-15091-exclude-md-from-disk-details

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants