Oh, i guess i figured out how to make lm_sensors work
First make some items like sensor.temp1..5 - they should be Numeric and Units - C
And Type should be ZABBIX agent - not (active) ! It dosn`t send any data in active mode.
And at last here comes section at zabbix_agentd.conf:
UserParameter=sensor.temp1,sudo /usr/bin/sensors|grep "M/B"|awk -F\ '{print $3}'|awk -F° '{print $1}'|awk -F+ '{print $2}'
UserParameter=sensor.temp2,sudo /usr/bin/sensors|grep CPU|awk -F\ '{print $3}'|awk -F° '{print $1}'|awk -F+ '{print $2}'
UserParameter=sensor.temp3,sudo /usr/sbin/hddtemp /dev/hda|awk -F\ '{print $3}'|awk -F° '{print $1}'|awk -F+ '{print $1}'
UserParameter=sensor.temp4,sudo /usr/sbin/hddtemp /dev/hdb|awk -F\ '{print $3}'|awk -F° '{print $1}'|awk -F+ '{print $1}'
UserParameter=sensor.temp5,sudo /usr/bin/sensors|grep CPU|cut -c15-16
The trick is to get pure digits - Type of information : Text didn`t seem work
sensor.temp5 is just another (vs sensor.temp2) realisation of getting cpu temp
First make some items like sensor.temp1..5 - they should be Numeric and Units - C
And Type should be ZABBIX agent - not (active) ! It dosn`t send any data in active mode.
And at last here comes section at zabbix_agentd.conf:
UserParameter=sensor.temp1,sudo /usr/bin/sensors|grep "M/B"|awk -F\ '{print $3}'|awk -F° '{print $1}'|awk -F+ '{print $2}'
UserParameter=sensor.temp2,sudo /usr/bin/sensors|grep CPU|awk -F\ '{print $3}'|awk -F° '{print $1}'|awk -F+ '{print $2}'
UserParameter=sensor.temp3,sudo /usr/sbin/hddtemp /dev/hda|awk -F\ '{print $3}'|awk -F° '{print $1}'|awk -F+ '{print $1}'
UserParameter=sensor.temp4,sudo /usr/sbin/hddtemp /dev/hdb|awk -F\ '{print $3}'|awk -F° '{print $1}'|awk -F+ '{print $1}'
UserParameter=sensor.temp5,sudo /usr/bin/sensors|grep CPU|cut -c15-16
The trick is to get pure digits - Type of information : Text didn`t seem work
sensor.temp5 is just another (vs sensor.temp2) realisation of getting cpu temp