0
0
Fork 0
mirror of https://github.com/alerta/alerta-contrib.git synced 2025-03-19 14:43:18 +00:00
alerta_alerta-contrib/plugins/pagerduty/README.md

69 lines
2 KiB
Markdown
Raw Normal View History

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 [![Slack chat](https://img.shields.io/badge/chat-on%20slack-blue?logo=slack)](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.
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"
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'
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.