Hardware Sensors
Configuration¶
Computer chip temperature data acquisition using the lm-sensors command (currently only support Linux operating system).
Preconditions¶
- Run the install command
apt install lm-sensors -y - Run the scan command
sudo sensors-detectenterYesfor each question - After running the scan, you will see 'service kmod start' to load the scanned sensors, which may vary depending on your operating system.
Collector Configuration¶
Go to the conf.d/samples directory under the DataKit installation directory, copy sensors.conf.sample and name it sensors.conf. Examples are as follows:
[[inputs.sensors]]
## Command path of 'sensors' usually is /usr/bin/sensors
# path = "/usr/bin/sensors"
## Gathering interval
# interval = "10s"
## Command timeout
# timeout = "3s"
## Customer tags, if set will be seen with every metric.
[inputs.sensors.tags]
# "key1" = "value1"
# "key2" = "value2"
After configuration, restart DataKit.
The collector can now be turned on by ConfigMap Injection Collector Configuration.
Metric¶
For all of the following data collections, a global tag named host is appended by default (the tag value is the host name of the DataKit), or other tags can be specified in the configuration by [inputs.sensors.tags]:
sensors¶
| Tags & Fields | Description |
|---|---|
| adapter ( tag) |
Device adapter |
| chip ( tag) |
Chip id |
| feature ( tag) |
Gathering target |
| hostname ( tag) |
Host name |
| temp*_crit_alarm | Alarm count, '' is the order number in the chip list. Type: int | (gauge) Unit: temperature,C* |
| temp*_input | Current input temperature of this chip, '' is the order number in the chip list. Type: int | (gauge) Unit: temperature,C* |
| tmep*_crit | Critical temperature of this chip, '' is the order number in the chip list. Type: int | (gauge) Unit: temperature,C* |
| tmep*_max | Max temperature of this chip, '' is the order number in the chip list. Type: int | (gauge) Unit: temperature,C* |