- 09 Aug 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Add a Digital Ocean Webhook to an Action Group
- Updated on 09 Aug 2023
- 2 Minutes to read
- Print
- DarkLight
- PDF
Integrating the DigitalOcean alerting service into your Netreo monitoring workflow is fairly straightforward. Simply follow the steps below to create a new action group that will alert your DigitalOcean account with a custom message of your choice that can then be assigned to the alarm configuration of any monitoring check.
First, you'll have to complete some steps in DigitalOcean.
- Log in to your account at the DigitalOcean website.
- Create a Droplet to be notified by Netreo.
- Record the Droplet ID and your authorization token for use in Netreo.
Now you can configure Netreo. Navigate to the Actions Administration page (Administration > Alerts > Actions).
Create a new action group.
Click the Add A Group button at the top of the page. Or, if there is an existing group to which you would like to add a new action, click the add action button in that group's header and skip to the next section.
- In the Add Group dialog:
- In the "GROUP NAME" field, enter a name for this action group (for example, "DigitalOceanAlert").
- No spaces are allowed in action group names.
- In the "MANUAL ALERT ACCESS LEVEL" field, select a user access level for this group.
- This setting allows users of the selected access level and higher to manually run this action group from within an incident.
- Click Add Group to add this action group to Netreo.
- Action groups are selected when configuring alarms for monitoring checks.
- In the "GROUP NAME" field, enter a name for this action group (for example, "DigitalOceanAlert").
Create a new action to add to your action group.
If you just created a new action group, the wizard will automatically direct you to the Add Action dialog. Otherwise, click the add action button in an existing action group's header to open the Add Action dialog.
- In the Add Action dialog:
- In the "ACTION NAME" field, enter a name for this action (for example, "DigitalOcean Action").
- Spaces are allowed in action names.
- Click Add Action to add this action to your action group.
- In the "ACTION NAME" field, enter a name for this action (for example, "DigitalOcean Action").
Create a new method to add to your action.
If you just created a new action, the wizard will automatically direct you to the Add Method dialog. Otherwise, click the add method button in an existing action's header to open the Add Method dialog.
- In the Add Method dialog:
- In the "ACTION METHOD TYPE" field, select "Webhook" from the drop-down. (See Action Group for more information on webhooks.)
- In the "URL" field, enter:
api.digitalocean.com/v2/droplets/<YOUR DROPLET ID>/actions
- In the "PAYLOAD" field, enter:
- [header]
{
- "Content-Type" : "application/json",
- "Authorization" : "Bearer <YOUR AUTHORIZATION TOKEN>"
- }
- [header]
{
- "type" : "<YOUR DIGITALOCEAN ACTION>"
- }
- Be sure to set the "Authorization" field to the correct value for your DigitalOcean account.
- Text contained in angle brackets < > should be replaced with your appropriate values.
- Do not include any angle brackets < > in your payload.
- Click Add Method to add this method to your action.
Select this action group in the alarm configuration of a monitoring check. When that check opens an incident, DigitalOcean will be alerted according to the Netreo incident state change rules.