Discussion:
events and event details via RESTful
Liam Carey
2013-06-03 03:31:35 UTC
Permalink
Liam Carey [http://community.zenoss.org/people/liam_94609] created the discussion

"events and event details via RESTful"

To view the discussion, visit: http://community.zenoss.org/message/73403#73403

--------------------------------------------------------------
Hello all -

I have an snmptrap coming in from CA/Autosys that has the same OID for multiple failed jobs.

The job ID that has failed is buried in the event detail.

I am trying to dig up the various distinct Jobs that have failed by querying the event tables via JSON API (query and queryArchive in zep.py it seems)

However, the event detail that is return only appears to be the most recent info from the last snmptrap received. Any thoughts on how i can retrieve all the event details for say a particular device or OID snmptrap that was received?

Does the question make sense as stated?


eg . from zep.py (but use detailFormat=True) :

def query(self, limit=0, start=0, sort='lastTime', dir='desc', params=None, exclusion_filter=None, keys=None,page=None, archive=False, uid=None, detailFormat=False):



Regards,

Liam Carey
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73403#73403]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Tim McMahon
2013-06-03 23:03:47 UTC
Permalink
Tim McMahon [http://community.zenoss.org/people/TimMc] created the discussion

"Re: events and event details via RESTful"

To view the discussion, visit: http://community.zenoss.org/message/73460#73460

--------------------------------------------------------------
I'm honestly not sure off the top of my head (haven't looked at Zenoss code in about 6 months).

Zep Facade (to see how events may be queried):
http://dev.zenoss.org/trac/browser/trunk/Products/Zuul/facades/zepfacade.py#L114 http://dev.zenoss.org/trac/browser/trunk/Products/Zuul/facades/zepfacade.py#L114

Zep Service (to see what Google Protocol Buffers are returned):
http://dev.zenoss.org/trac/browser/trunk/protocols/python/zenoss/protocols/services/zep.py http://dev.zenoss.org/trac/browser/trunk/protocols/python/zenoss/protocols/services/zep.py

EventFilter (Google Protocol Buffers for events):
http://dev.zenoss.org/trac/browser/trunk/protocols/interface/src/protobufs/zenoss/protocols/protobufs/zep.proto#L183 http://dev.zenoss.org/trac/browser/trunk/protocols/interface/src/protobufs/zenoss/protocols/protobufs/zep.proto#L183

It might be easier to write a ZenPack that makes use of the above information if the JSON API doesn't support what you're trying to do.

Hope this helps,
Tim.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/73460#73460]

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...