Skip to content

--collector.diskstats.ignored-devices and --collector.diskstats.device-exclude are mutually exclusive #2486

@b-a-t

Description

@b-a-t

Host operating system: output of uname -a

Linux gitlab-runner-008.example.net 4.18.0-372.26.1.0.1.el8_6.x86_64 #1 SMP Tue Sep 13 21:44:27 PDT 2022 x86_64 x86_64 x86_64 GNU/Linux

node_exporter version: output of node_exporter --version

node_exporter, version 1.4.0 (branch: HEAD, revision: 7da1321)
build user: root@83d90983e89c
build date: 20220926-12:32:56
go version: go1.19.1
platform: linux/amd64

node_exporter command line flags

NODE_EXPORTER_OPTS='--web.listen-address="127.0.0.1:9100"
--web.disable-exporter-metrics
--collector.disable-defaults
--collector.cpu.info
--collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\d+n\d+p)\d+$"
--collector.filesystem.ignored-mount-points="^/(dev|proc|sys|(var/lib|export)/docker/.+)($|/)"
--collector.filesystem.ignored-fs-types="^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$"
--collector.arp
--collector.conntrack
--collector.cpu
--collector.cpufreq
--collector.diskstats
--collector.edac
--collector.filefd
--collector.filesystem
--collector.hwmon
--collector.interrupts
--collector.loadavg
--collector.meminfo
--collector.meminfo_numa
--collector.mountstats
--collector.netclass
--collector.netdev
--collector.netstat
--collector.nfs
--collector.ntp
--collector.pressure
--collector.processes
--collector.rapl
--collector.schedstat
--collector.sockstat
--collector.softnet
--collector.stat
--collector.systemd
--collector.tcpstat
--collector.textfile
--collector.thermal_zone
--collector.time
--collector.timex
--collector.udp_queues
--collector.uname
--collector.vmstat
--collector.xfs'

Are you running node_exporter in Docker?

No

What did you do that produced an error?

Installed new OEL8 box, which happen to install newest node_exporter.

What did you expect to see?

Started and working node_exporter

What did you see instead?

panic: Couldn't create metrics handler: couldn't create collector: failed to parse device filter flags: --collector.diskstats.ignored-devices and --collector.diskstats.device-exclude are mutually exclusive

We are installing our servers with the help of Salt configuration management tool, installation of the node_exporter and other exporters are done through the established formula, which was working fine over the last year.

The exactly same set of flags is used for other CentOS7 and OEL8 servers and never created any problems.

The error message we see is also confusing, as we don't specify --collector.diskstats.device-exclude flags anywhere.

Replacing in the defaults/node_exporter --collector.diskstats.ignored-devices with --collector.diskstats.device-exclude fixed the startup of the service.

But for me it looks like handling of the flags is broken - either --collector.diskstats.ignored-devices shouldn't be accepted at all or --collector.diskstats.device-exclude shouldn't be implicitly assumed to be set if deprecared flag is present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions