2020-08-12 04:10:41 +08:00
|
|
|
# LM Sensors Input Plugin
|
2016-06-24 16:18:02 +08:00
|
|
|
|
2022-06-09 05:22:56 +08:00
|
|
|
Collect [lm-sensors](https://en.wikipedia.org/wiki/Lm_sensors) metrics -
|
|
|
|
|
requires the lm-sensors package installed.
|
2016-06-24 16:18:02 +08:00
|
|
|
|
2022-06-09 05:22:56 +08:00
|
|
|
This plugin collects sensor metrics with the `sensors` executable from the
|
|
|
|
|
lm-sensor package.
|
2016-06-24 16:18:02 +08:00
|
|
|
|
2022-10-27 03:58:36 +08:00
|
|
|
## Global configuration options <!-- @/docs/includes/plugin_config.md -->
|
|
|
|
|
|
|
|
|
|
In addition to the plugin-specific configuration settings, plugins support
|
|
|
|
|
additional global and plugin configuration settings. These settings are used to
|
|
|
|
|
modify metrics, tags, and field or create aliases and configure ordering, etc.
|
|
|
|
|
See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
|
|
|
|
|
2023-01-12 23:55:21 +08:00
|
|
|
[CONFIGURATION.md]: ../../../docs/CONFIGURATION.md#plugins
|
2022-10-27 03:58:36 +08:00
|
|
|
|
2021-11-25 02:50:13 +08:00
|
|
|
## Configuration
|
|
|
|
|
|
2022-05-24 21:49:47 +08:00
|
|
|
```toml @sample.conf
|
2016-06-24 16:18:02 +08:00
|
|
|
# Monitor sensors, requires lm-sensors package
|
2023-03-02 05:22:29 +08:00
|
|
|
# This plugin ONLY supports Linux
|
2016-06-24 16:18:02 +08:00
|
|
|
[[inputs.sensors]]
|
|
|
|
|
## Remove numbers from field names.
|
|
|
|
|
## If true, a field name like 'temp1_input' will be changed to 'temp_input'.
|
|
|
|
|
# remove_numbers = true
|
2018-05-23 04:59:59 +08:00
|
|
|
|
|
|
|
|
## Timeout is the maximum amount of time that the sensors command can run.
|
|
|
|
|
# timeout = "5s"
|
2016-06-24 16:18:02 +08:00
|
|
|
```
|
|
|
|
|
|
2022-06-09 05:22:56 +08:00
|
|
|
## Metrics
|
2021-11-25 02:50:13 +08:00
|
|
|
|
2020-05-14 15:41:58 +08:00
|
|
|
Fields are created dynamically depending on the sensors. All fields are float.
|
2016-06-24 16:18:02 +08:00
|
|
|
|
2022-06-09 05:22:56 +08:00
|
|
|
### Tags
|
2016-06-24 16:18:02 +08:00
|
|
|
|
|
|
|
|
- All measurements have the following tags:
|
2021-11-25 02:50:13 +08:00
|
|
|
- chip
|
|
|
|
|
- feature
|
2016-06-24 16:18:02 +08:00
|
|
|
|
2021-11-25 02:50:13 +08:00
|
|
|
## Example Output
|
2016-06-24 16:18:02 +08:00
|
|
|
|
2021-11-25 02:50:13 +08:00
|
|
|
### Default
|
|
|
|
|
|
|
|
|
|
```shell
|
2017-05-13 06:22:29 +08:00
|
|
|
$ telegraf --config telegraf.conf --input-filter sensors --test
|
2016-06-24 16:18:02 +08:00
|
|
|
* Plugin: sensors, Collection 1
|
|
|
|
|
> sensors,chip=power_meter-acpi-0,feature=power1 power_average=0,power_average_interval=300 1466751326000000000
|
|
|
|
|
> sensors,chip=k10temp-pci-00c3,feature=temp1 temp_crit=70,temp_crit_hyst=65,temp_input=29,temp_max=70 1466751326000000000
|
|
|
|
|
> sensors,chip=k10temp-pci-00cb,feature=temp1 temp_input=29,temp_max=70 1466751326000000000
|
|
|
|
|
> sensors,chip=k10temp-pci-00d3,feature=temp1 temp_input=27.5,temp_max=70 1466751326000000000
|
|
|
|
|
> sensors,chip=k10temp-pci-00db,feature=temp1 temp_crit=70,temp_crit_hyst=65,temp_input=29.5,temp_max=70 1466751326000000000
|
|
|
|
|
```
|
|
|
|
|
|
2021-11-25 02:50:13 +08:00
|
|
|
### With remove_numbers=false
|
|
|
|
|
|
|
|
|
|
```shell
|
2016-06-24 16:18:02 +08:00
|
|
|
* Plugin: sensors, Collection 1
|
|
|
|
|
> sensors,chip=power_meter-acpi-0,feature=power1 power1_average=0,power1_average_interval=300 1466753424000000000
|
|
|
|
|
> sensors,chip=k10temp-pci-00c3,feature=temp1 temp1_crit=70,temp1_crit_hyst=65,temp1_input=29.125,temp1_max=70 1466753424000000000
|
|
|
|
|
> sensors,chip=k10temp-pci-00cb,feature=temp1 temp1_input=29,temp1_max=70 1466753424000000000
|
|
|
|
|
> sensors,chip=k10temp-pci-00d3,feature=temp1 temp1_input=29.5,temp1_max=70 1466753424000000000
|
|
|
|
|
> sensors,chip=k10temp-pci-00db,feature=temp1 temp1_crit=70,temp1_crit_hyst=65,temp1_input=30,temp1_max=70 1466753424000000000
|
|
|
|
|
```
|