Archived - Triggering ThousandEyes Snapshots from AppDynamics
This article describes an older method of integrating AppDynamics and ThousandEyes. For a more complete integration method, see AppDynamics Bi-Directional Integration.
Now that you have integrated ThousandEyes alerts and embedded ThousandEyes widgets into an AppDynamics dashboard, you may want to perform some actions from one platform to the other.
One powerful action is to set a policy in AppDynamics that triggers a snapshot in ThousandEyes. ThousandEyes snapshots provide an easy way to share data about an incident with multiple users, teams, or external groups. Anyone with a ThousandEyes snapshot link has full access to the ThousandEyes UI and metrics, including web, network, BGP, and full path visualization.
How It Works
This integration point uses AppDynamics HTTP request templates - a webhook integration feature similar to a ThousandEyes alert webhook notification.
For each test associated with an AppDynamics application (or tier or node), you will generate an HTTP request to trigger a ThousandEyes snapshot for the test via the ThousandEyes API. The request can provide the snapshot time window and other dynamic information, because AppDynamics HTTP request templates use Apache Velocity to allow processing dynamic variables.
To set up this integration, you'll
Create an HTTP request template.
Set up an alert policy action that triggers these HTTP requests.
Creating an HTTP Request Template
To create an HTTP request template, do the following within AppDynamics:
Under Alert & Respond, select HTTP Request Templates.
Click + (New).
Give the template a name, such as ThousandEyes snapshot.
Set up the new template to trigger a ThousandEyes snapshot, as follows:
Custom Templating Variables
Create the following template variables, which are required by the ThousandEyes Snapshot API:
accountId
testId
testName
Request URL
Method field: POST
Raw URL field: https://api.thousandeyes.com/v6/snapshot.json?aid=${accountId}
Authentication
Type field: Basic
Username field: Your ThousandEyes username
Password* field: Your ThousandEyes API token
Payload
4. Save the request template you have just created.
Creating an Action to Trigger the Snapshot for Each Application
Now that you have created the HTTP request template, you need to configure an alert policy action to trigger these HTTP requests.
In AppDynamics, go to Alert & Respond > Actions and click + Create to create a new action.
Select HTTP Request and select ThousandEyes Snapshot as the template (the template you created above.
Enter the following for the test you want to trigger a snapshot on:
accountId
testId
testName
The test you choose here should be a ThousandEyes test that is associated with the particular app, tier, or business transaction that you are creating a Snapshot for.
Now you have an action that will trigger a ThousandEyes snapshot for a specific test.
Associate the snapshot action you just created with a policy.
For further details, see the reference implementation on GitHub.
Last updated