Here's a script that Chet sent me, you can use it to bulk load  
Locations and their addresses.
http://www.zenoss.com/Members/cluther/batchAddLocations.py/view

Once you have all your Locations with their addresses in place, you  
could probably extend Scott's Batch Loader to get everything sorted  
into the right Locations:
http://www.zenoss.com/community/docs/howtos/scotts-batch-loader

Just add the Location to the devices-to-add.txt to be loaded like this  
(from the wiki page):

        axis-dev1, Linux, 10.9.8.56, "", "",  "/Locations/Denver",  ['/Dev',  
'/Axis', '/Physical Servers']

update the line:
    rexDevInfo = re.compile(r'^\s*(?P<devname>[^,]*),\s*(? 
P<devType>[^,]*),\s*(?P<ipAddr>[^,]*),\s*\"(?P<user>[^\"]*)\",\s*\"(? 
P<pass>[^\"]*)\",\s*\[(?P<groups>[^\]]*)\]$')
to
    rexDevInfo = re.compile(r'^\s*(?P<devname>[^,]*),\s*(? 
P<devType>[^,]*),\s*(?P<ipAddr>[^,]*),\s*\"(?P<user>[^\"]*)\",\s*\"(? 
P<pass>[^\"]*)\"\s*\"(?P<location>[^\"]*)\",\s*\[(?P<groups>[^\]]*)\]$')

after the line:
     d.zWinPassword = m.group('pass')

add the line:
    d.locationPath = m.group('location')

I think that should work.

Thanks,
Matt Ray
Zenoss Community Manager
community.zenoss.com
[email protected]



On Jan 15, 2009, at 4:25 AM, kris wrote:

> Hello!
> I have a problem with load many devices (~3000)  with the help of  
> wget into Zenoss and I need to see all of them in Google map portlet
>
> I do the next:
>
> Code:
> wget -qO- 
> 'http://admin:zen...@zenoss:8080/zport/dmd/DeviceLoader/loadDevice?deviceName=172.12.66.101&zSnmpCommunity=public&devicePath=/ATMS&locationPath=/Town/street'
>
>
>
> So the device will be in /Town group  and in sugroup with the name  
> of the street - /Town/street
>
> But how can I insert to the devices properties  the google map  
> coordinates - the street and building number of the device location?
> When I do it manuall, java script activates when I fill the  
> "Address" form.
>
> Unfortunately I don't no Python at all. I think this problem can be  
> solved with it in order to call java script and insert address into  
> device properties
>
>
>
>
> -------------------- m2f --------------------
>
> Read this topic online here:
> http://forums.zenoss.com/viewtopic.php?p=30068#30068
>
> -------------------- m2f --------------------
>
>
>
> _______________________________________________
> zenoss-users mailing list
> [email protected]
> http://lists.zenoss.org/mailman/listinfo/zenoss-users

_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to