Discussion:
JSON example to modify the summary of an event?
jcurry
2013-04-15 15:18:43 UTC
Permalink
jcurry [http://community.zenoss.org/people/jcurry] created the discussion

"JSON example to modify the summary of an event?"

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

--------------------------------------------------------------
Does anyone have a sample they are prepared to share that uses the JSON API to modify the summary of an event? 

I have samples to select events (see the event management paper - http://www.skills-1st.co.uk/papers/jane/zenoss4-events/ http://www.skills-1st.co.uk/papers/jane/zenoss4-events/ ). 
Ryan has an excellent example for manipulating events with the primitives to Ack / Close events ( http://wiki.zenoss.org/ZenDMD_Tip_-_Manipulate_Events http://wiki.zenoss.org/ZenDMD_Tip_-_Manipulate_Events ) but I want to be able to modify any field of an event.  I want to do this from a command notification.

If anyone wants to tell me that this is a really bad idea then please go ahead (provided you say why) :)

Cheers,
Jane
--------------------------------------------------------------

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

Start a new discussion in zenoss-users at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Chet Luther
2013-04-24 22:17:14 UTC
Permalink
Chet Luther [http://community.zenoss.org/people/cluther] created the discussion

"Re: JSON example to modify the summary of an event?"

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

--------------------------------------------------------------
There's technically no way to modify the summary of an existing event through the JSON API. This is because the JSON API is working with "Event Summaries" in the first place which don't actually have a summary field at all.

An "EventSummary" is actually the rollup of multiple events or occurrences that represents one row on the event console. The EventSummary contains information such as uuid, first seen time, last seen time, and etc. It is the most recent occurrence where that summary is kept.

So the easiest way to update the summary that you see is to send another event with the new summary. If you can assign the same eventKey to the original event and the one you create they can be deduplicated and your summary will replace the last.
--------------------------------------------------------------

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

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...