Using Puppet or Chef you can deploy the agent, create a new device, start monitoring and inherit group alerts automatically.
Create an API token
- Log in to your Server Density account.
- Click your name in the top left, then click Preferences.
- Go to the Security tab then in the bottom right, enter a name for the API application you're building so you can easily recognise it in the future e.g. "install.sh".
- Press Enter and your API token will be shown as a 32 character ID.
Chef
Download the official Chef cookbook then set up the configuration:
- Set
node['serverdensity']['token']
to the API token you created above. - Set
node['serverdensity']['account']
to your full account URL e.g.example.serverdensity.io
Then include recipe[serverdensity::alerts]
in a run list. This will install the agent and register it automatically against the API.
Optional config
There are many other config options documented in the Chef recipe for configuring other metrics, setting alerts, etc. One important one is putting the new server into a group automatically by setting node['serverdensity']['device_group']
to a group name. This allows you to configure group level alerts and have new servers inherit those alerts by default.
Puppet
Download our official Puppet manifest. It includes a parametised class to handle the install:
class { 'serverdensity_agent': sd_url => 'https://youraccount.serverdensity.io', api_token => 'APITOKENHERE', }
NB: the resulting directory should be named "serverdensity_agent"
This will install the agent and create a new device with monitoring started automatically.
Optional config - group alerts
There are many other optional config options documented in the Puppet manifest for configuring other metrics. One important one is putting the new server into a group automatically. This allows you to configure group level alerts and have new servers inherit those alerts by default.
Set server_group
to a group name for the new server to join.
Comments