Edit:
Sorry - rookie mistake - was looking at the wrong server
It appears that I cannot delete this post. If an admin can do so, please do.
Related to:
opened 08:40AM - 21 Apr 16 UTC
closed 08:18PM - 29 Nov 17 UTC
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
influxdata:master
← bobmshannon:enhancement/net_glob_support
opened 07:09AM - 19 Aug 17 UTC
An approach for fixing #1073.
Adds support for specifying [golang glob](https… ://github.com/gobwas/glob)-style patterns.
**Example**
```
[[inputs.net]]
interfaces = ["en*", "utun[0-1]", "lo0"]
```
```
$ ./telegraf --input-filter net --config telegraf.conf --test
* Plugin: inputs.net, Collection 1
> net,interface=lo0,host=mac bytes_sent=103240327i,packets_sent=227866i,drop_in=0i,drop_out=0i,bytes_recv=103240327i,packets_recv=227866i,err_in=0i,err_out=0i 1503126134000000000
> net,interface=en0,host=macbook packets_sent=13568823i,packets_recv=23715254i,err_in=0i,err_out=0i,drop_out=3193i,bytes_sent=2411560838i,bytes_recv=30527805468i,drop_in=0i 1503126134000000000
> net,interface=en1,host=macbook bytes_sent=0i,drop_out=0i,bytes_recv=0i,packets_sent=0i,packets_recv=0i,err_in=0i,err_out=0i,drop_in=0i 1503126134000000000
> net,interface=en2,host=macbook bytes_recv=0i,packets_sent=0i,packets_recv=0i,err_in=0i,err_out=0i,drop_in=0i,bytes_sent=0i,drop_out=0i 1503126134000000000
> net,interface=utun0,host=macbook bytes_sent=268i,packets_sent=3i,err_in=0i,drop_in=0i,drop_out=0i,bytes_recv=0i,packets_recv=0i,err_out=0i 1503126134000000000
> net,interface=utun1,host=macbook bytes_sent=22156i,packets_recv=115i,drop_in=0i,drop_out=0i,bytes_recv=20275i,packets_sent=108i,err_in=0i,err_out=0i 1503126134000000000
```
### Required for all PRs:
- [x] Signed [CLA](https://influxdata.com/community/cla/).
- [x] Associated README.md updated.
- [x] Has appropriate unit tests.
We have some hosts which have many docker containers with virtual ports being spun up and shut down. This leads to Grafana graphs having dozens of entries.
It appears from the above that interface_exclude
has been considered, but never implemented, so I’ve gone with tagdrop
, rather than a list of globs to include (because that’s messy).
Here’s the relevant part of my telegraf.conf:
[[inputs.net]]
ignore_protocol_stats = true
[inputs.net.tagdrop]
interface = ["veth*"]
This query on the influxdb database:
SHOW SERIES WHERE "interface"='veth1b1d609'
Returns:
{"results":[{"series":[{"columns":["key"],"values":[["net,interface=veth1b1d609,server=blah"]]}]}]}
So the two tags are server
and interface
, yes?
I restart telegraf with the new configuration, drop the series in influxdb, just to make sure, and 60s later, it’s back again.
I’ve tried explicitly dropping veth1b1d609
, just to check.
I’ve tried ["*veth*"]
instead of ["veth*"]
, just in case the server name was included.
What am I missing, here?
Frustrated.
Thanks.