• 製品
  • 使用を開始する
  • 関連ドキュメント
  • リソース

Opsgenie を PRTG と統合する

Paesler ロゴ

概要

What does the integration offer?

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.

How does the integration work?

PRTG to Opsgenie

  • "センサーステータスダウン" 通知が PRTG から送信されると、Opsgenie でアラートが作成されます。

  • PRTG から "センサーステータスアップ" 通知が送信されると、Opsgenie で関連するアラートが閉じられます。

Opsgenie to PRTG

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

The mapping feature is explained in detail in “Map alert actions” in this article.

Set up the integration

PRTG is a bidirectional integration. Setting it up involves the following steps:

  • Add a PRTG integration in Opsgenie

  • Map alert actions

  • Configure the integration in PRTG

Add a PRTG integration

Opsgenie の Free プランまたは Essentials プランを使用している、または Jira Service Management の Standard プランで Opsgenie を使用している場合は、チーム ダッシュボードからのみこの統合を追加できます。このプランでは、[設定] の [統合] ページが利用できません。

  1. [チーム] に移動して自分のチームを選択します。

  2. 左側のナビゲーションで [統合] を選択し、[統合を追加] を選択します。

統合をチーム ダッシュボードから追加すると、そのチーム統合の所有者になります。Opsgenie では、この統合を通じて受信したアラートはそのチームのみに割り当てられます。このセクションの残りの手順に従って、統合を設定してください。

To add a PRTG integration in Opsgenie:

  1. Go to Settings > Integrations.

  2. Select Add integration.

  3. Run a search and select “PRTG”.

  4. 次の画面で、統合の名前を入力します。

  5. オプション: 特定のチームが統合からのアラートを受信するようにする場合は、[Assignee team (担当者チーム)] のチームを選択します。

  6. [続行] を選択します。
    この時点で、統合が保存されます。

  7. Expand the Steps to configure the integration section and copy the integration URL.
    You will use this URL while configuring the integration in PRTG later.

  8. [統合をオンにする] を選択します。
    統合のために作成したルールは、統合をオンにした場合にのみ機能します。

Map alert actions

You can define mappings between Opsgenie actions and PRTG actions (also when the source of the alert is PRTG), which requires additional authentication for your PRTG account.

  1. Select Edit on the configuration page to edit the integration.

  2. Under the Authenticate for sending alert updates to PRTG section, select Authenticate with a PRTG account check box.

  3. Enter values for the following:

    • Username: The email address from your PRTG account settings

    • Passhash: The passhash from your PRTG account settings

    • PRTG URL: The URL of your PRTG login page

  4. [保存] を選択します。

  5. Expand the Outgoing section.

  6. Select Send alert updates back to PRTG check box.

  7. Select alert actions for which you want to send updates back to PRTG.
    Every time an action you selected happens, a corresponding sensor is acknowledged in PRTG.

Configure the integration in PRTG

  1. In PRTG, go to Setup > Account Settings > Notification Templates.

  2. Select Add new notification > Execute HTTP Action.

  3. Paste the URL you copied while adding the integration in Opsgenie into URL.

  4. Select Send SNI and enter the URL from Step 3 into the domain and subdomain fields of Virtual Host (SNI).

  5. Copy the POST data (from the file linked to, as applicable) and paste it into Postdata.

    1. For PRTG version 16.x.24. and above, use this post data.

    2. For other versions, use this post data.

  6. [保存] を選択します。

Authenticate via OEC (for on-premise PRTG)

Opsgenie Edge Connector (abbreviated as OEC) is a prerequisite for configuring the outgoing authentication of PRTG integration. You can combinedly use OEC and PRTG scripts to update alerts on PRTG. With this setup, you can deploy your own script, modify the ones provided, or run customized actions on PRTG.


STEP 1. Download and install the PRTG package from this repository.

Instructions for RedHat-based distributions

次のコマンドを実行します。 

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

If you figure that the rpm package is obsolete, run the following command instead:

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

If you figure that the rpm package is already installed, run the following command instead:

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

Instructions for Debian-based distributions

次のコマンドを実行します。 

1 dpkg -i opsgenie-prtg-<your_version>.deb

Instructions for Windows

  1. Unzip Opsgenie integration zip file (contains the OEC package) into a directory.
    For example: C:\opsgenie\oec

  2. Install OEC by following these instructions.

Lear more about running OEC


STEP 2: Configure the PRTG integration for OEC

  1. In Opsgenie, go to the integration configuration page.

  2. Expand the Outgoing section.

  3. Select the Authenticate with Opsgenie Edge Connector only check box.

You can make the other configuration through the integration configuration page or the OEC configuration file, config.json. The configuration set through the integration configuration page takes precedence over what’s in config.json.


STEP 3: Configure OEC

Use OEC and the PRTG script to update alerts on PRTG. To run actions in PRTG, OEC gets the configuration parameters from the configuration file, config.json (found at /home/opsgenie/oec/conf).

設定パラメーター

  • apiKey – The API key you copied while adding the integration in Opsgenie

  • prtgUrl – The PRTG URL with a subdomain in it. Example: https://opsgenie.my-prtg.com

  • username – The PRTG API username under Account Settings in PRTG

  • passhash – The PRTG API passhash under Account Settings in PRTG

The downloaded package includes the OEC utility (found in /usr/local/bin) and the script that OEC needs to run (found in /home/opsgenie/oec/scripts). Be sure to run OEC after configuring it.

Lear more about running OEC


Troubleshoot issues

  • If you have an older setup of the integration and want to make it work bidirectionally, add sensorId, {{sensorId}} key-value pair to alert properties in your PRTG Integration configuration.

  • If you are having trouble sending execute actions to Opsgenie, enable Send SNI.

その他のヘルプ