Quantcast
Channel: PagerDuty Community - Latest topics
Viewing all articles
Browse latest Browse all 1569

Creating a Generic Email Service

$
0
0

PagerDuty integrates with a number of different monitoring tools. Otherwise, we integrate with any monitoring tool (even in house solutions) using our Generic Email Integration. For detailed instructions on setting up an email integration, see the Generic Email integration document.

To add a generic email service

1. Navigate to the Services Tab.

2. Click on the Add New Service button

3. Enter the service name, select the escalation policy, and select Integrate via email

 

How_to_Integrate_via_Email_with_PagerDuty___PagerDuty.png

 

4. An integration email address is generated for you at the bottom, but you can change it to anything you prefer (i.e. 'critical-alerts')

5. Click on the Add Service button and you will be taken to the service's detail page

6. Copy the integration email address to your clipboard and point your monitoring system to the integration email address. PagerDuty will open and trigger an incident when it receives an email to this integration address. 

 

How_to_Integrate_via_Email_with_PagerDuty___PagerDuty.png

 

7. Below is a test incident triggered by email

 

How_to_Integrate_via_Email_with_PagerDuty___PagerDuty.png

 

 

Fine-tuning email integration

By default, PagerDuty opens a new incident every time an email is received at the integration address. Depending on how your monitoring tool works, this behavior might not be desirable. You can change when PagerDuty creates new incidents in response to emails by adjusting this service’s integration settings. To do this, click the Edit this service link on the right sidebar of the service’s detail page. In the section labeled Integration settings, you’ll see three options:

  • Open a new incident for each trigger email (default): Each email sent to the integration email address will open a new incident.
  • Open a new incident for each new trigger email subject: Emails with the same subject line will be de-duplicated. For example, if PagerDuty previously opened a new incident because it received an email with the subject “Host Down”, then a second email with that same subject will not cause PagerDuty to create a new incident. Instead, the new email will be appended to the existing incident’s activity log.
  • Open a new incident only if an open incident does not already exist: The service can have only one open incident at any time. If an email is received while the service already has an open incident, it will simply be appended to the existing incident’s activity log.

 

How_to_Integrate_via_Email_with_PagerDuty___PagerDuty.png

 

 

Email filters

Filters allow you to disregard certain messages arriving at the integration email address. Each email’s subject, body, and from address can be checked against either a whitelist or blacklist regular expression filter. Messages that don’t pass the filter will be silently discarded. This feature is often used if a monitoring tool sends out emails when a problem has been fixed, or otherwise generates emails that shouldn’t trigger the PagerDuty alerting process.

For example, by default Pingdom will send out emails both when a host becomes unreachable, and when a previously unreachable host recovers. We can set up a filter to ensure that PagerDuty only triggers on emails indicating a host has become unreachable:

  1. Select “Accept email only if it matches ALL of the rules below” from the dropdown for the labelEmail filters.
  2. Select “matches the regex” for the email subject, and enter the regex “DOWN alert” in the textbox beside the dropdown.
  3. Select “matches the regex” for the from address, and enter the regex “alert@pagerduty\.com” in the textbox beside the dropdown
  4. Click the Save changes button at the bottom to save your changes.

 

How_to_Integrate_via_Email_with_PagerDuty___PagerDuty.png

 

For more information about filtering out emails from triggering incidents to your service, you can refer to this article here.

You can also check out the following articles on setting up regex filters:

Getting help writing regular expressions

Regular expression examples

Attachments and email body size

PagerDuty strips all emails from attachments. If you would like to see this feature enabled, please email support@pagerduty.com

We limit the sizes of the email body to 32kb.

 

 


Viewing all articles
Browse latest Browse all 1569

Trending Articles