• 使用を開始する
  • 関連ドキュメント

End of sales and support for Opsgenie

Atlassian will discontinue new sales of Opsgenie on June 4, 2025 and end support for Opsgenie on April 5, 2027. Read the full announcement and learn about next-generation incident response options via Jira Service Management and Compass.

Opsgenie を Lamp ベースの Nagios と統合する (非推奨)

OpsgenieNagios プラグインは、これを使用すると Opsgenie が提供する詳細な機能を Nagios で利用できるようになるため、統合方法として推奨されます。

インストール

以下の手順では、OpsgenieNagios インテグレーション プラグインを使用して、OpsgenieNagios を統合する方法を説明します。ご使用の Linux ディストリビューションと Nagios 設定によっては、これらの指示に若干の変更が必要になる場合があることにご注意ください。

This document contains only specific instructions for deprecated Nagios integration. For other steps please refer to the new Nagios Integration's document.

前提条件

パッケージは Red Hat および Debian ベースの Linux ディストリビューション用に提供されます。

Opsgenie Nagios プラグインは Java アプリケーションであるため、Java Runtime バージョン 1.6 以上が必要です。オープン JDK と Oracle JVM の両方を使用できます。

JAVA_HOME 環境変数が設定されていることを確認します。そうでない場合は、/etc/opsgenie/profile ファイルの次の行の先頭にあるコメントを削除して設定し、JAVA_HOME を JRE インストール ディレクトリに設定します。
#JAVA_HOME=<path/to/JDK or JRE/install>

Opsgenie で Nagios 統合を追加する

OpsgenieNagios インテグレーションを追加するには、Opsgenie Nagios インテグレーション ページに移動します。

統合を保存するには、[統合を保存] ボタンをクリックします。統合用の「API キー」が生成されます。このキーは、Nagios によって Opsgenie での認証に使用され、Nagios アラートの処理に使用する必要がある統合を指定します。

Nagios 統合

Nagios の Opsgenie プラグイン統合

プラグインは、Opsgenie でアラートを作成、承認、クローズするために lamp (プラグインに含まれる) を使用します。lamp は、HTTPS 経由で Opsgenie サービスと連動するコマンド ライン ユーティリティです。lamp は、アラートを操作したり、ポリシーや統合を有効/無効にしたりするために使用できます。Nagios は、Opsgenie でアラートを作成、承認、クローズするために lamp を使用するように設定されています。

Lamp 設定パラメーターは、/etc/opsgenie/conf/opsgenie-integration.conf ファイルにあります。API キー パラメーターの設定は必須です。その他の設定パラメーターは、ほとんどの Nagios 実装で動作しますが、変更が必要な場合もあります。

設定パラメーター

説明

入力必須

API キー

上記で作成した Nagios 統合から API キーをコピーします。Lamp はこのキーを使用して Opsgenie への認証を行います。API キーは、lamp によって転送されたアラートの処理に使用する必要がある適切な統合構成を識別するためにも用いられます。

はい

nagios.nagiosServer

"nagiosServer" フィールドは OpsgenieNagios サーバーを識別するために使用されます。複数の Nagios サーバーがある場合にのみ必要です。このフィールドは、ユーザーによって実行されたアクション (承認、クローズなど) を OpsgenieNagios サーバーに送り返すときに使用されます。

任意

nagios.attachFiles

有効にすると、lamp は Opsgenie のアラートにヒストグラムとトレンド画像を添付できます。デフォルトは有効になっています。

任意

nagios.alert_histogram_image_url

lamp は、この URL を使用して Nagios からヒストグラム画像を取得します。ローカル ホストを Nagios サーバー アドレスと置き換える必要があります。

任意

nagios.trends_image_url

Lamp は、この URL を使用して Nagios からトレンド画像を取得します。ローカル ホストを Nagios サーバー アドレスと置き換える必要があります。

任意

nagios.command_url

アラートが承認されたとき、コメントを受け取ったときなどに Nagios アラートをアップデートするための URL

任意

nagios.user

Nagios ヒストグラムとトレンド画像を取得するために、Nagios web サーバーを認証するユーザー名。

任意

nagios.Password

Nagios ヒストグラムとトレンド画像を取得するために、Nagios web サーバーを認証するパスワード。

任意

nagios.http.timeout

Nagios ヒストグラムとトレンド画像を取得するためのタイムアウト時間 (ミリ秒)。

任意

統合のテストとトラブルシューティング

統合が期待通りに機能する場合、Nagiosでホストまたはサービスの状態がダウンすると、Opsgenie でアラートが作成されます。ホストやサービスが復帰すると、Opsgenie のアラートも自動的にクローズします。

lamp が Opsgenie にアクセスできることを確認する
Opsgenie でシェルから lamp を使用してテスト アラートを作成します。

テキスト

lamp createAlert --message "nagios test alert" --recipients nobody

Check whether the alert is created in Opsgenie. If not, check the logs for lamp utility in the /var/log/opsgenie/lamp directory for any error messages

opsgeniescripter または opsgeniescriptout ログに「JAVA_HOME」が定義されていないというエラーが表示される場合は、 /etc/opsgenie/profile シェル スクリプトで定義する必要があります。

Verify Nagios is able to create alerts in Opsgenie
Check whether there are alert from Nagios in Opsgenie. If Nagios is generating alerts, but alerts are not being created in Opsgenie, check the logs for lamp utility in the /var/log/opsgenie/lamp directory for any error messages

ログがない場合は、Nagios ユーザーが /var/log/opsgenie/lamp ディレクトリへの書き込み権限を持っていることを確認してください。

Verify graphs are attached to the alerts
Plugin retrieves relevant graphs from the Nagios server via HTTP(S) and attaches them to the alert. If the alerts in Opsgenie do not include these graphs as attached files, it may be due to the plugin not able to access to the Nagios server. Check whether the specified URLs in the configuration file are correct. Check whether these files can be retrieved using curl, etc.

/var/log/opsgenie/lamp ディレクトリにある lamp ユーティリティのログをチェックして、エラーメッセージがないかどうかを確認します

 

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。