aboutsummaryrefslogtreecommitdiff
path: root/collector/interrupts_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'collector/interrupts_linux.go')
-rw-r--r--collector/interrupts_linux.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/collector/interrupts_linux.go b/collector/interrupts_linux.go
index cacfeda..5fcbebc 100644
--- a/collector/interrupts_linux.go
+++ b/collector/interrupts_linux.go
@@ -34,13 +34,13 @@ var (
34func (c *interruptsCollector) Update(ch chan<- prometheus.Metric) (err error) { 34func (c *interruptsCollector) Update(ch chan<- prometheus.Metric) (err error) {
35 interrupts, err := getInterrupts() 35 interrupts, err := getInterrupts()
36 if err != nil { 36 if err != nil {
37 return fmt.Errorf("couldn't get interrupts: %s", err) 37 return fmt.Errorf("couldn't get interrupts: %w", err)
38 } 38 }
39 for name, interrupt := range interrupts { 39 for name, interrupt := range interrupts {
40 for cpuNo, value := range interrupt.values { 40 for cpuNo, value := range interrupt.values {
41 fv, err := strconv.ParseFloat(value, 64) 41 fv, err := strconv.ParseFloat(value, 64)
42 if err != nil { 42 if err != nil {
43 return fmt.Errorf("invalid value %s in interrupts: %s", value, err) 43 return fmt.Errorf("invalid value %s in interrupts: %w", value, err)
44 } 44 }
45 ch <- c.desc.mustNewConstMetric(fv, strconv.Itoa(cpuNo), name, interrupt.info, interrupt.devices) 45 ch <- c.desc.mustNewConstMetric(fv, strconv.Itoa(cpuNo), name, interrupt.info, interrupt.devices)
46 } 46 }