Zabbix template and script to monitor temperatures returned by a TEMPer usb stick. This could be useful to check datacenter temperature or as a remote thermometer plugged to a raspberry pi.
Tested up to Zabbix 7.0.x
- A TEMPer usb stick
- urwen's temper.py script : https://github.com/urwen/temper
- A working Zabbix client with a configured Zabbix agent.
- For the zabbix_sender way:
- jq
- zabbix sender
- Import the template on the server, then add it to the host equipped with the TEMPer usb device.
template_temper.xmlfor the regular pull way (Server will ask agent, recommended)template_temper_sender.xmlfor the push way (Agent will push data to the server)
mkdir -p /etc/zabbix/scripts
- Install urwen's script into the
/etc/zabbix/scriptsdirectory - Adjust permissions
chown -R zabbix: /etc/zabbix/scripts/chmod +x /etc/zabbix/scripts/temper/temper.py
If needed, add a system.run key in the AllowKey config of your Zabbix Agent.
- Install this current script into the same directory
git clone https://github.com/ThibautPlg/TEMPer-Zabbix.git
mv TEMPer-Zabbix/TEMPer_zabbix.sh /etc/zabbix/scripts/
chown -R zabbix: /etc/zabbix/scripts/
chmod +x /etc/zabbix/scripts/TEMPer_zabbix.sh
- Customize
TEMPer_zabbix.shto match your environment if needed
vim /etc/zabbix/scripts/TEMPer_zabbix.sh
- Add a crontab entry (user zabbix or root required)
# Zabbix TEMPer USB probe
*/1 * * * * /etc/zabbix/scripts/TEMPer_zabbix.sh 1>/dev/null 2>/dev/null