![]() |
![]() |
Subject: | Get another Datapoint value in Transform |
Author: | [Not Specified] |
Posted: | 2016-01-21 07:09 |
Hi,
Is there any method for getting the current value from another Datapoint for the same device, in the transform-field then the one triggering an event
For example,
An UPS goes online -> event triggered due to Thresholds definition
In that event transform I want both datapoints "UPS Temperature" and "Battery left" inserted in
the evt.message field.
I was hoping for something like this.
Transform
import re
if device: evt.device = device.titleOrId()
match = re.search('threshold of UPS Battery Active exceeded', evt.message)
if match:
temperature = str(device.getRRDValue('UPS Temperature')) #Does not work
battery = str(device.getRRDValue('Battery left')) #Does not work
evt.summary = str(evt.device) + ' Offline'
evt.message = str(evt.device) + ' Offline, (Remaining Battery ' + battery + '%, Current temperature ' + temperature + ' Celsius (C)'
Thanks in advance!
[Zenoss version: 5.0.7]
Subject: | I had exactly this done but |
Author: | [Not Specified] |
Posted: | 2016-01-21 14:01 |
I had exactly this done but can't find the code anymore, the RRD value I stored was injected with a command script and it worked fine. If I find the code I will post it but I might no longer have it. If you come up with it first I will note it down.
Manuel
Subject: | Get another Datapoint value in Transform |
Author: | [Not Specified] |
Posted: | 2016-01-25 09:33 |
Please do, feels like I have hit a brick wall over here. I'm grateful for any assistance.
Andrew
< |
Previous Zenoss 5 One event to close another |
Next Zenping: ping vs nmap |
> |