Repository navigation
add VR health checks to prometheus output - #13218
DaanHoogland wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the Prometheus exporter plugin to expose Virtual Router health-check results via the /metrics endpoint, addressing the need to monitor VR health checks without per-router API polling (Fixes #6212).
Changes:
- Collect router health-check results from
router_health_checkand export per-check status ascloudstack_virtualrouter_healthcheck_result. - Export the last update time (Unix epoch seconds) per check as
cloudstack_virtualrouter_healthcheck_lastcheck. - Wire in the required DAOs (
DomainRouterDao,RouterHealthCheckResultDao) and add new metric item types.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13218 +/- ##
============================================
+ Coverage 3.86% 21.09% +17.22%
- Complexity 0 21294 +21294
============================================
Files 494 6058 +5564
Lines 42890 549965 +507075
Branches 8142 73547 +65405
============================================
+ Hits 1657 115990 +114333
- Misses 41001 420344 +379343
- Partials 232 13631 +13399
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19820 |
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-17415)
|
4aede97 to
9bc4831
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Duplicate router IDs can trigger an IllegalStateException that aborts metrics collection, skipping zone health checks and domain metrics, so router deduplication and a regression test are needed.
1 open issue
3 resolved since last review
Review effort: Balanced
|
@blueorangutan package |
|
@RosiKyu a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
@DaanHoogland I tested this on a KVM lab (Oracle Linux 9, advanced zone), first on 24.0 without this PR, then the PR packages, with Works when only isolated-network routers are running:
Problem with a VPC router: I created a VPC with two tiers and a VM in each tier, so its router and the page then has no router health lines at all (also none for the other running router), and the domain metrics ( Could you have a look? |
|
[SF] Trillian test result (tid-17588)
|
9bc4831 to
c063a3a
Compare
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
Thanks @RosiKyu, claude agrees ;) . There was an exception thrown on encountering a double not processing the rest. It should be fixed now Could you retest your VPC setup? |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 20108 |
|
Tested on 4.22.1.1. To compile on the 4.22 tag I had to reduce the two new Item constructors to the single argument form, since Item(name, help, type) only exists on main; nothing else changed.
LGTM from a functional test. Part 2: our own fixes (branches ready locally, nothing pushed)All four are committed on top of upstream main (caf1091) and compile there. Lab tests were done with the same change on tag 4.22.1.1.
|
…d disabled checks
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
… routers, escape label values
c9b6719 to
13495cb
Compare


Description
This PR...
Fixes: #6212
aided by AI
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?