soreana commented on code in PR #7629:
URL: https://github.com/apache/cloudstack/pull/7629#discussion_r1231975147
##########
plugins/integrations/prometheus/src/main/java/org/apache/cloudstack/metrics/PrometheusExporterImpl.java:
##########
@@ -158,20 +158,20 @@ private void addHostMetrics(final List<Item> metricsList,
final long dcId, final
final String cpuFactor =
String.valueOf(CapacityManager.CpuOverprovisioningFactor.valueIn(host.getClusterId()));
final CapacityVO cpuCapacity =
capacityDao.findByHostIdType(host.getId(), Capacity.CAPACITY_TYPE_CPU);
if (cpuCapacity != null && cpuCapacity.getCapacityState() ==
CapacityState.Enabled) {
- metricsList.add(new ItemHostCpu(zoneName, zoneUuid,
host.getName(), host.getUuid(), host.getPrivateIpAddress(), cpuFactor, USED,
cpuCapacity.getUsedCapacity(), isDedicated, hostTags));
+ metricsList.add(new ItemHostCpu(zoneName, zoneUuid,
host.getName(), host.getUuid(), host.getPrivateIpAddress(), cpuFactor,
ALLOCATED, cpuCapacity.getUsedCapacity(), isDedicated, hostTags));
Review Comment:
The reserved capacity subtracted from the total memory of the host. I've
checked that in a refresh test environment and the sum of the VM memories was
equal to the usedCapacity even though I've changed the reserved memory.
Thanks for sharing the info, I would add a new entry for the used. :+1:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]