How to load many devices into Zenoss, specifying several characteristics?? There are at least 2 provided with Zenoss and at least 2 provided by public-spirited community people. Some seem to work; some don't. Some are more limited than others.
I have Zenoss 2.3.2 on an Open Suse 10.3 (January 2009). 1) zenbatchload in $ZENHOME/bin. Takes a data file in the format: /Network/Router/Cisco router1 router2 /Ping fred1 fred2 Note there is no /Device on the front of the device class lines. This lets you add devices and assign them to a device class. You cannot setup locations, systems, groups, community names,..... zenbatchload will automatically send SNMP requests out, even if you assign them to the /Ping class so you can waste a huge amount of time if lots of your devices don't support SNMP. They DO get added into Zenoss though and they are assigned to /Ping class (if that's what you specified). There is a hack to zenbatchload by crosse, documented in http://forums.zenoss.com/viewtopic.php?t=4934&highlight=zenbatchload which prevents the snmp poll of devices you put under /Ping in your data file - not tried it though. 2) zendevicedump / zendeviceload in $ZENHOME/bin - though they are just harness files for ExportDevices.py and ImportDevices.py in $ZENHOME/Products/ZenRelations. This gives you a way to dump existing devices out to an xml file, complete with information on device class, performance monitor server, locations, systems and groups. The good news is that the export seems to work, complete with stanzas for systems, locations and groups. I haven't found any way to only export particular devices so potentially you need to hack the xml file if you only want to reimport some of them. The BAD news is that, although the import works and sets device name and class, it DOESN'T seem to get the system, location or groups fields back in - even though you can see the script reporting information on those fields. The import runs an SNMP poll, as does zenbatchload. Looking at the code for ExportDevices, it looks like it should also export description, ProductionState, priority and monitors but I'm pretty sure that it doesn't. It certainly doesn't reimport these fields. 3) Script from jshank to import devices from CSV file with location, reference http://www.zenoss.com/community/wiki/tips-and-tricks/ImportDevicesFromCSVWithLocationInformation/ This allows you to create a simple text, CSV file for input, which includes device name, location, manufacturer, model, groups and device path. It looks like you should be able to easily extend it to include other fields. On my Zenoss 2.3.2 system it fails (this was also reported by tigerknight back in August 2008). The problem seems to be a change in the loadDevice function which no longer appears to have a field for statusMonitors. See my append at http://forums.zenoss.com/viewtopic.php?t=6921 for more information. Basically, the solution seems to be to comment out the line that includes the comment about statusMonitors, and this then works a treat - all the fields get updated, as documented. 4) "Scott's batch loader" - see reference at http://www.zenoss.com/community/docs/howtos/scotts-batch-loader Another community contribution which is driven from a text, csv data file. Designed to import devices into either a /Linux or a /Windows System (creating these Systems if they don't exist). Also has a field to specify Groups and Windows Username and password fields. Looks like it should be easily extensible for other attributes. Works straight off for me. A general comment if you are testing any / all of these scripts and then deleting them from the Zenoss GUI. I got quirky results unless I ran a zendmd window and did a commit() after deletions. I don't understand enough about Python and Zope to know why - anyone help?? Cheers, Jane PS. Should this be a Howto, Wiki entry, tips-and-tricks,... ????? -------------------- m2f -------------------- Read this topic online here: http://forums.zenoss.com/viewtopic.php?p=30371#30371 -------------------- m2f -------------------- _______________________________________________ zenoss-users mailing list [email protected] http://lists.zenoss.org/mailman/listinfo/zenoss-users
