2015-02-02 15:19:08 +00:00
|
|
|
PagerDuty Plugin
|
|
|
|
================
|
|
|
|
|
|
|
|
Send PagerDuty messages for new alerts.
|
|
|
|
|
2016-12-10 19:57:53 +00:00
|
|
|
**Tip: Use this plugin in conjunciton with the PagerDuty webhook which will notify
|
|
|
|
Alerta when a PagerDuty notification has been acknowledged or closed.**
|
|
|
|
|
2020-11-20 21:39:32 +00:00
|
|
|
For help, join [](https://slack.alerta.dev)
|
2016-11-22 10:05:13 +00:00
|
|
|
|
2015-02-02 15:19:08 +00:00
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
|
2016-11-22 10:05:13 +00:00
|
|
|
Clone the GitHub repo and run:
|
|
|
|
|
2015-02-02 15:19:08 +00:00
|
|
|
$ python setup.py install
|
|
|
|
|
2016-11-22 10:05:13 +00:00
|
|
|
Or, to install remotely from GitHub run:
|
|
|
|
|
|
|
|
$ pip install git+https://github.com/alerta/alerta-contrib.git#subdirectory=plugins/pagerduty
|
|
|
|
|
|
|
|
Note: If Alerta is installed in a python virtual environment then plugins
|
|
|
|
need to be installed into the same environment for Alerta to dynamically
|
|
|
|
discover them.
|
2015-02-02 15:19:08 +00:00
|
|
|
|
|
|
|
Configuration
|
|
|
|
-------------
|
|
|
|
|
2016-11-22 10:05:13 +00:00
|
|
|
Add `pagerduty` to the list of enabled `PLUGINS` in `alertad.conf` server
|
|
|
|
configuration file and set plugin-specific variables either in the
|
|
|
|
server configuration file or as environment variables.
|
|
|
|
|
2017-03-30 23:12:44 +00:00
|
|
|
SERVICE_KEY_MATCHERS takes an array of dictionary objects, mapping a regular
|
|
|
|
expression to a PagerDuty API integration key. This allows sending alerts to
|
|
|
|
multiple PagerDuty service integrations, based on 'alert.resource'.
|
|
|
|
|
2016-11-22 10:05:13 +00:00
|
|
|
```python
|
|
|
|
PLUGINS = ['pagerduty']
|
|
|
|
PAGERDUTY_SERVICE_KEY = '' # default="not set"
|
2017-03-30 23:12:44 +00:00
|
|
|
SERVICE_KEY_MATCHERS = [] # default="not set"
|
2015-02-02 15:19:08 +00:00
|
|
|
```
|
|
|
|
|
2016-11-22 10:05:13 +00:00
|
|
|
The `DASHBOARD_URL` setting should be configured to link pushover messages to
|
|
|
|
the Alerta console:
|
|
|
|
|
|
|
|
```python
|
|
|
|
DASHBOARD_URL = '' # default="not set"
|
2015-02-02 15:19:08 +00:00
|
|
|
```
|
|
|
|
|
2016-12-04 20:32:49 +00:00
|
|
|
**Example**
|
|
|
|
|
|
|
|
```python
|
|
|
|
PLUGINS = ['reject', 'pagerduty']
|
|
|
|
PAGERDUTY_SERVICE_KEY = '2a675ee0f6a640098ee05ac9378e4eba'
|
2017-03-30 23:12:44 +00:00
|
|
|
SERVICE_KEY_MATCHERS = [ {"regex":"proxy[\\d+]","api_key":"6b982ii3l8p834566oo13zx9477p1zxd"} ]
|
2016-12-04 20:32:49 +00:00
|
|
|
DASHBOARD_URL = 'https://try.alerta.io'
|
|
|
|
```
|
|
|
|
|
2015-02-02 15:19:08 +00:00
|
|
|
References
|
|
|
|
----------
|
|
|
|
|
2016-11-22 10:05:13 +00:00
|
|
|
* PagerDuty Integration API: https://developer.pagerduty.com/documentation/integration/events/
|
2016-12-10 19:57:53 +00:00
|
|
|
* Alerta PagerDuty Webhook: http://docs.alerta.io/en/latest/integrations.html#pagerduty
|
2016-11-22 10:05:13 +00:00
|
|
|
|
|
|
|
License
|
|
|
|
-------
|
|
|
|
|
|
|
|
Copyright (c) 2016 Nick Satterly. Available under the MIT License.
|