2017-11-29 07:16:19 +08:00
|
|
|
# Bond Input Plugin
|
|
|
|
|
|
2017-12-15 08:03:29 +08:00
|
|
|
The Bond input plugin collects network bond interface status for both the
|
|
|
|
|
network bond interface as well as slave interfaces.
|
2017-11-29 07:16:19 +08:00
|
|
|
The plugin collects these metrics from `/proc/net/bonding/*` files.
|
|
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
## Configuration
|
2017-11-29 07:16:19 +08:00
|
|
|
|
2022-05-24 21:49:47 +08:00
|
|
|
```toml @sample.conf
|
2022-04-08 06:01:21 +08:00
|
|
|
# Collect bond interface status, slaves statuses and failures count
|
2017-11-29 07:16:19 +08:00
|
|
|
[[inputs.bond]]
|
|
|
|
|
## Sets 'proc' directory path
|
|
|
|
|
## If not specified, then default is /proc
|
|
|
|
|
# host_proc = "/proc"
|
|
|
|
|
|
2022-01-07 06:08:17 +08:00
|
|
|
## Sets 'sys' directory path
|
|
|
|
|
## If not specified, then default is /sys
|
|
|
|
|
# host_sys = "/sys"
|
|
|
|
|
|
2017-11-29 07:16:19 +08:00
|
|
|
## By default, telegraf gather stats for all bond interfaces
|
|
|
|
|
## Setting interfaces will restrict the stats to the specified
|
|
|
|
|
## bond interfaces.
|
|
|
|
|
# bond_interfaces = ["bond0"]
|
2022-01-07 06:08:17 +08:00
|
|
|
|
|
|
|
|
## Tries to collect additional bond details from /sys/class/net/{bond}
|
|
|
|
|
## currently only useful for LACP (mode 4) bonds
|
|
|
|
|
# collect_sys_details = false
|
2017-11-29 07:16:19 +08:00
|
|
|
```
|
|
|
|
|
|
2022-06-08 05:10:18 +08:00
|
|
|
## Metrics
|
2017-11-29 07:16:19 +08:00
|
|
|
|
|
|
|
|
- bond
|
|
|
|
|
- active_slave (for active-backup mode)
|
|
|
|
|
- status
|
|
|
|
|
|
|
|
|
|
- bond_slave
|
|
|
|
|
- failures
|
|
|
|
|
- status
|
2021-09-16 01:56:52 +08:00
|
|
|
- count
|
2022-01-07 06:08:17 +08:00
|
|
|
- actor_churned (for LACP bonds)
|
|
|
|
|
- partner_churned (for LACP bonds)
|
|
|
|
|
- total_churned (for LACP bonds)
|
2017-11-29 07:16:19 +08:00
|
|
|
|
2022-01-07 06:08:17 +08:00
|
|
|
- bond_sys
|
|
|
|
|
- slave_count
|
|
|
|
|
- ad_port_count
|
2017-11-29 07:16:19 +08:00
|
|
|
|
2022-01-07 06:08:17 +08:00
|
|
|
## Description
|
2021-09-16 01:56:52 +08:00
|
|
|
|
2022-01-07 06:08:17 +08:00
|
|
|
- active_slave
|
|
|
|
|
- Currently active slave interface for active-backup mode.
|
|
|
|
|
- status
|
|
|
|
|
- Status of bond interface or bonds's slave interface (down = 0, up = 1).
|
|
|
|
|
- failures
|
|
|
|
|
- Amount of failures for bond's slave interface.
|
|
|
|
|
- count
|
|
|
|
|
- Number of slaves attached to bond
|
|
|
|
|
- actor_churned
|
|
|
|
|
- number of times local end of LACP bond flapped
|
|
|
|
|
- partner_churned
|
|
|
|
|
- number of times remote end of LACP bond flapped
|
|
|
|
|
- total_churned
|
|
|
|
|
- full count of all churn events
|
2017-11-29 07:16:19 +08:00
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
## Tags
|
2017-11-29 07:16:19 +08:00
|
|
|
|
|
|
|
|
- bond
|
|
|
|
|
- bond
|
|
|
|
|
|
|
|
|
|
- bond_slave
|
|
|
|
|
- bond
|
|
|
|
|
- interface
|
|
|
|
|
|
2022-01-07 06:08:17 +08:00
|
|
|
- bond_sys
|
|
|
|
|
- bond
|
|
|
|
|
- mode
|
|
|
|
|
|
2022-06-08 05:10:18 +08:00
|
|
|
## Example Output
|
2017-11-29 07:16:19 +08:00
|
|
|
|
|
|
|
|
Configuration:
|
|
|
|
|
|
2021-11-25 02:55:55 +08:00
|
|
|
```toml
|
2017-11-29 07:16:19 +08:00
|
|
|
[[inputs.bond]]
|
|
|
|
|
## Sets 'proc' directory path
|
|
|
|
|
## If not specified, then default is /proc
|
|
|
|
|
host_proc = "/proc"
|
|
|
|
|
|
|
|
|
|
## By default, telegraf gather stats for all bond interfaces
|
|
|
|
|
## Setting interfaces will restrict the stats to the specified
|
|
|
|
|
## bond interfaces.
|
|
|
|
|
bond_interfaces = ["bond0", "bond1"]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Run:
|
|
|
|
|
|
2022-01-07 06:08:17 +08:00
|
|
|
```bash
|
2021-11-25 02:55:55 +08:00
|
|
|
```shell
|
2017-11-29 07:16:19 +08:00
|
|
|
telegraf --config telegraf.conf --input-filter bond --test
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Output:
|
|
|
|
|
|
2022-01-07 06:08:17 +08:00
|
|
|
```bash
|
2021-11-25 02:55:55 +08:00
|
|
|
```shell
|
2017-11-29 07:16:19 +08:00
|
|
|
* Plugin: inputs.bond, Collection 1
|
|
|
|
|
> bond,bond=bond1,host=local active_slave="eth0",status=1i 1509704525000000000
|
|
|
|
|
> bond_slave,bond=bond1,interface=eth0,host=local status=1i,failures=0i 1509704525000000000
|
|
|
|
|
> bond_slave,host=local,bond=bond1,interface=eth1 status=1i,failures=0i 1509704525000000000
|
2021-09-16 01:56:52 +08:00
|
|
|
> bond_slave,host=local,bond=bond1 count=2i 1509704525000000000
|
2017-11-29 07:16:19 +08:00
|
|
|
> bond,bond=bond0,host=isvetlov-mac.local status=1i 1509704525000000000
|
|
|
|
|
> bond_slave,bond=bond0,interface=eth1,host=local status=1i,failures=0i 1509704525000000000
|
|
|
|
|
> bond_slave,bond=bond0,interface=eth2,host=local status=1i,failures=0i 1509704525000000000
|
2021-09-16 01:56:52 +08:00
|
|
|
> bond_slave,bond=bond0,host=local count=2i 1509704525000000000
|
2017-11-29 07:16:19 +08:00
|
|
|
```
|