---
sourceDocument: Xanadu IT Operations Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/xanadu/it-operations-management

 Release :

    - xanadu

ft:locale :

    - ja-JP

ft:publication_title :

    - Xanadu IT Operations Management

ft:clusterId :

    - itom

bundleId :

    - itom

workflow :

    - Technology


---

# New Relic プラットフォームイベントの統合

# New Relic プラットフォームイベントの統合 {#ariaid-title1}

* リリースバージョン: Xanadu
* 
* 更新日 2024年08月01日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：10分

New Relic を イベント管理 と統合するには、New Relic の古いコンソールと新しいコンソールで標準 Webhook を追加します。

## 始める前に

イベント管理 Connectors (sn_em_connector) プラグインが Now Platform インスタンスにインストールされていることを確認します。

必要なロール：evt_mgmt_integration

## このタスクについて

New Relic からのイベント収集用に イベント管理 環境を構成するには、New Relic をデータソースとして認証します。標準 Webhook を使用して、Now Platform インスタンスを REST エンドポイントとして設定します。新しいコンソールの場合は、手順ステップ 1 を使用します。古いコンソールの場合は、手順ステップ 2 を使用します。  
Xanadu リリース以降、以前に使用していない (つまり、アクティブ化、非アクティブ化、または変更されていない) コネクタで提供される OOTB (すぐに利用可能) ルールの \[追加の一致ルールを適用\] チェックボックスが true に設定されます。以前は、このチェックボックスは無効になっていました。この変更により、コネクタに対して同じフィルター条件を使用して、より多くのイベントルールまたは自動化を実行できます。  
注:  
この機能は、アクティブなイベントルールにのみ適用されます。

## 手順

1. 新しいコンソールの場合：
   1. 宛先を作成します。  
      1. 移動先アラートと AI宛先.
      2. \[宛先を追加 (Add destinations)\] セクションで、\[Webhook\] チャネルタイプを選択します。
      3. \[Webhook 名\] フィールドに、Webhook の名前を入力します。
      4. \[エンドポイント URL\] フィールドに、「https://\<インスタンス名\>.service-now.com/api/sn_em_connector/em/inbound_event?source=newrelic」と入力します。
      5. \[基本認証\] セクションに、ユーザー名とパスワードを入力します。  
         注:  
         選択したユーザーに evt_mgmt_integration ロールが割り当てられていることを確認します。適切な認証を確実に行うには、高い権限を持つユーザーではなく、evt_mgmt_integration ロールを持つ最小権限のユーザーを使用します。
      6. \[宛先を保存 (Save destination)\] を選択します。
      {#new-relic-events-integration__ol_a24_zqq_bzb}
   2. ポリシーを作成します。  
      1. 移動先アラートと AIアラート条件とポリシー.
      2. \[新規アラートポリシー (New Alert policy)\] をクリックし、ポリシーを定義します。
      3. \[通知を設定\] を選択します。
      4. \[チャネルの追加\] セクションで、\[Webhook\] を選択してから、前のサブステップで作成した宛先を選択します。
      5. \[ペイロードテンプレート\] セクションに、次の JSON ペイロードを貼り付けます。

             { "account_id": {{nrAccountId}}, "account_name": {{json accumulations.tag.account.[0]}}, "closed_violations_count": {{closedIncidentsCount}}, "open_violations_count": {{openIncidentsCount}}, "condition_description": "{{escape accumulations.conditionDescription.[0]}}", "condition_family_id": {{accumulations.conditionFamilyId.[0]}}, "condition_name": "{{escape accumulations.conditionName.[0]}}", "current_state": {{json state}}, "details": {{json issueTitle}}, "duration": {{#if issueDurationMs}}{{issueDurationMs}}{{else}}0{{/if}}, "event_type": "INCIDENT", "incident_acknowledge_url": {{json issueAckUrl}}, "incident_id": {{json issueId}}, "incident_url": {{json issuePageUrl}}, "metadata": { {{#if locationStatusesObject}}"location_statuses": {{json locationStatusesObject}},{{/if}} {{#if accumulations.metadata_entity_type}}"entity.type": {{json accumulations.metadata_entity_type.[0]}},{{/if}} {{#if accumulations.metadata_entity_name}}"entity.name": {{json accumulations.metadata_entity_name.[0]}},{{/if}} "section": "metadata" }, "owner": {{json owner}}, "policy_name": {{json accumulations.policyName.[0]}}, "policy_url": {{json policyUrl}}, "runbook_url": {{json accumulations.runbookUrl.[0]}}, "severity": {{json priority}}, "targets": [ { "id": "{{labels.targetId.[0]}}", "name": "{{#if accumulations.targetName}}{{escape accumulations.targetName.[0]}}{{else if entitiesData.entities}}{{escape entitiesData.entities.[0].name}}{{else}}N/A{{/if}}", "link": "{{issuePageUrl}}", "product": "{{accumulations.conditionProduct.[0]}}", "type": "{{#if entitiesData.types.[0]}}{{entitiesData.types.[0]}}{{else}}N/A{{/if}}", "labels": { {{#each accumulations.rawTag}}"{{escape @key}}": {{#if this.[0]}}{{json this.[0]}}{{else}}"empty"{{/if}}{{#unless @last}},{{/unless}}{{/each}} } } ], "timestamp": {{updatedAt}}, "violation_callback_url": {{json issuePageUrl}}, "violation_chart_url": {{json violationChartUrl}} }

      6. \[テスト通知の送信\] を選択して、 ServiceNow インスタンスでテストイベントを取得します。
      7. \[メッセージを保存 (Save message)\] を選択します。
      8. \[ワークフローを有効化 (Activate workflow)\] を選択して、ワークフローを有効化します。
      {#new-relic-events-integration__ol_lxp_w3y_bzb}
   3. ポリシーに適用するアラート条件を作成します。  
      1. 移動先アラートと AIアラート条件とポリシー.
      2. \[アラート条件の作成 (Create alert condition)\] を選択し、必要なアラートの詳細を定義して、前のステップで作成したポリシーに追加します。
      3. \[条件を保存\] を選択します。
      {#new-relic-events-integration__ol_qyx_djy_bzb}
   {#new-relic-events-integration__substeps_zd4_zqq_bzb}
2. 古いコンソールの場合：
   1. 通知チャネルを作成します。  
      1. 移動先アラートと AI通知チャネル.
      2. \[チャネル詳細\] タブで、\[Webhook\] チャネルタイプを選択します。
      3. \[ベース URL\] テキストボックスに、「https://\<インスタンス名\>.service-now.com/api/sn_em_connector/em/inbound_event?source=newrelic」と入力します。
      4. \[基本認証\] セクションで、関連するユーザーのユーザー名とパスワードを入力します。  
         注:  
         選択したユーザーに evt_mgmt_integration ロールが割り当てられていることを確認します。適切な認証を確実に行うには、高い権限を持つユーザーではなく、evt_mgmt_integration ロールを持つ最小権限のユーザーを使用します。
      5. \[カスタムペイロード\] セクションで、\[カスタムペイロードを追加 (Add Custom Payload)\] をクリックし、\[JSON\] ペイロードタイプを選択します。
      6. 次の JSON ペイロードを \[カスタムペイロード\] に貼り付けます。

             { "account_id": "$ACCOUNT_ID", "account_name": "$ACCOUNT_NAME", "closed_violations_count_critical": "$CLOSED_VIOLATIONS_COUNT_CRITICAL", "closed_violations_count_warning": "$CLOSED_VIOLATIONS_COUNT_WARNING", "condition_description": "$DESCRIPTION", "condition_family_id": "$CONDITION_FAMILY_ID", "condition_name": "$CONDITION_NAME", "current_state": "$EVENT_STATE", "details": "$EVENT_DETAILS", "duration": "$DURATION", "event_type": "$EVENT_TYPE", "incident_acknowledge_url": "$INCIDENT_ACKNOWLEDGE_URL", "incident_id": "$INCIDENT_ID", "incident_url": "$INCIDENT_URL", "metadata": "$METADATA", "open_violations_count_critical": "$OPEN_VIOLATIONS_COUNT_CRITICAL", "open_violations_count_warning": "$OPEN_VIOLATIONS_COUNT_WARNING", "owner": "$EVENT_OWNER", "policy_name": "$POLICY_NAME", "policy_url": "$POLICY_URL", "runbook_url": "$RUNBOOK_URL", "severity": "$SEVERITY", "targets": "$TARGETS", "timestamp": "$TIMESTAMP", "violation_callback_url": "$VIOLATION_CALLBACK_URL", "violation_chart_url": "$VIOLATION_CHART_URL" }

      {#new-relic-events-integration__ol_a5h_x2j_vnb}
   2. ポリシーを作成します。  
      1. 移動先アラートと AIポリシー.
      2. \[新規アラートポリシー (New Alert policy)\] をクリックし、ポリシーを定義します。
      3. \[通知チャネル\] セクションで \[追加\] をクリックし、\[Webhook\] を選択してから、前のステップで作成したチャネルを選択します。
      {#new-relic-events-integration__ol_szx_dny_bzb}
   3. ポリシーに適用するアラート条件を作成します。  
      1. 移動先インフラストラクチャ設定アラート.
      2. \[アラート条件の作成 (Create alert condition)\] を選択し、必要なアラートの詳細を定義して、前のステップで作成したポリシーに追加します。
      3. \[作成\] を選択します。
      {#new-relic-events-integration__ol_asj_hny_bzb}
   {#new-relic-events-integration__substeps_lrq_1yd_vnb}
{#new-relic-events-integration__steps_lmy_cyd_vnb}

## タスクの結果

New Relic コンソールからイベント管理プラグインにアラートが送られ始めます。このプラグインは、元の New Relic アラートメッセージから情報を抽出し、必要なイベントフィールドに値を入力して、イベントをデータベースに挿入します。Now Platform インスタンスで、\[すべてのイベント\] に移動してイベントを表示します。  
注:  
デフォルトでは、すべてのプロバイダー (Azure/AWS/GCP) の New Relic イベントで、ホストバインディングが有効になっています。認証情報を提供することで環境内のすべてのホストがクラウドディスカバリーで検出され、検出されたリソースが cmdb_ci_vm_object リストにある場合は、VM バインディングが発生しない可能性があります。これを解決するには、New Relic - 一般イベントルールを有効にする必要があります。イベントルールの詳細については、「[イベントルール](https://servicenow-prod.fluidtopics.net/ZIiAuel5txt3jlfn6ACsWA "イベントルールを使用して、追跡および修復のためのアラートを生成します。イベントルールは、イベントルール [em_match_rule] テーブルに格納されます。イベントとアラートの生成を管理するためのイベントルールを設定およびカスタマイズします。")」を参照してください。

