[Zenoss 3.1.0] I'm using a command data source to monitor my emergency standby generator via modbus using this script: https://github.com/tallakt/modbus-cli and it works great for collecting battery voltage and coolant temperature, this stuff graphs very nicely.
I also want to monitor and alarm on the generator operation state and control status. The modbus polling script will return a simple integer for operation state like:
"40011 0"
I add a little formatting manipulation to the command string syntax so I get a nagios-type result into Zenoss:
"GenControl | ControlState=0"
The states are:
0 = Stopped
1 = Start Pending
2 = Warm-up at Idle
3 = Running
4 = Cool down at Rated
5 = Cool down at Idle
Now, I could just set a threshold max of 0, and get a threshold alarm for all other activity, but that is lame... I would like to translate these to generate alerts such as "Generator Running". I suspect I can use some event transform juju to make this happen by translating the event summary of "threshold of ControlState not met: current value 1.00"... but it seems like a messy solution, and I wonder if I am missing a better option??
Thank you