Module for working with the Zenoss API
New in version 2016.3.0.
requests
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.
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 )
salt '*' zenoss.add_device
salt.modules.zenoss.
device_exists
(device=None)¶Check to see if a device already exists in Zenoss.
device -- (Optional) Will use the grain 'fqdn' by default
salt '*' zenoss.device_exists
salt.modules.zenoss.
find_device
(device=None)¶Find a device in Zenoss. If device not found, returns None.
device -- (Optional) Will use the grain 'fqdn' by default
salt '*' zenoss.find_device
salt.modules.zenoss.
set_prod_state
(prod_state, device=None)¶A function to set the prod_state in zenoss.
prod_state -- (Required) Integer value of the state
device -- (Optional) Will use the grain 'fqdn' by default.
salt zenoss.set_prod_state 1000 hostname