Repository navigation
add VR health checks to prometheus output - #13218
DaanHoogland wants to merge 2 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.76% 20.77%
- Complexity 21903 21911 +8
=========================================
Files 6496 6496
Lines 591612 591679 +67
Branches 72585 72594 +9
=========================================
+ Hits 122851 122909 +58
- Misses 455424 455430 +6
- Partials 13337 13340 +3
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)); |


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?