LibreNMS と統合する
この記事では、Jira Service Management Cloud の一部のお客様に段階的に展開されている、Jira Service Management でネイティブに利用できる新しいアラート機能を取り上げています。ご利用のサイトにはまだ表示されていないか、利用できない可能性があります。

統合でできるようになること
Jira Service Management の LibreNMS 統合を使用して、LibreNMS は詳細情報と共にアラートを Jira Service Management に転送します。Jira Service Management は LibreNMS アラートのディスパッチャーとして機能し、オンコール スケジュールに基づいて通知すべき担当者を決定します。メール、テキスト・メッセージ (SMS)、電話、iOS や Android のプッシュ通知による通知を行い、アラートが承認またはクローズされるまでアラートをエスカレーションします。
統合による機能
LibreNMS でアラートがトリガーされると、Jira Service Management でアラートが作成されます。
LibreNMS でアラートが承認されると、Jira Service Management でアラートが承認されます。
アラートが LibreNMS でクローズされると、Jira Service Management アラートもクローズされます。
If Send Alert Updates Back to LibreNMS is enabled, actions for LibreNMS are executed in LibreNMS when the chosen action is executed in Jira Service Management for alerts which are created by the LibreNMS integration. (Optional)
統合をセットアップする
LibreNMS は双方向の統合です。設定は次の手順で行います。
Jira Service Management で LibreNMS 統合を追加する
LibreNMS で統合を設定する
LibreNMS 統合を追加する
Bidirectional integrations aren’t supported in Free and Standard plans. All the other integrations are supported at a team level in Free and Standard; however, for their outgoing part to work, you need to upgrade to a higher plan. To add any integration at a site level through Settings
(gear icon) > Products
(under JIRA SETTINGS) > OPERATIONS
, you need to be either on Premium or Enterprise.
統合をチームの運用ページから追加すると、そのチームが統合の所有者になります。つまり、Jira Service Management は、この統合を通じて受信したアラートをチームにのみ割り当てます。
Jira Service Management で LibreNMS 統合を追加するには、次の手順に従います。
チームの運用ページに移動します。
左側のナビゲーション パネルで、[統合] > [統合を追加] の順に選択します。
検索を実行して「LibreNMS」を選択します。
次の画面で、統合の名前を入力します。
オプション: 特定のチームが統合からのアラートを受信するようにする場合は、[Assignee team (担当者チーム)] のチームを選択します。
[Continue] を選択します。
この時点で、統合が保存されます。「統合を設定する手順」セクションを展開して、統合 URL をコピーします。
この URL は、後ほど LibreNMS で統合を設定する際に使用します。[統合をオンにする] を選択します。
統合のために作成したルールは、統合をオンにした場合にのみ機能します。
LibreNMS で統合を設定する
LibreNMS で統合を設定するには、次の手順に従います。
LibreNMS でトップ・メニューの歯車アイコンから [グローバル設定] を開きます。
[アラート設定] タブを選択します。
リストで「Jira Service Management」を検索し、矢印をクリックして展開します。
Webhook の URLを「Jira Service Management URL」フィールドに貼り付けます。
オプション: JEC 経由で統合する
Jira Edge Connector (JEC) と LibreNMS スクリプトを使用して、LibreNMS のアラートをアップデートします。これによって、独自のスクリプトや機能をデプロイして提供された機能を変更し、カスタマイズしたアクションを LibreNMS 上で実行できます。LibreNMS 統合パッケージを使用するには、次のセクションで説明されている手順に従います。
LibreNMS プラグイン・パッケージの最新バージョンをダウンロードします。プラグインのダウンロードとインストールの方法はこちらをご確認ください。
インストール
RedHat ベースのディストリビューションの場合
次のコマンドを実行します。
rpm -i jsm-librenms-<your_version>.rpm
rpm パッケージのインストール中に、パッケージが廃止されたというエラーが表示された場合は、代わりに rpm -i jsm-librenms-<your_version>.rpm --nodeps
をご利用ください。「インストール済みです」というエラーが表示された場合は、代わりに rpm -i jsm-librenms-<your_version>.rpm --force
をご利用ください。
Debian ベースのディストリビューションの場合
次のコマンドを実行します。
dpkg -i jsm-librenms-<your_version>.deb
Windows の場合
JEC パッケージを含む統合 zip ファイルをディレクトリ内に解凍します (C:\jsm\jec が推奨パス)。JEC の実行に関する詳細をご確認ください。
JEC 用に統合を設定する
To use the JEC utility, select Authenticate with Jira Edge Connector only. Other configurations regarding LibreNMS can be done either via integration page or JEC configuration file config.json. The configuration via the integration page precedes the configuration file.
設定パラメーター
次のフィールドはすべて入力が必須です。
apiKey: 以前にコピーした LibreNMS 統合 URL から API キーをコピーします。
url: LibreNMS サーバーの URL。
apiToken: LibreNMS サーバーの API トークン。
The package that you downloaded also includes JEC utility which is located under /usr/local/bin and the script that is needed to be run by JEC which is under /home/jsm/jec/scripts. After the configuration of JEC is done, you need to run it. Read more about running JEC.
JEC に送信されるパラメーターの例
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",
"sendViaJEC": 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\""
}
この内容はお役に立ちましたか?