Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Zabbix - monitoring a Trend IQ4E BMS system


Recommended Posts

Posted (edited)

I spent part of today setting up monitoring of our boilers in Zabbix. We have a Trend IQ4E controller that runs them, which doesn't have SNMP as far as I can find, but it does have an XML interface you can activate via Modules -> Networks -> Ethernet.

 

So, to do this you need zabbix_sender, curl, sed and xmlstarlet installing on a linux machine.

 

The following script returns the values of 2 digital inputs (which in our case are the 2 boilers fault status, I5 and I10) and 2 sensors (the 2 zone temperatures, S4 and S7). It outputs a file called sender.txt with the format:

 

host key value

 

host is the name of the host you'll add later in Zabbix, key is the name of the item on that host, and value is the actual value returned from the Trend. Edit this file to do what you need.

 

#!/bin/bash
function write_zabbix_file
{
cat <<-_EOF_
boiler Boiler_1 $(sed '1q;d' data.txt)
boiler Boiler_2 $(sed '2q;d' data.txt)
boiler Zone_R_Y $(sed '3q;d' data.txt)
boiler Zone_B_P $(sed '4q;d' data.txt)
_EOF_
}
curl -k -s -o data.xml "http://boilerhostaddress/ws/tsite.xml?&Request=I5(I),I10(I),S7(V),S4(V)"
xmlstarlet sel -t -m "//Param" -v @[u][url="http://www.edugeek.net/member.php?u=95584"]Val[/url][/u]ue -n data.xml > data.txt
write_zabbix_file>sender.txt
zabbix_sender -z zabbixserveraddress -s "boiler" -i sender.txt
rm data.*
rm sender.txt

 

You'll want to edit and place this script somewhere where your cron user can run it and create files. Make sure you make it executable with chmod. I opted to make a directory in /opt/queryTrend

 

On Zabbix, create a host with the name you put as host earlier. Now create an item for each line of the sender.txt file - of type "Zabbix trapper". Name it however you want, but set the Key to the key field you put in the file above (Boiler_1, Boiler_2 etc... for mine). For things like temperatures, choose numeric (float) as the type. Application can either be one you already have or create a new one - I created 2 - Status and Temp.

 

Now, use crontab to schedule your script to run at the frequency you want.

 

Zabbix should receive the data as specified. You can now set up triggers, graphs etc as you need.

Edited by localzuk

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...