Update NetstatCollector to derive bandwidths and use an include list

This commit is contained in:
Thomas Roehl
2022-02-18 02:25:23 +01:00
parent 0152c0dc1e
commit 4e8ee59211
2 changed files with 94 additions and 49 deletions

View File

@@ -3,19 +3,19 @@
```json
"netstat": {
"exclude_devices": [
"lo"
"include_devices": [
"eth0"
]
}
```
The `netstat` collector reads data from `/proc/net/dev` and outputs a handful **node** metrics. If a device is not required, it can be excluded from forwarding it to the sink. Commonly the `lo` device should be excluded.
The `netstat` collector reads data from `/proc/net/dev` and outputs a handful **node** metrics. With the `include_devices` list you can specify which network devices should be measured. **Note**: Most other collectors use an _exclude_ list instead of an include list.
Metrics:
* `bytes_in`
* `bytes_out`
* `pkts_in`
* `pkts_out`
* `net_bytes_in` (`unit=bytes/sec`)
* `net_bytes_out` (`unit=bytes/sec`)
* `net_pkts_in` (`unit=packets/sec`)
* `net_pkts_out` (`unit=packets/sec`)
The device name is added as tag `device`.