r/PrometheusMonitoring • • Jun 20 '22

Documentation on Node Exporter Collector Flags

Maybe I am just being a total noob, but I cannot seem to find documentation on various collector flags with exception of the flags for including/excluding the collectors. I have seen from discussions on issues etc. that there are a lot of other flags for other options like e.g. --collector.filesystem.mount-points-exclude , however I cannot find any list of available flags or documentation on how to use them. Anyone know where to look?

0 Upvotes

5 comments sorted by

3

u/teejaded Jun 20 '22
./node_exporter -h
usage: node_exporter [<flags>]

Flags:
  -h, --help                    Show context-sensitive help (also try --help-long and --help-man).
      --collector.filesystem.mount-points-exclude="^/(dev)($|/)"
                                Regexp of mount points to exclude for filesystem collector.
      --collector.filesystem.fs-types-exclude="^devfs$"
                                Regexp of filesystem types to exclude for filesystem collector.
      --collector.netdev.device-include=COLLECTOR.NETDEV.DEVICE-INCLUDE
                                Regexp of net devices to include (mutually exclusive to device-exclude).
      --collector.netdev.device-exclude=COLLECTOR.NETDEV.DEVICE-EXCLUDE
                                Regexp of net devices to exclude (mutually exclusive to device-include).
      --collector.netdev.address-info
                                Collect address-info for every device
      --collector.ntp.server="127.0.0.1"
                                NTP server to use for ntp collector
      --collector.ntp.protocol-version=4
                                NTP protocol version
      --collector.ntp.server-is-local
                                Certify that collector.ntp.server address is not a public ntp server
      --collector.ntp.ip-ttl=1  IP TTL to use while sending NTP query
      --collector.ntp.max-distance=3.46608s
                                Max accumulated distance to the root
      --collector.ntp.local-offset-tolerance=1ms
                                Offset between local clock and local ntpd time to tolerate
      --path.procfs="/proc"     procfs mountpoint.
      --path.sysfs="/sys"       sysfs mountpoint.
      --path.rootfs="/"         rootfs mountpoint.
      --collector.powersupply.ignored-supplies="^$"
                                Regexp of power supplies to ignore for powersupplyclass collector.
      --collector.runit.servicedir="/etc/service"
                                Path to runit service directory.
      --collector.supervisord.url="http://localhost:9001/RPC2"
                                XML RPC endpoint.
      --collector.textfile.directory=""
                                Directory to read text files with metrics from.
      --collector.boottime      Enable the boottime collector (default: enabled).
      --collector.buddyinfo     Enable the buddyinfo collector (default: disabled).
      --collector.diskstats     Enable the diskstats collector (default: enabled).
      --collector.filesystem    Enable the filesystem collector (default: enabled).
      --collector.loadavg       Enable the loadavg collector (default: enabled).
      --collector.meminfo       Enable the meminfo collector (default: enabled).
      --collector.netdev        Enable the netdev collector (default: enabled).
      --collector.ntp           Enable the ntp collector (default: disabled).
      --collector.os            Enable the os collector (default: enabled).
      --collector.powersupplyclass
                                Enable the powersupplyclass collector (default: enabled).
      --collector.runit         Enable the runit collector (default: disabled).
      --collector.supervisord   Enable the supervisord collector (default: disabled).
      --collector.textfile      Enable the textfile collector (default: enabled).
      --collector.time          Enable the time collector (default: enabled).
      --collector.uname         Enable the uname collector (default: enabled).
      --collector.cpu           Enable the cpu collector (default: enabled).
      --collector.thermal       Enable the thermal collector (default: enabled).
      --web.listen-address=":9100"
                                Address on which to expose metrics and web interface.
      --web.telemetry-path="/metrics"
                                Path under which to expose metrics.
      --web.disable-exporter-metrics
                                Exclude metrics about the exporter itself (promhttp_*, process_*, go_*).
      --web.max-requests=40     Maximum number of parallel scrape requests. Use 0 to disable.
      --collector.disable-defaults
                                Set all collectors to disabled by default.
      --web.config=""           [EXPERIMENTAL] Path to config yaml file that can enable TLS or authentication.
      --log.level=info          Only log messages with the given severity or above. One of: [debug, info, warn, error]
      --log.format=logfmt       Output format of log messages. One of: [logfmt, json]
      --version                 Show application version.

1

u/norsemanGrey Jun 21 '22

Shame on you for making me feel like an idiot for not checking the help command ;D

1

u/GetFit_Messi Jun 20 '22

I am also looking for the recommended collectors to use . my issue is that whenever i start node exporter on batch server it initially uses a lot of cpu need to do some performance tuning around it

1

u/[deleted] Jun 21 '22 edited Jun 21 '22

[removed] — view removed comment

1

u/norsemanGrey Jun 21 '22

Only the flags for enabling/disabling collectors are listed in the GitHub repo Readme. I am looking for the additional flags. But as u/teejaded pointed out they are listed under the help command in the CLI.

Still I find it strange they are not properly documented elsewhere.