Discussion:
Zendmd and Groups
joanypony
2013-01-14 12:38:10 UTC
Permalink
joanypony [http://community.zenoss.org/people/joanypony] created the discussion

"Zendmd and Groups"

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

--------------------------------------------------------------
Hi All,

I wish to automate the addition and deletion of devices from Groups. I'm finding it difficult to get/understand even basic information from Zendmd about Groups though.

Baby steps -

How do I list the current groups in Zenoss with zendmd?
How can I list the devices within each group?

Thanks,

Joan
--------------------------------------------------------------

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

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]
joanypony
2013-01-22 10:02:03 UTC
Permalink
joanypony [http://community.zenoss.org/people/joanypony] created the discussion

"Re: Zendmd and Groups"

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

--------------------------------------------------------------
*Nudge* - anyone got any ideas?

Thanks,
Joan
--------------------------------------------------------------

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

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]
Philip Warren
2013-01-22 14:39:46 UTC
Permalink
Philip Warren [http://community.zenoss.org/people/pwarren] created the discussion

"Re: Zendmd and Groups"

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

--------------------------------------------------------------
Here is a dmd snippet which can show all of the groups in the system and all of the devices in each DeviceGroup:

for group in [dmd.Groups] + dmd.Groups.getSubOrganizers():
    print "Group: %s" % group.getPrimaryId()
    for device in group.devices():
        print "  Device: %s" % device.getPrimaryId()


-- Philip
--------------------------------------------------------------

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

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]
joanypony
2013-01-22 14:55:39 UTC
Permalink
joanypony [http://community.zenoss.org/people/joanypony] created the discussion

"Re: Zendmd and Groups"

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

--------------------------------------------------------------
You're a star Philip, that worked a treat -  thanks!

Joan
--------------------------------------------------------------

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

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