TECHZEN Zenoss User Community ARCHIVE  

Event Transform to update another event

Subject: Event Transform to update another event
Author: [Not Specified]
Posted: 2016-07-05 17:25

All,

I am writing a ZenPack to pick a message off of ActiveMQ that is a response from an ITSM ticketing system containing the ticket number or other information that I would like to apply back to the original ticketing Zenossevent that came from a Trigger/Notification. My first thought was to create an event in Zenoss, with its own Event Classfrom the ActiveMQ message and use the event transform to update the original ticekting event. I am fairly new to Zenoss and am seeing several examples using getEventDetail(), but I am using Zenoss 5.1.2 and it doesn't work. The closest I think I have gotten is:

from Products.Zuul import getFacade, listFacades
from zenoss.protocols.jsonformat import from_dict
from zenoss.protocols.protobufs.zep_pb2 import EventSummary
from Products.ZenEvents.events2.proxy import EventSummaryProxy

annotate_event = evt.summary.split(':')

zep = getFacade('zep')

zep.addNote(annotate_event[0], annotate_event[1], userName='admin')

This give me an error stating it can't connect to the ZEP.

BTW, the reason for the approach was so I could create event updates easilyand not have to updateZenPack code when wanting to add or change update methods.

Any suggestions on a better approach or how to resolve the transform error

Thanks in advance.

-Ian



< Previous
Windows File Sytems missing
  Next
mysql and memcached high memory usage
>