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

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 を X-Pack (Elasticsearch Watcher) と統合する

Elastic のロゴ

概要

統合でできるようになること

X-Pack Alerting の統合を使用して、X-Pack Alerting アラートを Opsgenie に転送します。Opsgenie はこれらのアラートのディスパッチャーとして機能して、オンコール スケジュールに基づいて通知する適切な担当者を決定します。メール、テキスト メッセージ (SMS)、電話、iPhone、Android のプッシュ通知によって通知し、アラートが確認されるかクローズされるまでアラートをエスカレートします。

統合による機能

X-Pack Alerting でアラートが発生すると、統合によって Opsgenie でアラートが自動的に作成されます。Opsgenie でアラートが承認されると、そのアラートが X-Pack Alerting で承認されます。

統合をセットアップする

X-Pack Alerting は双方向の統合です。設定は次の手順で行います。

  • OpsgenieX-Pack Alerting の統合を追加する

  • X-Pack Alerting で統合を設定する

X-Pack Alerting の統合を追加する

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

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

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

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

OpsgenieX-Pack Alerting の統合を追加するには、次の手順に従います。

  1. [設定] > [統合] の順に移動します。

  2. [統合を追加] を選択します。

  3. 検索を実行して「X-Pack Alerting」を選択します。

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

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

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

  7. [統合を設定する手順] セクションを展開して、API キーをコピーします。
    このキーは、後ほど X-Pack Alerting で統合を設定する際に使用します。

  8. この記事の「X-Pack Alerting で統合を設定する」セクションに記載されているコードをコピーします。
    このコードは、後ほど X-Pack Alerting で統合を設定する際に使用します。

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

X-Pack Alerting で統合を設定する

  1. Opsgenie で統合を追加する際にコピーしたコードを Elasticsearch に貼り付けます。

  2. Configure alert settings in X-Pack Alerting.
    For more information about X-Pack Alerting, refer to X-Pack Alerting Documentation.

  3. Paste the API key you copied while adding the integration in Opsgenie into [YOUR API KEY].

X-Pack Alerting のその他の設定

(JSON 形式)

PUT _watcher/watch/[WATCH ID] { [OTHER CONFIGURATIONS OF YOUR X-PACK ALERTING ALERT] . . . . . "actions" : { "opsgenie" : { "webhook" : { "scheme" : "https", "method" : "POST", "host" : "api.opsgenie.com", "port" : 443, "path" : "/v1/json/eswatcher", "headers" : { "Content-Type" : "application/json" }, "params": { "apiKey": "[YOUR API KEY]" }, "body" : "{{#toJson}}ctx{{/toJson}}" } } } }

X-Pack Alerting でアラートを承認する

Opsgenie でアラートが承認されたときに X-Pack Alerting でアラートが自動的に承認されるように統合を設定します。

  1. 統合設定ページの [送信] セクションにある [X-Pack Alerting でのアラートの承認] チェックボックスを選択します。

  2. 統合設定を編集し、[Authenticate with an X-Pack Alerting account (X-Pack Alerting アカウントで認証)] を選択します。次の値を設定します。

    1. [X-Pack Alerting Action Id (X-Pack Alerting アクション ID)] にアクション ID を入力します。

    2. Enter your X-Pack Alerting host URL into X-Pack Alerting Host URL. Specify the full URL address as [protocol]://yourserveraddr:[port]. For example: http://yourserver.com:9200

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

ペイロードの例

(JSON 形式)

{ "id": "event_critical_watch_249-2016-09-28T11:31:05.955Z", "vars": {}, "trigger": { "triggered_time": "2016-09-28T11:31:05.955Z", "scheduled_time": "2016-09-28T11:31:05.511Z" }, "execution_time": "2016-09-28T11:31:05.955Z", "watch_id": "event_critical_watch", "payload": { "hits": { "total": 1, "hits": [ { "_type": "event", "_source": { "eventDescription": "System has detected 3 failed login attempts", "eventId": 1, "eventName": "3 failed login attempts", "eventType": "LOG", "eventCategory": "CRITICAL" }, "_id": 1, "_index": "event", "_score": 0.30685282 } ], "max_score": 0.30685282 }, "_shards": { "total": 1, "failed": 0, "successful": 1 }, "timed_out": false, "took": 1 }, "metadata": "null" }

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

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