mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-23 20:36:21 +01:00
Merge pull request #2092 from prometheus/superq/fix_energy_uj
Fix rapl collector log noise
This commit is contained in:
commit
747012c59a
@ -70,6 +70,10 @@ func (c *raplCollector) Update(ch chan<- prometheus.Metric) error {
|
||||
for _, rz := range zones {
|
||||
newMicrojoules, err := rz.GetEnergyMicrojoules()
|
||||
if err != nil {
|
||||
if errors.Is(err, os.ErrPermission) {
|
||||
level.Debug(c.logger).Log("msg", "Can't access energy_uj file", "zone", rz, "err", err)
|
||||
return ErrNoData
|
||||
}
|
||||
return err
|
||||
}
|
||||
index := strconv.Itoa(rz.Index)
|
||||
|
Loading…
Reference in New Issue
Block a user