AppDynamics data source for Grafana
The AppDynamics data source plugin allows you to query and visualize AppDynamics metrics and analytics from within Grafana.
Requirements
This plugin has the following requirements:
- An AppDynamics account with a user who can generate API keys.
- One of the following account types:
- Available for users with a Grafana Cloud Free, Advanced or Trial account or with an activated Grafana Enterprise license.
Known limitations
- A metric path name cannot contain the delimiter that you select. For more information, refer to Query the Metrics data source.
Install the plugin
Navigate to AppDynamics plugin homepage.
From the left-hand menu, click the Install plugin button.
- If you do not see the Install Plugin button, make sure you are signed into a Grafana.com account with a valid Enterprise Plugins subscription.
The Installation tab is displayed.
Meet compatibility requirements
For this plugin, there are no compatibility requirements.
Get credentials from AppDynamics
You can authenticate using either basic auth with a username and password or with an API token.
Verify that the plugin is installed
- In Grafana Enterprise from the left-hand menu, navigate to Configuration > Data sources.
- From the top-right corner, click the Add data source button.
- Search for
AppDynamics
in the search field, and hover over the AppDynamics search result. - Click the Select button for AppDynamics.
- If you can click the Select button, then it is installed.
- If the button is missing or disabled, then the plugin is not installed. Check to see if your Grafana Enterprise license is valid, and reinstall the plugin. If you still need help, contact Grafana Labs.
Configure the AppDynamics Metrics data source
You can either create a role and user for the data source in AppDynamics, or Set up authentication using an API Client.
Create a role and user for the data source in AppDynamics
The data source needs view
access to Account, Applications, Databases, and Analytics.
If you do not want to use an existing user, create a user:
- Navigate to the AppDynamics Administration settings.
- From the Roles tab, select the + button to create a new role, such as
grafana_readonly
. The Create Role section is displayed. - From the Account tab, add the permission
View Business Flow
. - From the Applications tab, check the View box to allow Grafana to view application data.
- From the Databases tab, check the
View
box to allow Grafana to view database data - From the Analytics tab, check the Can view data from all Applications box to allow Grafana to view application analytics data
- From the Users tab of the Administration page, create a new user, such as
grafana
. Assign the new user (or a Group to which the user belongs) to the role you just created (e.g.grafana_readonly
)
Set up authentication using an API client
- As a user with administration permissions, sign in to the AppDynamics Controller UI at
https://company.saas.appdynamics.com/controller
, wherecompany
is the name of your company. - Click the gear icon and select Administration.
- Click on the API clients tab.
- Create a new API client by clicking on the Create button.
- Add a name and description for the API client, and then generate a client secret.
- Add the role that was created in the Create a role and user for the data source in AppDynamics step to the new API client.
- Use the value in the Client name field for the Client name in the data source configuration.
- Use your company/domain name for the value in Client domain. For example, referring to point
1
: the value for the Client domain would becompany
. - Enter the secret generated in step
4
as the Client secret.
Configure the Metrics data source
Add a data source by filling in the following fields:
Basic fields
Field | Description |
---|---|
Name | A name for this particular AppDynamics data source. |
URL | Where AppDynamics is hosted, for example https://moria.saas.appdynamics.com . |
Access | Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else is stated. |
Metrics Authentication fields
Field | Description |
---|---|
Basic auth | Enter an AppDynamics user name and password. |
TLS Client Auth | Built-in option for authenticating using Transport Layer Security. |
Skip TLS Verify | Enable to skip TLS verification. |
With Credentials | Enable to send credentials such as cookies or auth headers with cross-site requests. |
With CA Cert | Enable to verify self-signed TLS Certs. |
Forward OAuth Identity | Forward the identity of the oauth user signed in to Grafana, for cases where the same oauth provider is used for both Grafana and the data source. |
Client Name | Set up authentication using an API client. |
Client Domain | Set up authentication using an API client. |
Client Secret | Set up authentication using an API client. |
Custom HTTP Header Data sources managed by provisioning within Grafana can be configured to add HTTP headers to all requests going to that datasource. The header name is configured in the jsonData
field and the header value should be configured in secureJsonData.
Analytics Authentication fields
Unlike most AppDynamics REST APIs, which are presented at the Controller, you access the Analytics Events API by addressing the Events Service instance in the AppDynamics platform. Because of this division, the authentication for Analytics is independent from Metrics.
AppDynamics Analytics
Field | Description |
---|---|
Analytics API URL | The SaaS or On-premises endpoint for the Analytics Event Service Data Store |
Analytics API Key | Set up authentication using an API key with the required Analytics permissions. |
Global Account Name | The global account name, as shown in the Controller UI licenses page. |
Configure the data source with provisioning
Data sources can be configured using config files with Grafana’s provisioning system. You can read more on the provisioning docs page
Here are some provisioning examples for this data source using basic auth
apiVersion: 1
datasources:
- name: AppDynamics
type: dlopes7-appdynamics-datasource
basicAuth: true
basicAuthUser: Auth Username
url: https://abcdef12345.saas.appdynamics.com
secureJsonData:
basicAuthPassword: Auth Password
Here is an example of provisioning Metrics and Analytics with API Keys.
Note: If you have configured both a Metrics API Key and basic authentication, then the API key is used.
apiVersion: 1
datasources:
- name: AppDynamics
type: dlopes7-appdynamics-datasource
jsonData:
analyticsURL: https://analytics.api.appdynamics.com
globalAccountName: customer1_abcdef-123456-78910
secureJsonData:
apiKey: Metrics Api Key
analyticsAPIKey: Analytics API Key
Query the Metrics data source
In the query type dropdown, click Metrics. The query editor allows you to query AppDynamics application metrics.
Field | Description |
---|---|
Application | The AppDynamics application name |
Metric | |
Legend | Select from Full Path , Segments , or Custom Detailed here |
Single Datapoint (Roll Up) | To get the latest row, set to true . |
Delimiter | Select the delimiter used to affect how the metric path is tokenized. |
Metrics legend keys
The default for the legend key can be quite long but this formatting can be customized.
If the query is for a singlestat or other panel where you cannot see the legend key, then click the Show Metadata option to see what the legend key (also called an alias) for the query is.
The Legend drop-down menu has several options: Full path, Segments, and Custom:
Full Path: The legend key is the full metric path. For example:
Overall Application Performance|Average Response Time (ms)
.Segments: The legend key is made up of chosen segments from the metric path with segment indexing starting at 1. For example with a metric path of
Errors|mywebsite|Error|Errors per Minute
and specifying2, 4
as the segments returnsmywebsite|Errors per minute
.Custom: Create a custom legend by combining text with the following aliasing patterns to be able to mix in metric metadata:
{{app}}
returns the Application name.{{n}}
returns the nth segment from the metric path.
For example, the metric path
Overall Application Performance|Average Response Time (ms)
and custom legend{{app}} MetricPart2: {{2}}
returnApp: myApp MetricPart2: Average Response Time (ms)
.
Query the Analytics data source
In the query type list, click Analytics. The query editor allows you to query AppDynamics analytics using ADQL.
The query editor will provide suggestions for fields, tables, and template variables as you type your ADQL query.
Example analytics query:
SELECT distinct (transactionName), count(*) FROM transactions WHERE transactionName IN (${transactionName:doublequote})
Templates and variables
To add a new AppDynamics query variable, refer to Add a query variable. Use your AppDynamics data source as your data source for the following available queries:
Query | Description |
---|---|
Applications | All Applications |
AppName.BusinessTransactions | All Business Transactions for the Application Name |
AppName.Tiers | All Tiers for the Application Name |
AppName.Nodes | All Nodes for the Application Name |
AppName.TierName.BusinessTransactions | All Business Transactions for a specific Tier |
AppName.TierName.Nodes | All Nodes for a specific Tier |
AppName.Path.<Any Metric Path> | Any metric Path can be specified |
SELECT column from table | An analytics ADQL query |
After creating a variable, you can use it in your AppDynamics queries by using Variable syntax. For more information about variables, refer to Templates and variables.
Note: Multi value variables are not supported in Metrics query. If multi-value variables found in metric path, they will be replaced with
*
Import a dashboard for AppDynamics
Follow these instructions for importing a dashboard. Imported dashboards can be found in Configuration > Data Sources > select your AppDynamics data source > select the Dashboards tab to see available pre-made dashboards.
Learn more
- Add Annotations.
- Configure and use Templates and variables.
- Add Transformations.
- Set up alerting; refer to Alerts overview.