Discussion:
Zendmd help rrd templates device class
kenhen93
2012-09-19 19:54:21 UTC
Permalink
kenhen93 [http://community.zenoss.org/people/kenhen93] created the discussion

"Zendmd help rrd templates device class"

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

--------------------------------------------------------------
Hi,

I am trying to audit our monitoring and want to get list of what rrd templates are attached to every device classes. I would like a small script to run through every device class and output the device class and the rrd template directly attached to that device class. I need help on the zenDMD part. Once I get that right I know how to get it out of zenDMD and formated into a local file.

I know I can get all of the device classes using

for i in dmd.Devices.getOrganizerNames():

and all the rrd templates using

for i in dmd.Devices.getAllRRDTemplates():

I also know if I also add .Server.Linux onto getAllRRDtemplates like so

for i in dmd.Devices.Server.Linux.getAllRRDTemplates():

I get all of the the rrd templates under /Server/Linux.

I know you can switch to /Server/Linux within zendmd

dmd.Devices.Server.Linux

How would I interate through all device class and get the RRD template attached to them?

Thanks for any help!
--------------------------------------------------------------

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

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]
dpetzel
2012-09-20 02:21:47 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: Zendmd help rrd templates device class"

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

--------------------------------------------------------------
  print org.id
    print "\t{0}".format(template.id)
--------------------------------------------------------------

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

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]
kenhen93
2012-09-20 15:31:02 UTC
Permalink
kenhen93 [http://community.zenoss.org/people/kenhen93] created the discussion

"Re: Zendmd help rrd templates device class"

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

--------------------------------------------------------------
That works great but I really like the output of getOrganizerNames(): but I cannot just sub that in instead of getSubOrganizers as it looks like output will not work to interate through. I tried to see if I could run both loops of getOrganizerNames and getSubOrganziers at the same time and use SubOrganizer to iterate through and have getOrganizerNames just print but I am having trouble. I will say though that I did learn from your statement. Thank you!
--------------------------------------------------------------

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

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]
kb8u
2012-09-20 20:11:40 UTC
Permalink
kb8u [http://community.zenoss.org/people/kb8u] created the discussion

"Re: Zendmd help rrd templates device class"

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

--------------------------------------------------------------
If you want the whole path, change `print org.id` to `print org.getOrganizerName()` in the script above.
--------------------------------------------------------------

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

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]
kenhen93
2012-09-21 14:07:51 UTC
Permalink
kenhen93 [http://community.zenoss.org/people/kenhen93] created the discussion

"Re: Zendmd help rrd templates device class"

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

--------------------------------------------------------------
Thank you! That is what I am looking for
--------------------------------------------------------------

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

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