Discussion:
Programatically modifying notifications
Chaskiel Grundman
2012-09-21 16:27:58 UTC
Permalink
Chaskiel Grundman [http://community.zenoss.org/people/cg2v] created the discussion

"Programatically modifying notifications"

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

--------------------------------------------------------------
My site uses a custom notification system (that eventually feeds into SMS). In order to pass extra data about events from zenoss to the notification system, we use a custom format string that sends a bunch more event fields. In Zenoss 3.x, I was able to do this in zendmd (or a custom ZCmd) by iterating over dmd.ZenUsers.getAllActionRules(), making changes to .format and .clearFormat, and committing my zodb changes. I cannot seem to do the same with zenoss 4.1.1. My changes do not seem to be commited to the zodb:

$ zendmd
foo=dmd.NotificationSubscriptions.notificationModificationTest
foo.content['subject_format']
u'[zenoss] ${evt/device} ${evt/summary}'
foo.content['subject_format'] = u'New Thing'
commit()
sync()
bar=dmd.NotificationSubscriptions.notificationModificationTest
bar.content['subject_format']
u'New Thing'
quit()
$ zendmd
bar=dmd.NotificationSubscriptions.notificationModificationTest
bar.content['subject_format']
u'[zenoss] ${evt/device} ${evt/summary}'

Am I doing something wrong, or should I be filing a defect?
--------------------------------------------------------------

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

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