Telegraf: input system net filters ?

Created on 21 Apr 2016  路  5Comments  路  Source: influxdata/telegraf

Hi,

In the input "system net", there is a parameter to include interface. Is it possible to use "eth*" ?

Also, is it possible to have an exclude parameter ?
For exemple to exclude all 'tap' interfaces.

Regards

Most helpful comment

that's a good idea, I'll work on making that a glob filter

All 5 comments

that's a good idea, I'll work on making that a glob filter

We just ran into this. We have hosts which run hundreds of containers each with two interfaces. And we were regularly seeing telegraf consume 150% CPU continually even though we were dropping all of the container interfaces with tagdrop glob rules. We even saw this in logs:

2016/06/07 14:58:30 ERROR: input [net] took longer to collect than collection interval (15s)

When we switch to limit to only a few interfaces with interfaces = ["eth0", "br0"] then the CPU usage dissappears.

But we'd really like to be able to use globs here. We have heterogeneous deployments across multiple providers with different network topologies which means that the interfaces we care about might be named one of about 8 different things although there are usually only 2 or 3 per host that we want to report on.

We could of course use Chef to write out a custom config file for each node based on the actually installed interfaces, but that is a decent amount of work and we really prefer to keep things as simple and consistent as possible.

@sparrc any update on progress here. We were about to open an issue and offer to fix this - seems trivial to do. I'll hold off if you are working on it already but we could contribute if you didn't get around to it yet?

Behaviour I propose I think is the same as you are discussing here:

  • allow simple glob patterns like eth*
  • (obviously) don't assume there must be a match (unlike non-glob arguments)

@banks ping, did you ever get around to working on this?

No sorry. I'd completely forgotten actually... we stuck with hard coded list of possible external interfaces to avoid all the hundreds of container veths.

Added in #3140

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timhallinflux picture timhallinflux  路  3Comments

hluaces picture hluaces  路  3Comments

Isonami picture Isonami  路  3Comments

Xiol picture Xiol  路  3Comments

fahimeh2010 picture fahimeh2010  路  3Comments