summaryrefslogtreecommitdiffstats
path: root/health/notifications/pagerduty/README.md
blob: 30db6379cc7e27a530090ffeb32ec16c122349bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!--
title: "Send alert notifications to PagerDuty"
description: "Send alerts to your PagerDuty dashboard any time an anomaly or performance issue strikes a node in your infrastructure."
sidebar_label: "PagerDuty"
custom_edit_url: https://github.com/netdata/netdata/edit/master/health/notifications/pagerduty/README.md
-->

# Send alert notifications to PagerDuty

[PagerDuty](https://www.pagerduty.com/company/) is an enterprise incident resolution service that integrates with ITOps
and DevOps monitoring stacks to improve operational reliability and agility. From enriching and aggregating events to
correlating them into incidents, PagerDuty streamlines the incident management process by reducing alert noise and
resolution times.

## What you need to get started

- An installation of the open-source [Netdata](/docs/get-started.mdx) monitoring agent.
- An installation of the [PagerDuty agent](https://www.pagerduty.com/docs/guides/agent-install-guide/) on the node
  running Netdata.
- A PagerDuty `Generic API` service using either the `Events API v2` or `Events API v1`.

## Setup

[Add a new service](https://support.pagerduty.com/docs/services-and-integrations#section-configuring-services-and-integrations)
to PagerDuty. Click **Use our API directly** and select either `Events API v2` or `Events API v1`. Once you finish
creating the service, click on the **Integrations** tab to find your **Integration Key**.

Navigate to the [Netdata config directory](/docs/configure/nodes.md#the-netdata-config-directory) and use
[`edit-config`](/docs/configure/nodes.md#use-edit-config-to-edit-configuration-files) to open
`health_alarm_notify.conf`.

```bash
cd /etc/netdata
sudo ./edit-config health_alarm_notify.conf
```

Scroll down to the `# pagerduty.com notification options` section.

Ensure `SEND_PD` is set to `YES`, then copy your Integration Key into `DEFAULT_RECIPIENT_ID`. Change `USE_PD_VERSION` to
`2` if you chose `Events API v2` during service setup on PagerDuty. Minus comments, the section should look like this:

```conf
SEND_PD="YES"
DEFAULT_RECIPIENT_PD="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
USE_PD_VERSION="2"
```

## Testing

To test alert notifications to PagerDuty, run the following:

```bash
sudo su -s /bin/bash netdata
/usr/libexec/netdata/plugins.d/alarm-notify.sh test
```

## Configuration

Aside from the three values set in `health_alarm_notify.conf`, there is no further configuration required to send alert
notifications to PagerDuty.

To configure individual alarms, read our [alert configuration](/docs/monitor/configure-alarms.md) doc or
the [health entity reference](/health/REFERENCE.md) doc.