Lokomotive: node exporter: could not get power_supply class info

Created on 21 Oct 2020  路  3Comments  路  Source: kinvolk/lokomotive

node exporter that's deployed by our prometheus-operator component with the default config seems to be looking for a non-existent file at /host/sys/class/power_supply.

From the node exporter logs:

monitoring/prometheus-operator-prometheus-node-exporter-g5pfv[node-exporter]: level=error ts=2020-10-21T11:47:26.991Z caller=collector.go:161 msg="collector failed" name=mdadm duration_seconds=5.7176e-05 err="error parsing mdstatus: error parsing mdstat /host/proc/mdstat: open /host/proc/mdstat: no such file or directory"
monitoring/prometheus-operator-prometheus-node-exporter-g5pfv[node-exporter]: level=error ts=2020-10-21T11:47:26.995Z caller=collector.go:161 msg="collector failed" name=powersupplyclass duration_seconds=3.8628e-05 err="could not get power_supply class info: error obtaining power_supply class info: failed to list power supplies at \"/host/sys/class/power_supply\": open /host/sys/class/power_supply: no such file or directory"

Setting --no-collector.powersupplyclass under prometheus-node-exporter.extraArgs in the component's values.yaml disables the relevant check:

prometheus-node-exporter:
  namespaceOverride: ""
  podLabels:
    ## Add the 'node-exporter' label to be used by serviceMonitor to match standard common usage in rules and grafana dashboard
s
    ##
    jobLabel: node-exporter
  extraArgs:
    - --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/)
    - --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mq
ueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$
    - --no-collector.powersupplyclass

We should figure out if it makes sense to hardcode this change in values.yaml or if we want to expose it to the user. I'm leaning towards disabling this check since it won't work on Flatcar at the moment.

arecomponents aremonitoring bug

Most helpful comment

Created an issue in Flatcar flatcar-linux/Flatcar/issues/215

All 3 comments

Maybe we should figure why it doesn't work on Flatcar?

Created an issue in Flatcar flatcar-linux/Flatcar/issues/215

As explained in https://github.com/kinvolk/lokomotive/pull/1111#issuecomment-714570980, updating node_exporter done in 85fd269059b27b762fb96965d1b45e35f0592b43 fixed it.

Was this page helpful?
0 / 5 - 0 ratings