mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-26 14:46:35 +00:00
Fix Hyper-V VM memory metric types
Signed-off-by: Andrew Banman <abanman@pnri.org>
This commit is contained in:
@@ -1548,28 +1548,28 @@ func (c *HyperVCollector) collectVmMemory(ch chan<- prometheus.Metric) (*prometh
|
|||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.VMMemoryAveragePressure,
|
c.VMMemoryAveragePressure,
|
||||||
prometheus.CounterValue,
|
prometheus.GaugeValue,
|
||||||
float64(obj.AveragePressure),
|
float64(obj.AveragePressure),
|
||||||
obj.Name,
|
obj.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.VMMemoryCurrentPressure,
|
c.VMMemoryCurrentPressure,
|
||||||
prometheus.CounterValue,
|
prometheus.GaugeValue,
|
||||||
float64(obj.CurrentPressure),
|
float64(obj.CurrentPressure),
|
||||||
obj.Name,
|
obj.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.VMMemoryGuestVisiblePhysicalMemory,
|
c.VMMemoryGuestVisiblePhysicalMemory,
|
||||||
prometheus.CounterValue,
|
prometheus.GaugeValue,
|
||||||
float64(obj.GuestVisiblePhysicalMemory),
|
float64(obj.GuestVisiblePhysicalMemory),
|
||||||
obj.Name,
|
obj.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.VMMemoryMaximumPressure,
|
c.VMMemoryMaximumPressure,
|
||||||
prometheus.CounterValue,
|
prometheus.GaugeValue,
|
||||||
float64(obj.MaximumPressure),
|
float64(obj.MaximumPressure),
|
||||||
obj.Name,
|
obj.Name,
|
||||||
)
|
)
|
||||||
@@ -1590,14 +1590,14 @@ func (c *HyperVCollector) collectVmMemory(ch chan<- prometheus.Metric) (*prometh
|
|||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.VMMemoryMinimumPressure,
|
c.VMMemoryMinimumPressure,
|
||||||
prometheus.CounterValue,
|
prometheus.GaugeValue,
|
||||||
float64(obj.MinimumPressure),
|
float64(obj.MinimumPressure),
|
||||||
obj.Name,
|
obj.Name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.VMMemoryPhysicalMemory,
|
c.VMMemoryPhysicalMemory,
|
||||||
prometheus.CounterValue,
|
prometheus.GaugeValue,
|
||||||
float64(obj.PhysicalMemory),
|
float64(obj.PhysicalMemory),
|
||||||
obj.Name,
|
obj.Name,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user