Skip to content

Commit 1727167

Browse files
authored
Merge pull request #1754 from fluent/lynettemiles/sc-136187/update-fluent-bit-docs-pipeline-inputs-network
2 parents aa890d9 + a81c265 commit 1727167

File tree

1 file changed

+29
-19
lines changed

1 file changed

+29
-19
lines changed

pipeline/inputs/network-io-metrics.md

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
1-
# Network I/O Metrics
1+
# Network I/O metrics
22

3-
The **netif** input plugin gathers network traffic information of the running system every certain interval of time, 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.
44

5-
The Network I/O Metrics plugin creates metrics that are log-based, such as JSON
6-
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 input plugin.
76

8-
## Configuration Parameters
7+
## Configuration parameters
98

109
The plugin supports the following configuration parameters:
1110

1211
| Key | Description | Default |
1312
| :--- | :--- | :--- |
14-
| Interface | Specify the network interface to monitor. e.g. eth0 | |
15-
| Interval\_Sec | Polling interval \(seconds\). | 1 |
16-
| Interval\_NSec | Polling interval \(nanosecond\). | 0 |
17-
| Verbose | If true, gather metrics precisely. | false |
18-
| Test\_At\_Init | If true, testing if the network interface is valid at initialization. | false |
19-
| Threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
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` |
2019

21-
## Getting Started
20+
## Get started
2221

23-
In order to monitor network traffic from your system, you can run the plugin from the command line or through the configuration file:
22+
To monitor network traffic from your system, you can run the plugin from the command line or through the configuration file:
2423

25-
### Command Line
24+
### Command line
25+
26+
Run Fluent Bit using a command similar to the following:
2627

2728
```bash
28-
$ bin/fluent-bit -i netif -p interface=eth0 -o stdout
29+
bin/fluent-bit -i netif -p interface=eth0 -o stdout
30+
```
31+
32+
Which returns something the following:
33+
34+
```text
2935
Fluent Bit v1.x.x
3036
* Copyright (C) 2019-2020 The Fluent Bit Authors
3137
* Copyright (C) 2015-2018 Treasure Data
@@ -39,12 +45,13 @@ Fluent Bit v1.x.x
3945
[3] netif.0: [1499524462.002612971, {"eth0.rx.bytes"=>98, "eth0.rx.packets"=>1, "eth0.rx.errors"=>0, "eth0.tx.bytes"=>98, "eth0.tx.packets"=>1, "eth0.tx.errors"=>0}]
4046
```
4147

42-
### Configuration File
48+
### Configuration file
4349

44-
In your main configuration file append the following _Input_ & _Output_ sections:
50+
In your main configuration file append the following `Input` and `Output` sections:
4551

4652
{% tabs %}
4753
{% tab title="fluent-bit.conf" %}
54+
4855
```python
4956
[INPUT]
5057
Name netif
@@ -56,9 +63,11 @@ In your main configuration file append the following _Input_ & _Output_ sections
5663
Name stdout
5764
Match *
5865
```
66+
5967
{% endtab %}
6068

6169
{% tab title="fluent-bit.yaml" %}
70+
6271
```yaml
6372
pipeline:
6473
inputs:
@@ -71,9 +80,10 @@ pipeline:
7180
- name: stdout
7281
match: '*'
7382
```
83+
7484
{% endtab %}
7585
{% endtabs %}
7686
77-
Note: Total interval \(sec\) = Interval\_Sec + \(Interval\_Nsec / 1000000000\).
87+
Which calculates using the formula: `Total interval (sec) = Interval_Sec + (Interval_Nsec / 1000000000)`.
7888

79-
e.g. 1.5s = 1s + 500000000ns
89+
For example: `1.5s = 1s + 500000000ns`

0 commit comments

Comments
 (0)