-
Notifications
You must be signed in to change notification settings - Fork 29
Nagios Plugin check_temperature
Davide Madrisan edited this page Jul 18, 2021
·
6 revisions
check_temperature - monitors the hardware's temperature
[/etc/nrpe.d/check_temperature]
command[check_temp_zone0]=/usr/lib/nagios/plugins/check_temperature -t 0 -w 80 -c 90
This plugin monitors the hardware's temperature.
It requires the sysfs tree /sys/class/thermal to be mounted and readable.
Copyright (C) 2014-2021 Davide Madrisan <[email protected]>
Usage:
check_temperature [-f|-k] [-t <thermal_zone_num>] [-w COUNTER] [-c COUNTER]
Options:
-f, --fahrenheit use fahrenheit as the temperature unit
-k, --kelvin use kelvin as the temperature unit
-l, --list list all the thermal sensors reported by the kernel
-t, --thermal_zone only consider a specific thermal zone
-w, --warning COUNTER warning threshold
-c, --critical COUNTER critical threshold
-h, --help display this help and exit
-V, --version output version information and exit
Note:
If the option '-t|--thermal_zone' is not specified, then the thermal zone
with the highest temperature is selected. Note that this zone may change
at each plugin execution.
Examples:
check_temperature --list
check_temperature -w 80 -c 90
check_temperature -t 0 -w 80 -c 90
$ ./check_temperature --list
Thermal zones reported by the linux kernel (/sys/class/thermal):
- zone 0 [CPUZ], type "acpitz", critical trip point at 128°C
- zone 1 [GFXZ], type "acpitz", critical trip point at 128°C
- zone 2 [EXTZ], type "acpitz", critical trip point at 128°C
- zone 3 [LOCZ], type "acpitz", critical trip point at 128°C
- zone 4 [BATZ], type "acpitz", critical trip point at 128°C
- zone 5 [PCHZ], type "acpitz", critical trip point at 128°C
- zone 6 [Virtual device], type "pch_skylake", critical trip point at 115°C
- zone 7 [Virtual device], type "iwlwifi_1"
- zone 8 [Virtual device], type "x86_pkg_temp"
$ for i in 0 6 7 8; do ./plugins/check_temperature -t$i; done
temperature OK - +37.0°C (thermal zone: 0 [CPUZ], type: "acpitz") | temp=37C;0;128
temperature OK - +33.0°C (thermal zone: 6 [Virtual device], type: "pch_skylake") | temp=33C;0;115
temperature OK - +30.0°C (thermal zone: 7 [Virtual device], type: "iwlwifi_1") | temp=30C
temperature OK - +38.0°C (thermal zone: 8 [Virtual device], type: "x86_pkg_temp") | temp=38C
temp