tynany / frr_exporter

Prometheus exporter for Free Range Routing
MIT License
99 stars 35 forks source link

Impossible to disable collector #59

Closed k0ste closed 2 years ago

k0ste commented 2 years ago
# ./frr_exporter --collector.bfd=disabled
frr_exporter: error: unexpected disabled, try --help
# ./frr_exporter --nocollector.bfd
frr_exporter: error: unknown long flag '--nocollector.bfd', try --help

Without collector disablement we will receive on each prometheus query something like

level=error ts=2021-12-16T07:53:54.230Z caller=collector.go:122 msg="collector scrape failed" name=bgp duration_seconds=0.00049952 err="dial unix /var/run/frr/bgpd.vty: connect: no such file or directory"
tynany commented 2 years ago

To disable a default collector, use the --no-collector.$name flag. In your example of trying to disable BFD, use --no-collector.bfd.

I would like to collect feedback -- did you read the REAME, specifically https://github.com/tynany/frr_exporter#collectors? There is an issue open related to this (https://github.com/tynany/frr_exporter/issues/37) and perhaps my assumption people refer to the README is wrong, and I need to include how to disable a collector in the help output.

k0ste commented 2 years ago

I reread even after your mention, and I still need time to find this annotation. All options definitely should exists in --help

Closed in favour #37