We are doing something somewhat similar.

We need to get the actual CPU value of a device and send that to an event 
command to do something with it (in a nutshell).

What I've done is create a (MinMax) threshold (severity 'Info') for the device 
and set its max value to 1, meaning that an event gets created every time it 
collects the CPU. 
This event gets created in a custom Event Class (/Perf/CPU/Filer). 
In that Event Class I have a transform:

Code:
evt.summary = evt.message.split()[6]


This is pretty much your parser .. couldn't find a cleaner way. 
The 7th element in the string, in our case, is the actual CPU value.

I then set an Event Command under the Event Manager, which gets triggered any 
time an event comes in for Event Class /Perf/CPU/Filer.
This command can use the ${evt/summary}, which now is the CPU value.
So you could 'echo ${evt/summary} > /tmp/size' to store it on the filesystem 
for further use or whatever else ..

This is quite a workaround for something that seems should be pretty simple .. 
but it does work well for us and I couldn't really think of another way (except 
maybe the rrdfetch, which we're using somewhere else as well).




-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=30570#30570

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to