salt.modules.zenoss

Module for working with the Zenoss API

New in version 2016.3.0.

configuration:

This module requires a 'zenoss' entry in the master/minion config.

For example:

zenoss:
  hostname: https://zenoss.example.com
  username: admin
  password: admin123
  verify_ssl: True
  ca_bundle: /etc/ssl/certs/ca-certificates.crt
salt.modules.zenoss.add_device(device=None, device_class=None, collector='localhost', prod_state=1000)

A function to connect to a zenoss server and add a new device entry.

Parameters:
  • device -- (Optional) Will use the grain 'fqdn' by default.

  • device_class -- (Optional) The device class to use. If none, will determine based on kernel grain.

  • collector -- (Optional) The collector to use for this device. Defaults to 'localhost'.

  • prod_state -- (Optional) The prodState to set on the device. If none, defaults to 1000 ( production )

CLI Example:

salt '*' zenoss.add_device
salt.modules.zenoss.device_exists(device=None)

Check to see if a device already exists in Zenoss.

Parameters:

device -- (Optional) Will use the grain 'fqdn' by default

CLI Example:

salt '*' zenoss.device_exists
salt.modules.zenoss.find_device(device=None)

Find a device in Zenoss. If device not found, returns None.

Parameters:

device -- (Optional) Will use the grain 'fqdn' by default

CLI Example:

salt '*' zenoss.find_device
salt.modules.zenoss.set_prod_state(prod_state, device=None)

A function to set the prod_state in zenoss.

Parameters:
  • prod_state -- (Required) Integer value of the state

  • device -- (Optional) Will use the grain 'fqdn' by default.

CLI Example:

salt zenoss.set_prod_state 1000 hostname