Repository navigation
Ensure Prometheus doesn't return values when the capacity_state is disabled - #7007
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
|
|
Kudos, SonarCloud Quality Gate passed! |
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 5044 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Codecov Report
@@ Coverage Diff @@
## main #7007 +/- ##
=========================================
Coverage 11.29% 11.29%
- Complexity 7308 7310 +2
=========================================
Files 2494 2494
Lines 246877 246877
Branches 38577 38577
=========================================
+ Hits 27884 27888 +4
+ Misses 215400 215395 -5
- Partials 3593 3594 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@soreana can you review/test this? |
|
Trillian test result (tid-5598)
|
|
@DaanHoogland It LGTM. |
|
Awesome work, congrats on your first merged pull request! |
…sabled (apache#7007) Co-authored-by: b-navaro <b.navaro@ca.leaseweb.com>
… the capacity_state is Disabled (apache#7007) Merge in CLOUD/cloudstack from 4.17.0-leaseweb_prometheus_exporter to 4.17.0-leaseweb * commit '5df96348042d56bbb87022163cd9f24b7bee36ca': Ensure Prometheus doesn't return values when the capacity_state is Disabled (apache#7007)








Description
This PR...
Fixes: #7000
It makes prometheus integration returns the same value ("0") when a capacity is explicitly "Disabled" or non-existent.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Set a host in maintenance.
Restart the cloudstack-management service.
Capacities are set to Disabled in table "op_host_capacity".
For the three disabled capacity types, Prometheus exporter returns a total capacity value of "0".