|
1 | 1 | # netexp |
2 | 2 |
|
3 | 3 | netexp is a Prometheus exporter that provides advanced network usage metrics. |
| 4 | + |
| 5 | +It provides the amount of `transmitted` and `recieved` bytes in each second, |
| 6 | +from the active network interface. besides that, it also provides the maximum `bursts` |
| 7 | +of these two qualities, in different time durations. |
| 8 | + |
| 9 | +By default, the information is based on the pseudo-file `/proc/net/dev` which is |
| 10 | +populated by the Linux kernel. |
| 11 | + |
| 12 | +## Installation |
| 13 | + |
| 14 | +### Using go toolchain |
| 15 | +```go |
| 16 | +go install github.com/layer8co/netexp/cmd/netexp@latest |
| 17 | +``` |
| 18 | + |
| 19 | +## Usage |
| 20 | +```bash |
| 21 | +$ netexp --help |
| 22 | + |
| 23 | +netexp is a Prometheus exporter that provides advanced network usage metrics. |
| 24 | + |
| 25 | +Usage: |
| 26 | + -burst-windows string |
| 27 | + comma-separated burst window durations (default "1s,5s") |
| 28 | + -iface-regexp string |
| 29 | + regexp to match network interface names (default "^(eth\\d+|en[osp]\\d+\\S+|enx\\S+|w[lw]\\S+)$") |
| 30 | + -interval duration |
| 31 | + polling interval (e.g. 500ms, 1s) (default 1s) |
| 32 | + -listen string |
| 33 | + address to listen on (default ":9298") |
| 34 | + -output-windows string |
| 35 | + comma-separated output window durations (default "15s,30s,60s") |
| 36 | + |
| 37 | +$ netexp -listen :9290 |
| 38 | +listening on :9298 |
| 39 | +matched interfaces: enp0s31f6, wlp4s0 |
| 40 | +``` |
| 41 | + |
| 42 | +## Exported metrics |
| 43 | + |
| 44 | +Here is the example output: |
| 45 | +``` |
| 46 | +netexp_recv_bytes 1443950207 |
| 47 | +netexp_trns_bytes 192449225 |
| 48 | +
|
| 49 | +netexp_max_1s_recv_burst_bps_over_15s 11169295 |
| 50 | +netexp_max_1s_trns_burst_bps_over_15s 148677 |
| 51 | +
|
| 52 | +netexp_max_1s_recv_burst_bps_over_30s 11169295 |
| 53 | +netexp_max_1s_trns_burst_bps_over_30s 148677 |
| 54 | +
|
| 55 | +netexp_max_1s_recv_burst_bps_over_1m0s 11169295 |
| 56 | +netexp_max_1s_trns_burst_bps_over_1m0s 148677 |
| 57 | +
|
| 58 | +netexp_max_5s_recv_burst_bps_over_15s 8127323 |
| 59 | +netexp_max_5s_trns_burst_bps_over_15s 114077 |
| 60 | +
|
| 61 | +netexp_max_5s_recv_burst_bps_over_30s 8127323 |
| 62 | +netexp_max_5s_trns_burst_bps_over_30s 114077 |
| 63 | +
|
| 64 | +netexp_max_5s_recv_burst_bps_over_1m0s 8127323 |
| 65 | +netexp_max_5s_trns_burst_bps_over_1m0s 114077 |
| 66 | +``` |
| 67 | + |
| 68 | +- `netexp_recv_bytes` The total number of bytes of data, that has been recieved |
| 69 | + by the interface. which is in our case: 1443950207 |
| 70 | + |
| 71 | +- `netexp_trns_bytes` The total number of bytes of data, that has been recieved |
| 72 | + by the interface. which is in our case: 192449225 |
| 73 | + |
| 74 | +- `netexp_max_{burst-duration}_{direction}_burst_bps_over_{observation-duration}` |
| 75 | +Shows how much the maximum traffic rate observed within specific time windows. |
| 76 | +It basically shows __The Peak Rates__ of the network interface at small time |
| 77 | +windows. |
0 commit comments