I have set up telegraf to monitor my NAS through SNMP. Everything is working thus far. With this post I am looking for a way to make the setup more efficient.
The situation:
Telegraf is collecting data about all network interfaces with this entry in the telegraf config and writing the results to InfluxDB.
[[inputs.snmp.table]]
oid = "IF-MIB::ifXTable"
[[inputs.snmp.table.field]]
oid = "IF-MIB::ifName"
is_tag = true
The problem:
Basically, I am interested in the network traffic data for the “eth0” and do not really care for other interfaces (maybe eth1, ovs_eth0/1 at some point). The real problem is that telegraf also collects network interface data for all docker containers. I have over 50 containers running on the machine and this is a waste of resources since I do not care for the data. And it makes the Grafana queries on ifXTable really sluggish.
The question:
Since I was not able to find some solution through google research: Is there a way to alter the above stated telegraf config entry to tell telegraf to only collect data from specific network interfaces?
Hello guys:
I would like to implement Hipska’s approach #1. ¿ What do I need to use in order to filter to only send something of my interest to influxDB?
Your helpful hints will be greatly appreciated.
Thanks!
I found a way!
Filtering can be carried out with the tagpass, namepass, fieldpass, tagdrop, and some other keywords.
In my case, I used the tagpass filter, and was able to collect exactly what I needed.
Thanks!