


FAN3 is CPU Fan, FAN2 is first system fan, second System fan is not monitored separately

Zabbix 7.2.2 + zabbix_agent2 on Ubuntu 25.04
apt install -y lm-sensors jq |
Internal zabbix sensors operate only CPU temperature
root@server5:~# zabbix_agent2 -t 'sensor[coretemp-isa-0000,temp1]' sensor[coretemp-isa-0000,temp1] [s|77.000000] root@server5:~# zabbix_agent2 -t 'sensor[nvme-pci-0100,temp1]' sensor[nvme-pci-0100,temp1] [m|ZBX_NOTSUPPORTED] [Cannot obtain sensor information.] root@server5:~# zabbix_agent2 -t 'sensor[iwlwifi_1-virtual-0,temp1]' sensor[iwlwifi_1-virtual-0,temp1] [m|ZBX_NOTSUPPORTED] [Cannot obtain sensor information.] |
vi /etc/zabbix/zabbix_agent2.d/plugins.d/sensors.conf |
UserParameter=sensors.discovery,/etc/zabbix/scripts/discover_sensors.sh UserParameter=sensor.value[*],/etc/zabbix/scripts/get_sensor_value.sh "$1" "$2" |
vi /etc/zabbix/scripts/discover_sensors.sh |
#!/bin/bash
sensors -j | jq -c '
to_entries[] | # iterate over chips
. as $chip |
{
chip: $chip.key,
sensors: ($chip.value | to_entries[] | select(.key != "Adapter") | .value)
} |
{
chip: .chip,
sensors: .sensors | to_entries[] | select(.key | test("temp[0-9]_input")) | .key
} |
{
"{#CHIP}": .chip,
"{#SENSOR}": .sensors
}
' | jq -s '{data: .}'
|
vi /etc/zabbix/scripts/get_sensor_value.sh |
#!/bin/bash
CHIP="$1"
SENSOR="$2"
sensors -j | jq -r --arg chip "$CHIP" --arg sensor "$SENSOR" '
getpath([$chip] + ($sensor | split("/"))) // empty
' |
Check if it is working
# NVME root@server5:~# zabbix_agent2 -t 'sensor.value[nvme-pci-0100,Sensor 2/temp3_input]' sensor.value[nvme-pci-0100,Sensor 2/temp3_input][s|39.850] root@server5:~# zabbix_agent2 -t 'sensor.value[nvme-pci-0100,Sensor 1/temp2_input]' sensor.value[nvme-pci-0100,Sensor 1/temp2_input][s|31.850] root@server5:~# zabbix_agent2 -t 'sensor.value[nvme-pci-0100,Composite/temp1_input]' sensor.value[nvme-pci-0100,Composite/temp1_input][s|31.850] root@server5:~# zabbix_agent2 -t 'sensor.value[nvme-pci-0100,Composite/temp1_max]' sensor.value[nvme-pci-0100,Composite/temp1_max][s|81.850] #Wi-Fi root@server5:~# zabbix_agent2 -t 'sensor.value[iwlwifi_1-virtual-0,temp1/temp1_input]' sensor.value[iwlwifi_1-virtual-0,temp1/temp1_input][s|44.000] # ACPI root@server5:~# zabbix_agent2 -t 'sensor.value[acpitz-acpi-0,temp1/temp1_input]' sensor.value[acpitz-acpi-0,temp1/temp1_input] [s|27.800] CPU Core #4 root@server5:~# zabbix_agent2 -t 'sensor.value[coretemp-isa-0000,Core 3/temp5_input]' sensor.value[coretemp-isa-0000,Core 3/temp5_input][s|76.000] root@server5:~# zabbix_agent2 -t 'sensor.value[coretemp-isa-0000,Core 3/temp5_max]' sensor.value[coretemp-isa-0000,Core 3/temp5_max][s|105.000] zabbix_agent2 -t 'sensor.value[it8613-isa-0a30,fan2/fan2_input]' sensor.value[it8613-isa-0a30,fan2/fan2_input] [s|4383.000] |