salt.states.serverdensity_device

Monitor Server with Server Density

2014.7.0 新版功能.

Server Density Is a hosted monitoring service.

警告

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

注解

This state module requires a pillar for authentication with Server Density:

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

注解

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.

范例:

'server_name':
  serverdensity_device.monitored
salt.states.serverdensity_device.monitored(name, group=None, salt_name=True, salt_params=True, **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.
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: CentOS