Skip to content

Commit e254c1b

Browse files
authored
input: network_io_metrics: general documentation improvements (#2285)
- Add "Metrics reported" section with table of output metrics - Add Linux platform availability note - Add hyperlink to Node Exporter metrics plugin - Add verbose and test_at_init options to YAML and conf examples - Standardize config parameter names to lowercase - Sort configuration parameters alphabetically - Fix grammar: "returns something the following" -> "returns output similar to the following" - Improve consistency with other input plugin docs Fixes #2284. Signed-off-by: Eric D. Schabell <eric@schabell.org>
1 parent eb4d867 commit e254c1b

File tree

1 file changed

+32
-15
lines changed

1 file changed

+32
-15
lines changed

pipeline/inputs/network-io-metrics.md

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,38 @@
11
# Network I/O metrics
22

3-
The _Network I/O metrics_ (`netif`) input plugin gathers network traffic information of the running system at regular intervals, and reports them.
3+
The _Network I/O metrics_ (`netif`) input plugin gathers network traffic information of the running system at regular intervals, and reports them. This plugin is available only for Linux.
44

5-
The Network I/O metrics plugin creates metrics that are log-based, such as JSON payload. For Prometheus-based metrics, see the Node Exporter metrics input plugin.
5+
The Network I/O metrics plugin creates metrics that are log-based, such as JSON payload. For Prometheus-based metrics, see the [Node Exporter metrics](node-exporter-metrics.md) input plugin.
6+
7+
## Metrics reported
8+
9+
The following table describes the metrics generated by the plugin. Metric names are prefixed with the interface name (for example, `eth0`):
10+
11+
| Key | Description |
12+
|:-------------------------|:-----------------------------------------------|
13+
| `{interface}.rx.bytes` | Number of bytes received on the interface. |
14+
| `{interface}.rx.packets` | Number of packets received on the interface. |
15+
| `{interface}.rx.errors` | Number of receive errors on the interface. |
16+
| `{interface}.tx.bytes` | Number of bytes transmitted on the interface. |
17+
| `{interface}.tx.packets` | Number of packets transmitted on the interface.|
18+
| `{interface}.tx.errors` | Number of transmit errors on the interface. |
619

720
## Configuration parameters
821

922
The plugin supports the following configuration parameters:
1023

1124
| Key | Description | Default |
1225
|:----------------|:--------------------------------------------------------------------------------------------------------|:--------|
13-
| `Interface` | Specify the network interface to monitor. For example, `eth0`. | _none_ |
14-
| `Interval_Sec` | Polling interval (seconds). | `1` |
15-
| `Interval_NSec` | Polling interval (nanosecond). | `0` |
16-
| `Verbose` | If true, gather metrics precisely. | `false` |
17-
| `Test_At_Init` | If true, testing if the network interface is valid at initialization. | `false` |
18-
| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
26+
| `interface` | Specify the network interface to monitor. For example, `eth0`. | _none_ |
27+
| `interval_nsec` | Polling interval in nanoseconds. | `0` |
28+
| `interval_sec` | Polling interval in seconds. | `1` |
29+
| `test_at_init` | If true, test if the network interface is valid at initialization. | `false` |
30+
| `threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
31+
| `verbose` | If true, gather metrics precisely. | `false` |
1932

2033
## Get started
2134

22-
To monitor network traffic from your system, you can run the plugin from the command line or through the configuration file:
35+
To monitor network traffic from your system, you can run the plugin from the command line or through the configuration file.
2336

2437
### Command line
2538

@@ -29,7 +42,7 @@ Run Fluent Bit using a command similar to the following:
2942
fluent-bit -i netif -p interface=eth0 -o stdout
3043
```
3144

32-
Which returns something the following:
45+
Which returns output similar to the following:
3346

3447
```text
3548
...
@@ -52,10 +65,12 @@ pipeline:
5265
inputs:
5366
- name: netif
5467
tag: netif
68+
interface: eth0
5569
interval_sec: 1
5670
interval_nsec: 0
57-
interface: eth0
58-
71+
verbose: false
72+
test_at_init: false
73+
5974
outputs:
6075
- name: stdout
6176
match: '*'
@@ -68,9 +83,11 @@ pipeline:
6883
[INPUT]
6984
Name netif
7085
Tag netif
86+
Interface eth0
7187
Interval_Sec 1
7288
Interval_NSec 0
73-
Interface eth0
89+
Verbose false
90+
Test_At_Init false
7491

7592
[OUTPUT]
7693
Name stdout
@@ -80,6 +97,6 @@ pipeline:
8097
{% endtab %}
8198
{% endtabs %}
8299

83-
Which calculates using the formula: `Total interval (sec) = Interval_Sec + (Interval_Nsec / 1000000000)`.
100+
Total interval (sec) = `interval_sec` + (`interval_nsec` / 1000000000)
84101

85-
For example: `1.5s = 1s + 500000000ns`
102+
For example: `1.5s` = `1s` + `500000000ns`

0 commit comments

Comments
 (0)