To send an HTTP request action to Opsgenie from AppDynamics, you must create a template in AppDynamics. When AppDynamics triggers an action in response to an event, you can view the details of the action in your Opsgenie.

This document contains references to the Atlassian documentation. AppDynamics does not own any rights and assumes no responsibility for the accuracy or completeness of such third-party documentation.

Before you Begin

  1. Integrate AppDynamics with Opsgenie. For more information, see the Atlassian Opsgenie documentation.
  2. Copy the webhook URL generated by Opsgenie and keep it securely for later use. AppDynamics uses this URL to send the alerts to Opsgenie.

Create a 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 Opsgenie.
  4. In the Request URL section:
    1. Select POST as Method.
    2. Enter the webhook URL in the Raw URL field.
    3. Select UTF-8 as URL Encoding.
  5. 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.
  6. 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:

      {
      "event_name": "${latestEvent.displayName}",
      "event_guid": "${latestEvent.guid}",
      "event_id": "${latestEvent.id}",
      "policy": "${policy.name}",
      "event_time": "${latestEvent.eventTime}",
      "app_id": "${latestEvent.application.id}",
      "app_name": "${latestEvent.application.name}",
      "event_message": "${latestEvent.eventMessage}",
      "severity": "${latestEvent.severity}",
      "event_deep_link": "${latestEvent.deepLink}",
      "controller_url": "${controllerUrl}",
      "node_id": "${latestEvent.node.id}",
      "node_name": "${latestEvent.node.name}",
      "summary": "${latestEvent.summaryMessage}",
      "event_type": "${latestEvent.eventType}",
      "tier_id": "${latestEvent.tier.id}",
      "tier_name": "${latestEvent.tier.name}"
      #if(${latestEvent.healthRuleEvent} == true)
      ,"health_rule_id": "${latestEvent.healthRule.id}",
      "health_rule_name": "${latestEvent.healthRule.name}",
      "incident_id": "${latestEvent.incident.id}",
      "incident_name": "${latestEvent.incident.name}"
      #end
      }
      JSON
  7. 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.
  8. In the Settings section, select the One Request Per Event option.
  9. Click Save.