We're updating our terminology in Jira

'Issue' is changing to 'work item'. You might notice some inconsistencies while this big change takes place.

New Relic ワークフローと統合する

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

2023 年現在の New Relic の新ロゴ

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

Jira Service Management では、New Relic ワークフローとのネイティブ統合を利用できます。この統合を使用して、New Relic の課題を詳細情報とともに Jira Service Management API に送信します。Jira Service Management は New Relic 課題のディスパッチャーとして機能し、オンコール スケジュールに基づいて通知する適切な担当者を決定します。メール、テキスト メッセージ (SMS)、電話、iPhone、Android のプッシュ通知によって通知し、アラートが確認されるかクローズされるまでアラートをエスカレートします。

このドキュメントでは、Jira Service ManagementNew Relic から受信するデータの統合と詳細を設定する方法について説明します。

統合による機能

  • New Relic ワークフローでアラートが作成されると、統合により Jira Service Management でもアラートが自動的に作成されます。

  • New Relic ワークフローでアラートがクローズされると、統合により関連するアラートも Jira Service Management で自動的にクローズされます。

  • New Relic ワークフローでアラートが承認されると、統合により Jira Service Management でも関連するアラートが自動的に承認されます。

統合をセットアップする

New Relic は API ベースの統合です。設定は次の手順で行います。

  • Jira Service ManagementNew Relic 統合を追加する

  • New Relic で統合を設定する

New Relic 統合を追加する

双方向統合は Free プランと Standard プランではサポートされていません。他のすべての統合は FreeStandard でチーム レベルでサポートされています。ただし、送信統合を機能させるには、上位のプランにアップグレードする必要があります。Settings (歯車アイコン) > Products (Jira 設定の下) > OPERATIONS からサイト レベルで統合を追加できるのは、Premium プランと Enterprise プランのみです。

統合をチームの運用ページから追加すると、そのチームが統合の所有者になります。つまり、Jira Service Management は、この統合を通じて受信したアラートをチームにのみ割り当てます。

Jira Service ManagementNew Relic 統合を追加するには、次の手順に従います。

  1. チームのオペレーション ページに移動します

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

  3. 検索を実行して「New Relic」を選択します。

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

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

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

  7. [統合を設定する手順] セクションを展開して、エンドポイント URL をコピーします。
    この URL は、後ほど New Relic で統合を設定する際に使用します。

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

New Relic で統合を設定する

New Relic で統合を設定するには、次の手順を実行します。

  1. New Relic アカウントのサイド メニューから [アラート & AI] を選択します。

  2. [宛先] を選択します。

  3. Webhook の宛先を作成します。

  4. Webhook の名前を入力します。

  5. さきほどコピーした URL を [Endpoint URL (エンドポイント URL)] に貼り付けます。

  6. [アラート & AI] から [ワークフロー] を選択して、新しいワークフローを作成します。
    先ほど作成した Webhook の宛先を使用します。

  7. Webhook のペイロード テンプレートで New Relic のペイロードをテストします。
    New Relic のペイロード テンプレートについては、次のセクションをご参照ください。

  8. [メッセージを更新] を選択します。

  9. [ワークフローを有効化] を選択します。
    ワークフローが New Relic で有効になっているか、ご確認ください。

New Relic ペイロード テンプレート

New Relic で新しいワークフローを作成する際に使用するペイロード テンプレート

{ "tags": "tag1,tag2", "teams": "team1,team2", "recipients": "user1,user2", "payload": { "condition_id": {{json accumulations.conditionFamilyId.[0]}}, "condition_name": {{json accumulations.conditionName.[0] }}, "current_state": {{#if issueClosedAtUtc}} "closed" {{else if issueAcknowledgedAt}} "acknowledged" {{else}} "open"{{/if}}, "details": {{json issueTitle}}, "event_type": "Incident", "incident_acknowledge_url": {{json issueAckUrl }}, "incident_api_url": "N/A", "incident_id": {{json issueId }}, "incident_url": {{json issuePageUrl }}, "owner": "N/A", "policy_name": {{ json accumulations.policyName.[0] }}, "policy_url": {{json issuePageUrl }}, "runbook_url": {{ json accumulations.runbookUrl.[0] }}, "severity": {{#eq "HIGH" priority}} "WARNING" {{else}}{{json priority}} {{/eq}}, "targets": { "id": {{ json entitiesData.entities.[0].id }}, "name": {{ json entitiesData.entities.[0].name }}, "type": "{{entitiesData.entities.[0].type }}", "product": "{{accumulations.conditionProduct.[0]}}" }, "timestamp": {{#if closedAt}} {{ closedAt }} {{else if acknowledgedAt}} {{ acknowledgedAt }} {{else}} {{ createdAt }} {{/if}} } }

New Relic から送信される JSON ペイロードの例

サンプル ペイロード (JSON 形式)

{ "tags": "tag1,tag2", "teams": "team1,team2", "recipients": "user1,user2", "payload": { "condition_id": 1, "condition_name": "test condition", "current_state": "open", "details": "CPU > 50% for 5 minutes", "event_type": "INCIDENT", "incident_acknowledge_url": "http://localhost/incident/1/acknowledge", "incident_api_url": "http://localhost/api/incident/1", "incident_id": 1, "incident_url": "http://localhost/incident/1", "owner": "John Doe", "policy_name": "test policy", "policy_url": "http://localhost/policy/1", "runbook_url": "http://localhost/runbook/url", "severity": "CRITICAL", "targets": [ { "id": "12345", "link": "http://localhost/target/12345", "name": "Test Target", "labels": [ "production", "hostname" ], "type": "Server", "product" : "productName" } ], "timestamp": 123456789000 } }

Jira Service Management によって解析されるペイロード (JSON 形式)

[ "owner" : "John Doe", "severity" : "CRITICAL", "policy_url" : "http://localhost/policy/1", "teams" : [ "team1", "team2" ], "target_name" : "Test Target", "target_type" : "Server", "policy_name" : "test policy", "incident_url" : "http://localhost/incident/1", "incident_acknowledge_url" : "http://localhost/incident/1/acknowledge", "tags" : [ "tag1", "tag2" ], "event_type" : "INCIDENT", "incident_id" : "1", "target_link" : "http://localhost/target/12345", "runbook_url" : "http://localhost/runbook/url", "recipients" : [ "user1", "user2" ], "target_labels" : [ "production", "hostname" ], "details" : "CPU > 50% for 5 minutes", "state" : "open", "condition_name" : "test condition", "target_product" : "productName", "timestamp" : "123456789000" ]

 

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

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