wget https://github.com/imkebe/zabbix3-rpi/archive/master.zip

unzip master.zip cd zabbix3-rpi-master sudo dpkg -i zabbix-server-mysql_3.0.*+jessie_armhf.deb sudo dpkg -i zabbix-frontend-php_3.0.*+jessie_all.deb sudo dpkg -i zabbix-agent_3.0.*+jessie_armhf.deb sudo service apache2 reload

this will take long, just wait until all data injected.

change zabbix server config to use db password:

sudo vi /etc/zabbix/zabbix_server.conf, and modify DBPassword=.

change timezone for php:

sudo vi /etc/apache2/conf-enabled/zabbix.conf

php_value date.timezone America/Toronto

create gettemp.sh to pull data from sensor


Usage: gettemp.sh

e.g. gettemp.sh 28-0215012018ff

SENSOR=$1 SLAVE=”/sys/devices/w1_bus_master1/$SENSOR/w1_slave” OUTPUT=$(/bin/cat $SLAVE | /usr/bin/awk -F ‘t=’ ‘{ printf $2 }') echo $OUTPUT

“gettemp.sh 28-0215012018ff” will show you temperature output.

add “extend . temp1 /bin/bash /opt/scripts/gettemp.sh 28-021500ce50ff” at the end of snmpd.conf then run “snmpwalk -v 2c -c public .” will show your what snmp trap can get. and this will later be the input data for Zabbix to draw.

So now go to zabbix server, run through installation page and login with default account: admin/zabbix.

enable PI as a host and add snmp interface.

create an new item called “temp_28-0315909092ff”, use SNMPv2, choose snmp interface, give it a key name “temp.28-0315909092ff”(sth that unique), SNMP OID”.”(one that you’d get from snmpwalk script, any of those with correct input will work), community “public”, type of info “float”, unit “‘C”(easier identifier for C degree), custom multiplier"0.001”(because output of temp is like 21437, so this make it easier to read), then save.

then go to graph to create a new look, add this new item and you can see the graph in monitoring tab now!

UserParameter=temp.room.0,/home/pi/gettemp.sh 28-0315909092ff

So in this way, a new KEY temp.room.0 will be added into zabbix database with a value of the output of “gettemp.sh 28-0315909092ff”.

you can also test with this key by “zabbix_agentd -t temp.room.0”

reboot zabbix-agent and load this new key under host items, along with other options to create a new graph.