Repository navigation
add VR health checks to prometheus output - #13218
DaanHoogland wants to merge 3 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 20.81% 20.81%
- Complexity 20923 20927 +4
=========================================
Files 6053 6053
Lines 548451 548518 +67
Branches 73279 73288 +9
=========================================
+ Hits 114138 114160 +22
- Misses 420948 420995 +47
+ Partials 13365 13363 -2
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
| // only running virtual routers; results of stopped or destroyed routers are stale | ||
| Map<Long, DomainRouterVO> runningRouters = routers.stream() | ||
| .filter(router -> router.getRole() == VirtualRouter.Role.VIRTUAL_ROUTER && router.getState() == State.Running) | ||
| .collect(Collectors.toMap(DomainRouterVO::getId, router -> router)); |
|
@blueorangutan package |
|
@RosiKyu 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 20083 |
|
@blueorangutan test |
|
@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 |


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?