sensu-plugins / sensu-plugins-network-checks

This plugin provides native network instrumentation for monitoring and metrics collection, including: hardware, TCP response, RBLs, whois, port status, and more.
http://sensu-plugins.io
MIT License
30 stars 76 forks source link

How can I filter out all veth* interfaces. #112

Open soichih opened 5 years ago

soichih commented 5 years ago

Is there a way to hide interfaces that starts with "veth"? My graphite DB is filling up with tons of metrics from this plugin, and I'd like to filter them out if possible.

$ ./metrics-netif.rb
test.veth0cbff6b.rx_kB_per_sec 0.0 1566912465
test.veth0cbff6b.tx_kB_per_sec 0.0 1566912465
test.veth4a7e2fd.rx_kB_per_sec 0.88 1566912465
test.veth4a7e2fd.tx_kB_per_sec 1.6 1566912465
test.vethc2bac1e.rx_kB_per_sec 0.81 1566912465
test.vethc2bac1e.tx_kB_per_sec 1.59 1566912465
test.veth47902d8.rx_kB_per_sec 0.25 1566912465
test.veth47902d8.tx_kB_per_sec 0.83 1566912465
test.lo.rx_kB_per_sec 0.0 1566912465
test.lo.tx_kB_per_sec 0.0 1566912465
test.veth7df096d.rx_kB_per_sec 0.07 1566912465
test.veth7df096d.tx_kB_per_sec 0.06 1566912465
test.vethd47e902.rx_kB_per_sec 0.0 1566912465
test.vethd47e902.tx_kB_per_sec 0.0 1566912465
test.vethe993f5f.rx_kB_per_sec 0.0 1566912465
test.vethe993f5f.tx_kB_per_sec 0.0 1566912465
test.veth987aa56.rx_kB_per_sec 0.26 1566912465
test.veth987aa56.tx_kB_per_sec 0.27 1566912465
test.veth8cd1ca9.rx_kB_per_sec 0.0 1566912465
test.veth8cd1ca9.tx_kB_per_sec 0.0 1566912465
test.vethe97552e.rx_kB_per_sec 0.0 1566912465
test.vethe97552e.tx_kB_per_sec 0.0 1566912465
test.veth00be40e.rx_kB_per_sec 0.0 1566912465
test.veth00be40e.tx_kB_per_sec 0.0 1566912465
test.veth8aeeeac.rx_kB_per_sec 0.0 1566912465
test.veth8aeeeac.tx_kB_per_sec 0.0 1566912465
jindraj commented 4 years ago

Until this issue is resolved you can do following 1) add following line

^PREFIX\..*\.if\.veth.*

into /etc/carbon/blacklist.conf

2) add

USE_WHITELIST = true

into /etc/carbon/carbon.conf

3) restart carbon

notes: