Hello All,
On Feb 28, 2007, at 8:16 PM, David Carmean wrote:
On Wed, Feb 28, 2007 at 10:38:47AM +0400, Will Froning wrote:
Hello All,
I have a flat file with some 300+ switches each with unique snmp
communities. How can I import these into zenoss?
Use wget and the REST API:
To add a new device:
wget 'http://admin:[EMAIL PROTECTED]:8080/zport/dmd/DeviceLoader/
loadDevice?deviceName=NEWDEVICE&devicePath=/Server/Linux'
# deviceName - the name or IP of the device. If its a name it must
resolve in DNS
# devicePath - the device class where the first "/" starts at "/
Devices" like "/Server/Linux" the default is "/Discovered"
# tag - the tag of the device
# serialNumber - the serial number of the device
# zSnmpCommunity - snmp community to use during auto-discovery if
none is given the list zSnmpCommunities will be used
# zSnmpPort - snmp port to use default is 161
# zSnmpVer - snmp version to use default v1 other valid values are v2
# rackSlot - the rack slot of the device.
# productionState - production state of the device default is 1000
(Production)
# comments - any comments about the device
# hwManufacturer - hardware manufacturer this must exist in the
database before the device is added
# hwProductName - hardware product this must exist in the
manufacturer object specified
# osManufacturer - OS manufacturer this must exist in the database
before the device is added
# osProductName - OS product this must exist in the manufacturer
object specified
# locationPath - path to the location of this device like "/
Building/Floor" must exist before device is added
# groupPaths - list of groups for this device multiple groups can
be specified by repeating the attribute in the url
# systemPaths - list of systems for this device multiple groups can
be specified by repeating the attribute in the url
# statusMonitors - list of status monitors (zenping) for this
device default is "localhost"
# performanceMonitor - performance monitor to use default is
"localhost"
# discoverProto - discovery protocol default is "snmp" other
possible value is "none"
To add a new Location:
wget 'http://admin:[EMAIL PROTECTED]:8080/zport/dmd/DeviceLoader/
addLocation?newLocationPath=/PATH/NAME'
NOTE: see .../Products/ZenModel/ZDeviceLoader.py for other
available methods.
This worked perfectly.
Thanks,
Will
--
Will Froning
Sr. Systems Architect
American University of Sharjah
PO Box 26666
Sharjah, UAE
Tel: (9716) 515-2124
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users