Skip to content

Commit

Permalink
Merge pull request prometheus#52 from Prashanth684/cpu-info-nonx86
Browse files Browse the repository at this point in the history
Disable cpu info metric on non x86 arches
  • Loading branch information
openshift-merge-robot committed Jan 15, 2020
2 parents cef8fe2 + 2689b84 commit 433c623
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion collector/cpu_linux.go
Expand Up @@ -18,6 +18,7 @@ package collector
import (
"fmt"
"path/filepath"
"runtime"
"strconv"

"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -77,7 +78,7 @@ func NewCPUCollector() (Collector, error) {

// Update implements Collector and exposes cpu related metrics from /proc/stat and /sys/.../cpu/.
func (c *cpuCollector) Update(ch chan<- prometheus.Metric) error {
if *enableCPUInfo {
if *enableCPUInfo && (runtime.GOARCH == "amd64") {
if err := c.updateInfo(ch); err != nil {
return err
}
Expand Down

0 comments on commit 433c623

Please sign in to comment.