I think that parameters for the loadDevice procedure have changed at some stage. The code referenced at http://www.zenoss.com/community/wiki/tips-and-tricks/ImportDevicesFromCSVWithLocationInformation/ from jshank (thanks jshank!) shows a whole bunch of parameters to the loadDevice call.
The reference at http://www.zenoss.com/community/docs/howtos/add-device also documents loadDevice and its parameters and makes clear that these are positional parameters but you only need to include them upto the ones you are interested in ie. if you want to specify the 8th parameter, you have to specify the previous 7, even if they are null strings, empty lists, whatever - but you don't have to specify parameters that come after number 8 in this case. grep'ing for loadDevice under $ZENHOME/Products/* actually brings up THREE loadDevice definitions, under ZenModel; one is in BatchDeviceLoader.py (which looks very minimal), one in BasicDeviceLoader.py which looks somewhat similar to the structure used by jshank but obviously has fewer fields in a different order, and one in ZDeviceLoader.py which looks awfully, jolly similar to jshank's code. HOWEVER careful inspection of the version in ZDeviceLoader.py shows that the statusMonitors list (2 from the bottom) has disappeared and this fits with the error message that I and tigerknight got - the jshank script is providing a list for the statusMonitor parameter, when ZDeviceLoader is expecting a string for the performanceMonitor parameter. If you simply comment out the line in the jshank script (with a # ) that says: ['localhost'], # statusMonitors=["localhost"], then the script works for me. Make sure that you don't have a blank line at the end of your data file. Cheers, Jane -------------------- m2f -------------------- Read this topic online here: http://forums.zenoss.com/viewtopic.php?p=30369#30369 -------------------- m2f -------------------- _______________________________________________ zenoss-users mailing list [email protected] http://lists.zenoss.org/mailman/listinfo/zenoss-users
