2016-03-09 16:22:34 +00:00
|
|
|
# System Input Plugin
|
|
|
|
|
|
|
|
The system plugin gathers general stats on system load, uptime,
|
2018-04-18 23:55:18 +00:00
|
|
|
and number of users logged in. It is similar to the unix `uptime` command.
|
2016-03-09 16:22:34 +00:00
|
|
|
|
2019-08-06 22:55:06 +00:00
|
|
|
Number of CPUs is obtained from the /proc/cpuinfo file.
|
|
|
|
|
2016-03-09 16:22:34 +00:00
|
|
|
### Configuration:
|
|
|
|
|
|
|
|
```toml
|
|
|
|
# Read metrics about system load & uptime
|
|
|
|
[[inputs.system]]
|
|
|
|
# no configuration
|
|
|
|
```
|
2018-04-18 23:55:18 +00:00
|
|
|
#### Permissions:
|
2016-03-09 16:22:34 +00:00
|
|
|
|
2018-04-18 23:55:18 +00:00
|
|
|
The `n_users` field requires read access to `/var/run/utmp`, and may require
|
2019-06-25 01:48:07 +00:00
|
|
|
the `telegraf` user to be added to the `utmp` group on some systems. If this file does not exist `n_users` will be skipped.
|
2016-03-09 16:22:34 +00:00
|
|
|
|
2018-04-18 23:55:18 +00:00
|
|
|
### Metrics:
|
2016-03-09 16:22:34 +00:00
|
|
|
|
2018-04-18 23:55:18 +00:00
|
|
|
- system
|
|
|
|
- fields:
|
|
|
|
- load1 (float)
|
|
|
|
- load15 (float)
|
|
|
|
- load5 (float)
|
|
|
|
- n_users (integer)
|
|
|
|
- n_cpus (integer)
|
|
|
|
- uptime (integer, seconds)
|
2019-04-11 00:19:29 +00:00
|
|
|
- uptime_format (string, deprecated in 1.10, use `uptime` field)
|
2016-03-09 16:22:34 +00:00
|
|
|
|
|
|
|
### Example Output:
|
|
|
|
|
|
|
|
```
|
2018-04-18 23:55:18 +00:00
|
|
|
system,host=tyrion load1=3.72,load5=2.4,load15=2.1,n_users=3i,n_cpus=4i 1483964144000000000
|
|
|
|
system,host=tyrion uptime=1249632i 1483964144000000000
|
|
|
|
system,host=tyrion uptime_format="14 days, 11:07" 1483964144000000000
|
2016-03-09 16:22:34 +00:00
|
|
|
```
|