Testing ZenCommands

You can test ZenCommand data sources by using the zentestcommand shell script.

  1. Log in to the Control Center host as a user with serviced CLI privileges.
  2. Attach to the zenhub service.
    serviced service attach zenhub
  3. Change to the zenoss user.
    su - zenoss
  4. Run the zentestcommand script.
    zentestcommand –d DeviceID --datasource=DataSourceName

    where DeviceID is the ID of the device on which you want to run the command, and DataSourceName is the name of a data source on a template associated with the device.

    The zentestcommand script prints the results of the command to standard output.