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