AppDynamics alerting
The AppDynamics data source supports Grafana Alerting, allowing you to create alert rules based on AppDynamics metrics. You can monitor your application environment and receive notifications when specific conditions are met, such as when response times exceed a threshold, error rates spike, or calls per minute drop unexpectedly.
Before you begin
- Ensure you have the appropriate permissions to create alert rules in Grafana.
- Verify your AppDynamics data source is configured and working correctly.
- Familiarize yourself with Grafana Alerting concepts.
Supported query types for alerting
AppDynamics Metrics queries return numeric time-series data natively, so they work directly with Grafana alerting thresholds without requiring special aggregate functions.
Analytics (ADQL) queries can also be used for alerting, provided the query returns numeric results. For example, use count(*) or avg(responseTime) in your ADQL query.
To set up an alerting query:
- Select a query type using the radio buttons (Metrics or Analytics).
- Configure the query to return numeric data.
- Add a Reduce expression to summarize the time series (for example, last value or mean).
- Add a Threshold expression to define the alert condition.
Note
In the alerting context, the Use dashboard’s time picker toggle is hidden. The alert evaluation window is automatically used as the query time range.
Create an alert rule
To create an alert rule using AppDynamics data:
- Go to Alerting > Alert rules.
- Click New alert rule.
- Enter a name for your alert rule.
- In the Define query and alert condition section:
- Select your AppDynamics data source.
- Select Metrics or Analytics from the query type radio buttons.
- For a Metrics query, select the Application and Metric path you want to monitor.
- For an Analytics query, enter an ADQL query that returns numeric data.
- Add a Reduce expression to summarize the time series (for example, last value or mean).
- Add a Threshold expression to define the alert condition.
- Configure Set evaluation behavior:
- Select or create a folder and evaluation group.
- Set the evaluation interval (how often the alert is checked).
- Set the pending period (how long the condition must be true before firing).
- Add labels and annotations to provide context for notifications.
- Click Save rule.
For detailed instructions, refer to Create a Grafana-managed alert rule.
Example: Application response time alert
This example creates an alert that fires when the average response time exceeds a threshold:
- Create a new alert rule.
- Configure the query:
- Select your application from the Application drop-down.
- Select
Overall Application Performance|Average Response Time (ms)as the Metric.
- Add expressions:
- Reduce: Last value
- Threshold: Is above 500
- Set evaluation to run every 1 minute with a 5-minute pending period.
- Save the rule.
Example: Error rate alert
This example alerts when the number of errors per minute exceeds an acceptable level:
- Create a new alert rule.
- Configure the query:
- Select your application from the Application drop-down.
- Select
Overall Application Performance|Errors per Minuteas the Metric.
- Add expressions:
- Reduce: Last value
- Threshold: Is above 10
- Set evaluation to run every 1 minute with a 5-minute pending period.
- Save the rule.
Example: Calls per minute alert
This example alerts when traffic drops unexpectedly, which may indicate an outage:
- Create a new alert rule.
- Configure the query:
- Select your application from the Application drop-down.
- Select
Overall Application Performance|Calls per Minuteas the Metric.
- Add expressions:
- Reduce: Mean
- Threshold: Is below 100
- Set evaluation to run every 5 minutes with a 10-minute pending period.
- Save the rule.
Example: Analytics alert
This example uses an ADQL query to alert when the count of slow transactions exceeds a threshold:
Create a new alert rule.
Select Analytics from the query type radio buttons.
Enter the following ADQL query:
SELECT count(*) FROM transactions WHERE responseTime > 5000Add expressions:
- Reduce: Last value
- Threshold: Is above 50
Set evaluation to run every 5 minutes.
Save the rule.
Best practices
Follow these recommendations to create reliable and efficient alerts with AppDynamics data.
Test queries before alerting
Always verify your query returns expected data before creating an alert:
- Go to Explore.
- Select your AppDynamics data source.
- Run the query you plan to use for alerting.
- Confirm the data format and values are correct.
Consider evaluation intervals
AppDynamics has API rate limits. Set alert evaluation intervals appropriately to avoid excessive API usage:
- Use longer intervals (5+ minutes) when possible for non-critical alerts.
- Avoid very short intervals (less than 1 minute) when monitoring many metrics.
- Enable query caching in Grafana (available in Grafana Enterprise and Grafana Cloud) to reduce API calls.
Handle no data conditions
Configure what happens when no data is returned:
- In the alert rule, find Configure no data and error handling.
- Choose an appropriate behavior for the If no data or all values are null setting:
- Set state to No Data - Keep the alert in a distinct no-data state.
- Set state to Alerting - Treat no data as an alert condition.
- Set state to Normal - Treat no data as a healthy state.
- Keep last state - Preserve the alert’s previous state.
Use template variables carefully
Alert rules don’t support template variables. Ensure your alert queries use static values for application names and metric paths rather than ${variable} syntax.
Troubleshoot alerting issues
For common alerting issues with the AppDynamics data source, refer to the Troubleshooting guide.
Common issues include:
- Alert not firing: Ensure your query returns numeric data and the threshold expression is configured correctly.
- Evaluation errors: Check that your metric path is valid and the data source connection is working.
- Timeouts: Narrow the time range or select a metric with less data volume.



