Opsgenie を Sumo Logic と統合する
このドキュメントでは、Sumo Logic を Opsgenie の統合プラットフォームである Sumo Logic と Sumo Logic (レガシー) で利用可能な両方のバージョンと統合する方法について説明します。どちらの統合でも手順は同じです。ただし、ペイロードを操作する際には、正しい統合バージョンをご参照ください。
Opsgenie が Sumo Logic ユーザーに提供するもの
Opsgenie は Sumo Logic との双方向の統合を提供します。Opsgenie アラートでアクションが発生すると、Webhook データが Sumo Logic に転送されます。また、Sumo Logic はOpsgenie に Webhook アラートを送信し、Opsgenie はこれらのアラートのディスパッチャーとして機能して、オンコール スケジュールに基づいて通知する適切な担当者を決定します。メール、テキスト メッセージ (SMS)、電話、iPhone、Android のプッシュ通知によって通知し、アラートが承認されるかクローズされるまでアラートをエスカレートします。
統合の機能性
スケジュールされた検索またはモニターが Sumo Logic でアラートをトリガーすると、Opsgenie でアラートが自動的に作成されます。
モニターがアラートを解決すると、対応する Opsgenie アラートが Opsgenie でクローズします。
Opsgenie でアラート アクションが発生すると、Webhook ペイロードが Sumo Logic に転送されます。
Opsgenie で Sumo Logic インテグレーションを追加する
Opsgenie の Free プランまたは Essentials プランを使用している、または Jira Service Management の Standard プランで Opsgenie を使用している場合は、チーム ダッシュボードからのみこの統合を追加できます。 このプランでは、[設定] の [統合] ページが利用できません。
[チーム] に移動して自分のチームを選択します。
左側のナビゲーションで [統合] を選択し、[統合を追加] を選択します。
統合をチーム ダッシュボードから追加すると、そのチーム統合の所有者になります。Opsgenie では、この統合を通じて受信したアラートはそのチームのみに割り当てられます。このセクションの残りの手順に従って、統合を設定してください。
Go to Settings > Integrations. Search for Sumo Logic and select Add.
Specify who is notified of Sumo Logic alerts using the Responders field. Auto-complete suggestions are provided as you type.
URL をコピーして Sumo Logic で使用します。
To forward alert data to Sumo Logic activate Opsgenie to Sumo Logic field and fill the collector URL which is provided from Sumo Logic.
[Save Integration (統合の保存)] を選択します。
Sumo Logic での設定
Sumo Logic では、スケジュールされた検索とモニターによって Webhook 接続を介して他のツールにアラートが送信されます。Sumo Logic から Opsgenie にアラートを送信するには、最初に Webhook を作成し、それをスケジュールされた検索またはモニターの設定で使用します。
Webhook の作成
Sumo Logic で、[データ管理] > [モニタリング] > [接続] の順に移動します。
[+ Add (+ 追加)] を選択し、接続タイプとして [Webhook] を選択します。
名前を「Opsgenie」として入力し、接続に任意の説明を入力します。
前にコピーした URL を [URL] フィールドに貼り付けます。
次の JSON を [ペイロード] フィールドに入力して [保存] を選択します。
JSON
{
"AlertName": "{{AlertName}}",
"Description": "{{Description}}",
"action": "create",
"AlertURL": "{{AlertResponseURL}}",
"Query": "{{Query}}",
"QueryURL": "{{QueryURL}}",
"TriggerTime": "{{TriggerTime}}",
"TriggerTimeRange": "{{TriggerTimeRange}}",
"TriggerCondition": "{{TriggerCondition}}",
"TriggerValue": "{{TriggerValue}}",
"TriggerType": "{{TriggerType}}",
"ResultsJson": "{{ResultsJSON}}",
"DetectionMethod": "{{DetectionMethod}}",
"MonitorType": "{{MonitorType}}",
"NumQueryResults": "{{NumQueryResults}}",
"SourceURL": "{{SourceURL}}"
}
Sumo Logic (レガシー) 統合を使用している場合は、このペイロードを使用します。
{
"searchName": "{{SearchName}}",
"searchDescription": "{{SearchDescription}}",
"searchQuery": "{{SearchQuery}}",
"searchQueryUrl": "{{SearchQueryUrl}}",
"timeRange": "{{TimeRange}}",
"fireTime": "{{FireTime}}",
"rawResultsJson": "{{RawResultsJson}}",
"numRawResults": "{{NumRawResults}}",
"priority" : "P3",
"aggregateResultsJson" : "{{AggregateResultsJson}}"
}
Sumo Logic から送信されるペイロードのサンプル
JSON
{
"AlertName": "High CPU on public api service",
"Description": "CPU is above 80% all the time for 15 min on public api service",
"action": "create",
"AlertURL": "https://service.eu.sumologic.com/ui/#/alert/00000000000D0E85",
"Query": "metric=cpu_user service=api-service",
"QueryURL": "https://service.eu.sumologic.com/ui/#/metricsv2/cOS9vwBvqBtI76EDRQapYA3nP0NKFLBbFmrViiiM",
"TriggerTime": "2022-03-18 13:34:17 EET",
"TriggerTimeRange": "2022-03-18 13:28:45 EET - 2022-03-18 13:33:45 EET",
"TriggerCondition": "Metric field CPU violates the alert condition \"greater than 80.0 all the time in the last 15 minutes\"",
"TriggerValue": "85.4",
"TriggerType": "Critical",
"ResultsJson": "[{\"CPU\":85.4}]",
"DetectionMethod": "MetricsStaticCondition",
"MonitorType": "Metrics",
"NumQueryResults": "1",
"SourceURL": "https://service.eu.sumologic.com/ui/#/alerts/unified-monitors/000000000000676A?selectedRows=00000000000123BD"
}
この内容はお役に立ちましたか?