I would like to get the highest severity of events within each subgroups of Groups/A/B. I have seen that getEventPill can return me this information. However, it returns me in an html format with other information I do not want. I was thinking of creating another python function getEventPillME that would be called by another python function getEventPill. The new getEventPillME function will only return the information I want. I was not able to create another getEventPill function (maybe because of "security.declareProtected(ZEN_VIEW, 'getEventPill')").
Is there another more simple way to do it?

The getEventSummary method on DeviceOrganizer might be more what you're looking for. It returns data like the following:

>>> results = dmd.Devices.getEventSummary()
>>> results
[['zenevents_5_noack noack', 1, 1], ['zenevents_4_noack noack', 0, 0], ['zenevents_3_noack noack', 0, 0], ['zenevents_2_noack noack', 0, 0], ['zenevents_1_noack noack', 0, 0]]

It's a list of lists. For example, results[0][0] gives you the number of severity 5 (critical) events that have been acknowledged and results[0][1] gives you the total number of severity 5 events.
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to