The built-in AppDynamics Events trigger initiates flows when it receives a request from a webhook in AppDynamics.
- Go to the Triggers tab in the palette, expand the App Triggers section and drag the trigger onto the canvas.
- Double-click the trigger (or click the pencil icon).
- Set the authenticating user, and then copy the URL — you'll use this to set up the webhook in AppDynamics. Alternatively, you can create an integration user and use it as the authenticating user.
- Click the Flood Control tab to edit the trigger's default flood control settings. For more information about these settings, see Trigger Flood Control.
- Click Done.
- On the flow canvas, connect the steps you want to run when xMatters receives a request to that URL.
You're now ready to configure AppDynamics to target the trigger.
Configure AppDynamics to send requests to the trigger URL
To have AppDynamics send alerts to the flow trigger, you need to configure a webhook and set it to use the trigger URL.
- Log in to your AppDynamics controller and navigate to Alert & Respond > HTTP Request Templates.
- Click New to create a new template, then name the new template xMatters.
- In the Request URL section, set the Method to POST.
- Paste the URL from the trigger into the Raw URL field.
- Add the target names of any recipients you want xMatters to notify when the alert fires.
- For example, if you want to notify Emma Pearson, Mary McBride, and the on-call members in the Monitor Team responsible for the service, you'd add ?recipients=epearson,mmcbride,monitor%20team to the URL. You must URL-encode any special characters or spaces in the target names.
- In the Payload section, set the MIME Type to application/json.
- Paste the following payload into the Payload field. Copy
#foreach( $event in $fullEventList )
}#if( $foreach.hasNext ),#end
- If you want to receive an alert for each new event detected, enable the One Request Per Event check box.
- Save the template.
If your implementation requires Tier / Node information, set it in AppDynamics:
- Go to the Alert & Respond menu and select Health Rules.
- Click Affected Entities and select one of the three available Tier / Node options.
- Click Save to apply the Tier / Node changes.
You're ready to use the webhook to trigger automated flows, including steps such as sending alerts and initiating incidents, though we always recommend testing before putting things into use.
The trigger has the following outputs you can use as inputs to steps further along the flow.
|List of targeted recipients. Recipients are set by adding a recipients query parameter to the trigger URL.|
|Signal Mode||Determines the path the flow will take, based on the value of the Policy Name and Latest App parameters.|
|Account Name||Name of the AppDynamics account.|
|Action Name||Name of the action sending the alert from AppDynamics.|
|Controller URL||Direct link to the AppDynamics controller.|
|Latest App||Name of the app which sent the most recent event.|
|Latest Display Name||Display name associated with the most recent event.|
|Latest Node||Name of the node associated with the most recent event.|
|Latest Severity||Severity of the most recent event in AppDynamics.|
|Latest Summary||Latest summary associated with the most recent event.|
|Latest Tier||Name of the tier for the most recent event in AppDynamics.|
|Number of Events||Number of events sent by the policy|
|Policy Name||Name of the alert policy that triggered the event.|
|Timestamp||Timestamp for the most recent event in AppDynamics.|
|Top Severity||Maximum severity within the list of events sent by AppDynamics.|
|Trigger Time||Time the alert was triggered in AppDynamics.|
|Raw Request||JSON representation of the request. You can parse the raw request if you need additional details beyond the standard outputs.|