PRTG is a central component of networking monitoring. It is used to monitor the state, health, and performance of everything from servers to networking devices.
Alerts generated in PRTG can trigger incidents in PagerDuty, to alert the appropriate technician via SMS, phone, email or push. The guide below describes how to integrate your PRTG installation with PagerDuty
- From the Configuration menu, select Services.
- On your Services page:If you are creating a new service for your integration, click +Add New Service.
If you are adding your integration to an existing service, click the name of the service you want to add the integration to. Then click the Integrations tab and click the +New Integration button.
- Select your app from the Integration Type menu and enter an Integration Name.
If you are creating a new service for your integration, in General Settings, enter a Name for your new service. Then, in Incident Settings, specify the Escalation Policy, Notification Urgency, and Incident Behavior for your new service.
- Click the Add Service or Add Integration button to save your new integration. You will be redirected to the Integrations page for your service.
- Copy the Integration Email for your new integration:
PRTG Network Monitor can trigger and resolve PagerDuty incidents via email. Below are the steps that are required to setup the communication between PRTG and PagerDuty.
- Open ‘PRTG Enterprise Console‘ from your servers desktop.
- Click on the ‘Setup‘ tab from the Enterprise Console.
- Select ‘Notifications‘ from the menu on your left hand side , then select ‘Add new notification‘.
- Enter in your ‘Notification Name‘ (in this case I used ‘PagerDuty Notification’). Under ‘Notification Summarization’ select ‘Always notify ASAP’. Select the check mark next to ‘Send Email’ and enter in your PagerDuty email endpoint into the ‘Send to Email Address’ field. You can customize the ‘Subject’ and ‘Message’ to the format of your choosing. For this integration everything was left on the default format. Then click ‘Save’.
- We are now going to setup the triggers which can send notifications to PagerDuty via our contact that was just created. This can be done in several ways. For this method we will be using a Parent Trigger which will propagate to the lower children in the class. Select the ‘Devices’ tab and highlight the Parent PRTG Server Connections and select ‘Add State Trigger’.
- Now you will need add the details that defines your trigger. For this trigger we have set the sensor to fire off when it is in a ‘Warning’ state for ‘0’ seconds and it will perform the ‘PagerDuty Notification’ that was created earlier in the guide. You can choose whichever sensor state you’d like for this step, depending on your needs. You can also add a repeat function if the sensor is down for ‘X’ amount of seconds to perform the ‘PagerDuty Notification’ action again. Then select the option to alert the ‘PagerDuty Notification’ when the condition clears.
- Then, select the ‘Notifications’ tab and ensure ‘Inherit all triggers from parent objects and use the triggers defined below’ is selected.
- This should complete your configuration in PRTG and now we need make some additional changes to allow the Auto-Resolve functionality to work properly in PagerDuty
Per your PRTG instance there are several emails that can be sent to PagerDuty depending on what sensor has the failure/warning . In this example we are going to ‘Trigger‘ an incident based off of the ‘Threshold reached‘, ‘Down’ and ‘Warning’ states and ‘Resolve‘ an incident based off of the ‘Down Ended‘, ‘Up‘ and ‘Threshold not reached‘ states.
To enable this option you will need to make the following changes to your PagerDuty PRTG Email Service:
- In your PagerDuty Dashboard select the ‘Configuration‘ dropdown menu and select ‘Services‘.
- Click on your PRTG Email Integration, then click the gear wheel to the right and select ‘edit‘.
- Now under ‘Email Management‘ select the option ‘Create and resolve incidents based on custom rules‘, then create two rules.
- The first rule will be a ‘resolve‘ with the options selected for the ‘Condition’ to ‘The email subject contains Up and Threshold not reached‘ and for the ‘Incident Key‘ field use ‘In the email body, match this regular expression’, and set the expression to: Sensor.([a-zA-Z.0-9\s]+).
- The second rule will be a ‘trigger‘ with the options selected for the ‘Condition‘ to ‘The email subject contains Warning, Down, and Threshold reached‘ and for the ‘Incident Key‘ field use ‘In the email body, match this regular expression’, and set the expression to: Sensor.([a-zA-Z.0-9\s]+).
- Then select the catch all rule to list the following: If an email does not match any of the rules above,’discard it‘.
- Then click ‘Save changes‘.
- Your Service should now look like this:
- Now you should have auto-resolution setup with email parsing for your PRTG email service.
Your PRTG Integration with PagerDuty should now be complete. Now when an alert populates in PRTG you should receive a notification in PagerDuty.
Will PRTG incidents automatically resolve?
Yes. This will need to be configured within your PagerDuty PRTG Email service.
Can I setup PRTG to be tied to multiple PagerDuty services?
Yes, you will need to create multiple PRTG Email Services, then create the additional Contacts within your PRTG server.
Are incidents de-duplicated?
Yes, Incidents are de-duplicated, The incident key is returned for the initial alert that creates the incident.
Is there a 2-way ack-back integration?
Are there logs I can reference in PRTG?
Yes, all alerts are stored and displayed for users within the ‘Logs’ tab in your PRTG UI.
Is there a retry mechanism if the Email call does not succeed?
Yes, this is configured in the ‘trigger‘ for each instance or parent.