mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
Fix rapl collector log noise
Catch permission denined errors in the rapl collector. Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
1729558e11
commit
dc5a94c803
|
@ -60,6 +60,10 @@ func (c *raplCollector) Update(ch chan<- prometheus.Metric) error {
|
|||
level.Debug(c.logger).Log("msg", "Platform doesn't have powercap files present", "err", err)
|
||||
return ErrNoData
|
||||
}
|
||||
if errors.Is(err, os.ErrPermission) {
|
||||
level.Debug(c.logger).Log("msg", "Can't access powercap files", "err", err)
|
||||
return ErrNoData
|
||||
}
|
||||
return fmt.Errorf("failed to retrieve rapl stats: %w", err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue