Opsgenie を LibreNMS と統合する

Opsgenie が LibreNMS ユーザーに提供するもの
Opsgenie LibreNMS 統合を使用して、LibreNMS はアラートを詳細情報とともに Opsgenie に転送します。Opsgenie は LibreNMS のアラートのディスパッチャーとして機能して、オンコール スケジュールに基づいて通知する適切な担当者を決定します。メール、テキスト メッセージ (SMS)、電話、iOS、Android のプッシュ通知によって通知し、アラートが確認されるかクローズされるまでアラートをエスカレートします。
統合の機能性
アラートが LibreNMS でトリガーされると、Opsgenie でアラートが作成されます。
LibreNMS でアラートが承認されると、Opsgenie でアラートが承認されます。
アラートが LibreNMS でクローズされると、Opsgenie でアラートがクローズされます。
If Send Alert Updates Back to LibreNMS is enabled, actions for LibreNMS are executed in LibreNMS when the chosen action is executed in Opsgenie for alerts which are created by the LibreNMS integration. (Optional)
Opsgenie で LibreNMS 統合を追加する
Opsgenie の Free プランまたは Essentials プランを使用している、または Jira Service Management の Standard プランで Opsgenie を使用している場合は、チーム ダッシュボードからのみこの統合を追加できます。 このプランでは、[設定] の [統合] ページが利用できません。
[チーム] に移動して自分のチームを選択します。
左側のナビゲーションで [統合] を選択し、[統合を追加] を選択します。
統合をチーム ダッシュボードから追加すると、そのチーム統合の所有者になります。Opsgenie では、この統合を通じて受信したアラートはそのチームのみに割り当てられます。このセクションの残りの手順に従って、統合を設定してください。
Go to Settings > Integrations. Search for LibreNMS and select Add.
Specify who is notified of LibreNMS alerts using the Responders field. Auto-complete suggestions are provided as you type.
Webhook の URL をコピーします。
[Save Integration (統合の保存)] を選択します。
LibreNMS での設定
Open Global Settings from the gear icon on the top menu in LibreNMS.
[アラート設定] タブを選択します。
リストから「Opsgenie」を探し、矢印をクリックして展開します。
Webhook の URL を [Opsgenie URL] フィールドに貼り付けます。
OECを介した統合 (オプション)
Opsgenie の OEC と LibreNMS スクリプトを使用して、LibreNMS のアラートをアップデートします。これによって、独自のスクリプトや機能をデプロイして提供された機能を変更し、カスタマイズしたアクションを LibreNMS 上で実行できます。
LibreNMS 統合パッケージを使用するには、以下のセクションのステップを最後まで実行します。
OEC の最新バージョンをダウンロードする
To download the latest version of LibreNMS package, please use readme file of oec-scripts repository.
インストール
Red Hat ベースのディストリビューションの場合
次のコマンドを実行します。
rpm -i opsgenie-librenms-<your_version>.rpm
rpm パッケージのインストール中にパッケージが廃止されたというエラーが表示された場合は、代わりに "rpm -i opsgenie-librenms-.rpm --nodeps" を使用する必要があります。
「インストール済み」のエラーが表示された場合は、代わりに "rpm -i opsgenie-xmpp-<your_version>.rpm--force" を使用する必要があります。
Debian ベースのディストリビューションの場合
次のコマンドを実行します。
dpkg -i opsgenie-librenms-<your_version>.deb
Windows の場合
OEC パッケージを含む opsgenie integration の zip ファイルをディレクトリ内に解凍します (C:\opsgenie\oec は優先パスです)。
OEC の実行方法について詳しくは、OEC の実行のドキュメントを参照してください。
OEC 用の LibreNMS 統合の設定
OEC ユーティリティを使用するには、[OEC 経由で送信] を有効にします。
Other configurations regarding LibreNMS can be done either via integration page or OEC configuration file config.json. The configuration via the integration page precedes the configuration file.
設定パラメーター
これらはすべて入力が必須です。
apiKey — 上記で作成した LibreNMS 統合から API キーをコピーします。
url – Your LibreNMS server URL.
apiToken – Your LibreNMS server API token.
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.
OEC に送信されるサンプルパラメーター
JSON
{
"type": "libreNMS",
"alertId": "f3b3475f-3859-4bd1-b472-ab339ea1e61d",
"customerId": "4a644594-240d-4a51-ab88-0171ed29c0ce",
"action": "Acknowledge",
"mappedActionV2": {
"name": "ackAlert",
"extraField": ""
},
"integrationId": "1334572c-f412-428c-9ab1-607f8313fba3",
"integrationName": "LibreNMS",
"integrationType": "LibreNMS",
"sendViaOEC": true,
"alertFlowContext": {
"requestId": "9eb36837-e601-12da-92ba-8fe3224230ad",
"traceId": "9eb36837-e601-12da-92ba-8fe3224230ad",
"content": {
"alertId": "f3b3475f-3859-4bd1-b472-ab339ea1e61d"
}
},
"url": "",
"apiToken": "",
"rule": "%macros.device_up = \"1\" && %processors.processor_usage >= \"1\""
}
この内容はお役に立ちましたか?