Aug 2, 2011 11:43 AM
Help creating custom reports
-
Like (0)
I am trying to get the name and ip of a device class and have the report display an OK or a FAIL if there are any warning/critical/error events. So far I have
for columns. However I get a expression error (even though I have valid python code in the query section) . Is there anyone that can help me out with this ?
Thanks
Here is my query - I do not see what is wrong with it:
Need another equals sign and colon I think
if EventCount == 0:print 'OK'else:print 'FAIL'
Message was edited by: dpetzel
I still can't get the report to work, after that change:
Query error: Python expression error: invalid syntax (PythonExpr, line 1) |
All I really want to do is graph an EventClass and show the Event count next to to the device ID. Any help is appreciated.
Bad news is you can't do what you whant by custom report, or it so complicated. But good news it simply in programming mode. in files print screen and zenpack. I insistently suggest indtall zenpack on test zenoss machine, may be bugy. Also not hard to add filter like in standart .Interface Utilization report.
See more examples in zenoss/Products/ZenReports/
Fill free ask me any questions.
Hi,
I didn't quite understand your reply. I did download your zenpack, so basically the only logic I want to apply to my report is:
if evt.eventClass= "/Some/Class"
Status = "OK"
else:
Status = "FAIL"
It's ridiculously difficult.
if evt.eventClass("/Some/Status") >= 1
Status = "OK"
else:
Status = "FAIL"
Still does not work.
I think I am a step in the right direction now, I used getStatus for the Sort Sense, now I need a simply query to display a OK or FAIL if the status is >1 .
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||