Menu
Documentationbreadcrumb arrow Pluginsbreadcrumb arrow AppDynamics data source for Grafana

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:

Known limitations

Install the plugin

  1. Navigate to AppDynamics plugin homepage.

  2. 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

  1. In Grafana Enterprise from the left-hand menu, navigate to Configuration > Data sources.
  2. From the top-right corner, click the Add data source button.
  3. Search for AppDynamics in the search field, and hover over the AppDynamics search result.
  4. 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:

  1. Navigate to the AppDynamics Administration settings.
  2. From the Roles tab, select the + button to create a new role, such as grafana_readonly. The Create Role section is displayed.
  3. From the Account tab, add the permission View Business Flow.
  4. From the Applications tab, check the View box to allow Grafana to view application data.
  5. From the Databases tab, check the View box to allow Grafana to view database data
  6. From the Analytics tab, check the Can view data from all Applications box to allow Grafana to view application analytics data
  7. 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

  1. As a user with administration permissions, sign in to the AppDynamics Controller UI at https://company.saas.appdynamics.com/controller, where company is the name of your company.
  2. Click the gear icon and select Administration.
  3. Click on the API clients tab.
  4. Create a new API client by clicking on the Create button.
  5. Add a name and description for the API client, and then generate a client secret.
  6. 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.
  7. Use the value in the Client name field for the Client name in the data source configuration.
  8. Use your company/domain name for the value in Client domain. For example, referring to point 1: the value for the Client domain would be company.
  9. 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

FieldDescription
NameA name for this particular AppDynamics data source.
URLWhere AppDynamics is hosted, for example https://moria.saas.appdynamics.com.
AccessAccess 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

FieldDescription
Basic authEnter an AppDynamics user name and password.
TLS Client AuthBuilt-in option for authenticating using Transport Layer Security.
Skip TLS VerifyEnable to skip TLS verification.
With CredentialsEnable to send credentials such as cookies or auth headers with cross-site requests.
With CA CertEnable to verify self-signed TLS Certs.
Forward OAuth IdentityForward 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 NameSet up authentication using an API client.
Client DomainSet up authentication using an API client.
Client SecretSet 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

FieldDescription
Analytics API URLThe SaaS or On-premises endpoint for the Analytics Event Service Data Store
Analytics API KeySet up authentication using an API key with the required Analytics permissions.
Global Account NameThe 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

yaml
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.

yaml
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.

FieldDescription
ApplicationThe AppDynamics application name
Metric
LegendSelect from Full Path, Segments, or Custom Detailed here
Single Datapoint (Roll Up)To get the latest row, set to true.
DelimiterSelect 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 specifying 2, 4 as the segments returns mywebsite|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}} return App: 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:

sql
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:

QueryDescription
ApplicationsAll Applications
AppName.TiersAll Tiers for the Application Name
AppName.TierName.BusinessTransactionsAll Business Transactions for a specific Tier
AppName.TierName.NodesAll Nodes for a specific Tier
AppName.Path.<Any Metric Path>Any metric Path can be specified
SELECT column from tableAn 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