• Products
  • Get started
  • Documentation
  • Resources

Integrate Opsgenie with PRTG

Paessler logo

​What does Opsgenie offer to PRTG users?

Opsgenie provides a powerful bidirectional integration with PRTG. When a sensor is down in PRTG, a corresponding Opsgenie alert is automatically created, containing detailed information. Opsgenie provides rich notifications with on-call rotations, scheduling features, and alert escalations to ensure the best monitoring management for PRTG customers. As users execute actions on the alerts acknowledged, the sensor information on PRTG is automatically updated according to mapped actions preferred by the customer.

Functionality of the integration

PRTG to Opsgenie:

  • When "sensor status down" notification is sent form PRTG, it creates an alert in Opsgenie.

    • When "sensor status up" notification is sent from PRTG, the related alert is closed in Opsgenie.

Opsgenie to PRTG:

  • If Send Alert Updates Back to PRTG is enabled, actions for PRTG are executed in PRTG when the chosen action is executed in Opsgenie for alerts which are created by the PRTG.

  • This action mapping feature is explained in detail in the Action Mapping Feature section.

Add PRTG integration in Opsgenie

  1. Go to Opsgenie's PRTG Integration page.

An alternative for this step is to add the integration from the Team Dashboard of the team which will own the integration. To add an integration directly to a team, navigate to the Team Dashboard and open Integrations tab. Click Add Integration and select the integration that you would like to add.

Under the Free and Essentials plans, the tabs under the Team dashboard are limited to Main, Integrations, Members, and Activity Stream.

2. Copy the integration URL to use in PRTG configuration.

3. Click Save Integration.

PRTG integration

Action Mapping Feature

  • Opsgenie allows customers to define action mappings between Opsgenie actions and PRTG actions.

  • To use the Action Mappings feature, provide the information listed below:

PRTG OEC

*Send Via OEC: Check to use on-premise PRTG

  • PRTG Username: API Username obtained from the account settings.

  • PRTG Passhash: API Passhash obtained from the account settings.

  • PRTG URL: The desired URL to use to visit your PRTG page.

For alerts created by PRTG

  • Use this section to map Opsgenie actions to a PRTG action when the source of the alert is PRTG (i.e When the alert is created by PRTG.)

  • Map different Opsgenie actions to different PRTG action. For example, to add "acknowledge a sensor" in PRTG, when the alert is acknowledged in Opsgenie. In order to do this, define If alert is acknowledged in Opsgenie, acknowledge sensor in PRTG mapping in Send Alert Updates Back to PRTG section.

Opsgenie To PRTG Alert

Default Advance Filter Settings of PRTG integration in Opsgenie

PRTG advanced filter settings

Configuration on PRTG

  1. In PRTG, go to "Setup -> Account Settings -> Notification Templates". Click Add new notification.

  2. Select Execute HTTP Action.

  3. Paste the URL copied previously into the "URL" field.

  4. Select the Send SNI radio button and enter your instance's API URL in *Virtual Host (SNI).

  • US Region: api.opsgenie.com

  • EU Region api.eu.opsgenie.com

PRTG execute HTTP action

5. If you use PRTG version 16.x.24. and above paste the content of this text file, otherwise paste the content of this text file into "Postdata" field.

6. Click Save.

PRTG sample alert

Sample alert

Integration via OEC (for On Premise PRTG Usage)

Use Opsgenie’s OEC and the PRTG script to update alerts on PRTG. This enables deployment of your own scripts/ability to modify the ones provided and execute customized actions on PRTG.

To use the PRTG integration package, follow the steps in the sections below through the end.

Download the latest version of OEC

To download the latest version of PRTG packages, please use readme file of oec-scripts repository.

 

Installation

For Red Hat Based Distributions

  • Run following command : 

1 rpm -i opsgenie-prtg-<your_version>.rpm

If while installing the rpm package you get an error saying that the package is obsolated, you need to use "rpm -i opsgenie-prtg-1.0.4-rpm-x86-64.rpm --nodeps" instead.

If you get "is already installed" error, use "rpm -i opsgenie-prtg-1.0.4-rpm-x86-64.rpm --force" instead.

For Debian Based Distributions

  • Run following command : dpkg -i opsgenie-prtg-<your_version>.deb

For Windows

  • Unzip opsgenie integration zip file which contains OEC package into a directory (C:\opsgenie\oec is the preferred path.) Follow the instructions here to install OEC on Windows.

  • In order to learn more about how to run OEC you can refer to the Running OEC documentation.

Configuring PRTG Integration for OEC

  • In order to use OEC utility, enable Send Via OEC.

  • Other configurations regarding PRTG can be done either via integration page or OEC configuration file config.json. The configuration via the integration page precedes the configuration file.

PRTG send via OEC

OEC Configuration

Use Opsgenie’s OEC and the PRTG script to update alerts on PRTG.

To be able to execute actions in PRTG, OEC gets the configuration parameters from the configuration file. The configuration file can be found under /home/opsgenie/oec/conf/config.json.

Configuration parameters

  • apiKey – Copy the API key from the PRTG integration created above.

  • prtgUrlPRTG with subdomain on it. Example https://opsgenie.my-prtg.com

  • usernamePRTG API Username under Account Settings at PRTG.

  • passhashPRTG API Passhash under Account Settings at PRTG.

The package that you downloaded also includes OEC utility which is located under /usr/local/bin and the script that is needed to be run by OEC which is under /home/opsgenie/oec/scripts. After the configuration of OEC is done, you need to run it. In order to learn more about how to run OEC, you can refer to the Running OEC documentation.

Troubleshooting

  1. Former PRTG Integration users can convert the integration to make it work for bidirectional use by adding sensorId, {{sensorId}} key-value pair to Extra Properties field at your PRTG Integration configuration.

  2. If you are having trouble sending execute actions to OpsGenie, enable Send SNI and add opsgenie.com for US, eu.opsgenie.com for EU.

PRTG Execute HTTP Action
Last modified on Apr 9, 2021
Cached at 5:08 AM on Apr 12, 2021 |

Additional Help

Ask the Community