PagerDuty のテンプレートの作成

Splunk AppDynamicsPagerDuty に HTTP リクエストアクションを送信するには、 でテンプレートを作成する必要があります。Splunk AppDynamics がイベントに応答してアクションをトリガーすると、PagerDuty でアクションの詳細を表示できます。

注: このドキュメントには、PagerDuty のドキュメントへの参照が含まれています。Splunk AppDynamics はいかなる権利も所有しておらず、そのようなサードパーティのドキュメントの正確性または完全性について責任を負いません。

はじめる前に

PagerDuty テンプレートを作成する前に、次の点について確認します。
  1. Splunk AppDynamics を PagerDuty と統合します。https://www.pagerduty.com/docs/guides/appdynamics-integration-guide/PagerDuty を参照してください。
  2. 統合キーをコピーし、後で使用できるように安全に保管します。Splunk AppDynamics は、このキーを使用してアラートを PagerDuty に送信します。

Create a Template

To create a PagerDuty template:
  1. In the menu bar, click Alert & Respond.
  2. Click HTTP Request Templates.
  3. Enter a name for the template. For example, Send alerts to PagerDuty .
  4. In the Custom Templates Variablessection, click + Add Variables and add the following:
    VariableDefault Value
    pd_event_type
    • To open incidents, enter trigger
    • To close incidents, enter resolve
    pd_integration_keyEnter the integration key copied from PagerDuty.
  5. In the Request URL section:
    1. Select POST as Method.
    2. Enter https://events.pagerduty.com/generic/2010-04-15/create_event.json in the Raw URL field.
    3. Select UTF-8 as URL Encoding.
  6. In the Authentication section, select NONE as Type. If you want to enable mutual TLS authentication, select Also Turn on Mutual TLS. For more information about mutual TLS, see Configure and Enable Mutual TLS Authentication.
  7. In the Payload section:
    1. Select application/json as MIME Type.
    2. Select UTF-8 as Payload Encoding.
    3. Enter the following payload in the text box:
      {
      "service_key": "${pd_integration_key}",
      "incident_key": "${latestEvent.node.name} - ${latestEvent.application.name}",
      "event_type": "${pd_event_type}",
      "description": "${latestEvent.displayName} on ${latestEvent.node.name}",
      "client": "Splunk AppDynamics",
      "client_url": "${controllerUrl}",
      "details": {
      "Event Name": "${latestEvent.displayName}",
      "Summary": "${latestEvent.summaryMessage}",
      "Event ID": "${latestEvent.id}",
      "GUID": "${latestEvent.guid}",
      "Event Time": "${latestEvent.eventTime}",
      "Event Type": "${latestEvent.eventType}",
      "Event Type Key": "${latestEvent.eventTypeKey}",
      "Application Name": "${latestEvent.application.name}",
      "Node Name": "${latestEvent.node.name}",
      "Message": "${latestEvent.eventMessage}",
      "Severity": "${latestEvent.severity}"
      },
      "contexts":[
      {
      "type": "image",
      "src": "${latestEvent.severityImage.deepLink}",
      "alt": "${latestEvent.severity}"
      },
      {
      "type": "link",
      "href": "${latestEvent.deepLink}",
      "text": "View this transaction in Splunk AppDynamics"
      }
      ]
      }
  8. In the Response Handling Criteria section, click + Add Success Criteria and do the following:
    1. Select 200 as Status Code.
    2. Select the Expect Payload check box.
    3. Select application/json as Content Type.
  9. In the Settings section, select the One Request Per Event option.
  10. Click Save.