From 4f7bd3544d312477d3e144d4ac2300248219f313 Mon Sep 17 00:00:00 2001 From: chengjoey <30427474+chengjoey@users.noreply.github.com> Date: Wed, 19 Jun 2024 17:16:10 +0800 Subject: [PATCH] fix pressure metric collection fails on systems that do not expose a full CPU stat #3051 (#3054) Signed-off-by: joey --- collector/pressure_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/pressure_linux.go b/collector/pressure_linux.go index 4dbdc539..f64d004f 100644 --- a/collector/pressure_linux.go +++ b/collector/pressure_linux.go @@ -106,7 +106,7 @@ func (c *pressureStatsCollector) Update(ch chan<- prometheus.Metric) error { level.Debug(c.logger).Log("msg", "pressure information returned no 'some' data") return ErrNoData } - if vals.Full == nil { + if vals.Full == nil && res != "cpu" { level.Debug(c.logger).Log("msg", "pressure information returned no 'full' data") return ErrNoData }