fix pressure metric collection fails on systems that do not expose a full CPU stat #3051 (#3054)

Signed-off-by: joey <zchengjoey@gmail.com>
This commit is contained in:
chengjoey 2024-06-19 17:16:10 +08:00 committed by GitHub
parent 80859a9f18
commit 4f7bd3544d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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
}