salt.states.serverdensity_device

Monitor Server with Server Density

New in version 2014.7.0.

Server Density Is a hosted monitoring service.

Warning

This state module is beta. It might be changed later to include more or less automation.

Note

This state module requires a pillar for authentication with Server Density To install a v1 agent:

serverdensity:
  api_token: "b97da80a41c4f61bff05975ee51eb1aa"
  account_url: "https://your-account.serverdensity.io"

To install a v2 agent:

serverdensity:
  api_token: "b97da80a41c4f61bff05975ee51eb1aa"
  account_name: "your-account"

Note

Although Server Density allows duplicate device names in its database, this module will raise an exception if you try monitoring devices with the same name.

Example:

'server_name':
  serverdensity_device.monitored
salt.states.serverdensity_device.monitored(name, group=None, salt_name=True, salt_params=True, agent_version=1, **params)

Device is monitored with Server Density.

name

Device name in Server Density.

salt_name

If True (default), takes the name from the id grain. If False, the provided name is used.

group

Group name under with device will appear in Server Density dashboard. Default - None.

agent_version

The agent version you want to use. Valid values are 1 or 2. Default - 1.

salt_params

If True (default), needed config parameters will be sourced from grains and from status.all_status.

params

Add parameters that you want to appear in the Server Density dashboard. Will overwrite the salt_params parameters. For more info, see the API docs.

Usage example:

'server_name':
  serverdensity_device.monitored
'server_name':
  serverdensity_device.monitored:
    - group: web-servers
'my_special_server':
  serverdensity_device.monitored:
    - salt_name: False
    - group: web-servers
    - cpuCores: 2
    - os: '{"code": "linux", "name": "Linux"}'