Skip to content

Commit

Permalink
fix pressure metric collection fails on systems that do not expose a …
Browse files Browse the repository at this point in the history
…full CPU stat prometheus#3051

Signed-off-by: joey <zchengjoey@gmail.com>
  • Loading branch information
chengjoey committed Jun 19, 2024
1 parent 80859a9 commit e0b6e2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collector/pressure_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e0b6e2d

Please sign in to comment.