Discussion:
Exporting alerting rules
Apoorv Chincholkar
2012-04-30 09:58:46 UTC
Permalink
Apoorv Chincholkar [http://community.zenoss.org/people/EISEN] created the discussion

"Exporting alerting rules"

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

--------------------------------------------------------------
Hello,
Is it possible to somehow 'export' the alerting rules through zenpacks or is there any other alternative method?
Actually I'm setting up monitoring systems which will be running the exact same configuration.

Please let me know the solution.
--------------------------------------------------------------

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

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]
cgriebel
2012-04-30 12:58:36 UTC
Permalink
cgriebel [http://community.zenoss.org/people/cgriebel] created the discussion

"Re: Exporting alerting rules"

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

--------------------------------------------------------------
There is a report called "Notification Schedules" that you should start with.  If you want a real export you can start with this:
#!/usr/bin/env python

import Globals
from Products.ZenUtils.ZenScriptBase import ZenScriptBase

dmd = ZenScriptBase(connect=True).dmd

print ','.join(('user id', 'alert id', 'enabled?'))
for stuff in [(r.getUserid(), r.id, r.enabled) for r in dmd.ZenUsers.getAllActionRules()]:
    print ','.join(map(str,stuff))
--------------------------------------------------------------

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

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