Assuming you have already connected your PagerDuty and Statushub accounts (if not you can do that here).
Let's improve the power of this connection with PTRG. 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.
Once you connect PTRG with your PagerDuty account, alerts generated in PRTG will trigger incidents in PagerDuty, and in turn, update your Statushub.
The guide below describes how to integrate your PRTG installation with PagerDuty.
In PagerDuty:
Create a new service:
- In your account, under the Configuration tab, select Services from the dropdown menu.
- Click ‘Add New Service’.
- Enter a ‘Name’ for the service and select an escalation policy. Then select ‘PRTG’ from the drop down menu. An ‘Integration email’ address is generated for you at the bottom, but you can change it to anything you prefer (e.g. “critical-alerts”).
- Click the ‘Add Service’ button.
- Once the service is created, you’ll be taken to the service page. On this page, you’ll see the ‘Integration Email’, which you will need when you configure PRTG Notification to send events to PagerDuty.
In PRTG:
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 in 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 to add the details that define 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 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 to make some additional changes to allow the Auto-Resolve functionality to work properly in PagerDuty
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 /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 all text between ‘Sensor: and )”.
- 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. This will, in turn, update your StatusHub Page.
Comments
0 comments
Article is closed for comments.