Batch loading or modifying devices

Use the zenbatchload command to load devices into the system or modify device properties. The utility creates new device classes automatically, and by default, models each device.
Before you can load or modify devices, you need a text file to use as input. You can use a file created by the batch dump utility (zenbatchdump), or create a text file that specifies the following information for each device:
  • Zenoss Core device class where the device should be loaded, for example, Linux SSH or SNMP, Windows WMI or WinRM, Network, Storage.
  • Device name (resolvable hostname for the device or IP address and descriptive name).
  • Optional: Provide additional data for device classes or individual devices; for example, login credentials, specific IP address if DNS resolution is not available, and the collector on which to load the device.
Configuration file syntax is as follows.
/Devices/Destination/Device/Class
Hostname | IP-Address [option='value' [, option='value'] …]
Hostname | IP-Address [option='value' [, option='value'] …]
The following command options might be helpful. For information about all options or a sample configuration file, run the following commands:

zenbatchload -- help

zenbatchload -- sample_configs

  • --nocommit - Perform a test run of the batch load process; do not commit changes to the ZODB. If necessary, edit your configuration file.
  • --nomodel - Do not model the remote devices. You must be able to commit changes to the ZODB.
The following example shows SNMP, SSH, and Windows monitored devices:
/Devices/Server  zSnmpCommunity='underwriting'

/Devices/Server/Linux
linuxsnmp.hypothetical.loc

/Devices/Server/Microsoft/Windows zWinKDC='winkdc.hypothetical.loc', zWinRMPassword='Zenny456', zWinRMUser='zenmonitor@hypothetical.loc'
windows.hypothetical.loc

/Devices/Server/SSH/Linux  zCommandPassword='Zenny123', zCommandUsername='zenmonitor'
linuxssh.hypothetical.loc

/Devices/Server/Linux/WordPress zDeviceTemplates=['Device', 'Apache'] 
wordpress.hypothetical.loc

For additional ways to add and discover devices, see Adding, discovering and modeling devices.

  1. Log in to the Control Center host as a user with serviced CLI privileges.
  2. Start a shell in a Zope service container.
    serviced service shell zope
    This command mounts /mnt/pwd so you can use files that exist on the host.
  3. Change to the zenoss user.
    su - zenoss
  4. Load devices and components that are listed in a text file into Zenoss Core.
    zenbatchload mydevicelist.txt
  5. Exit from the zenoss user shell in the container.
    exit
  6. Exist from the Zope container shell.
    exit