TECHZEN Zenoss User Community ARCHIVE  

Creating device reports using zendmd

Subject: Creating device reports using zendmd
Author: [Not Specified]
Posted: 2014-04-09 23:20

I've been using the following zendmd script to generate a basis .csv for a device report and I would like to add a hostname column but I can't seem to figure how to get that to work. Here is what I'm running now:

#!/usr/bin/env zendmd
for device in dmd.Devices.getSubDevicesGen():
print "%s,%s,%s,%s,%s,%s,%s,%s" % (device.snmpSysName, device.manageIp, device.getLocationName(), device.rackSlot, device.zSnmpVer, device.zSnmpCommunity, device.getProdState(), device.getPriority())

I would like to add an option that checks the A record for every device and throws it into a column. Being new to python this has proven difficult. Any help would be appreciated.

Subject: dns python
Author: [Not Specified]
Posted: 2014-07-07 20:07

to check the a record for every device you would most likely need to install additional python dns libraries.

you will need to install a library such as dnspython
and then here are some examples to help with this.


< Previous
High CPU
Architecture question - Possible for collectors to report to multiple front ends ...