There are various ways to create alert conditions for New Relic APM and browser monitoring metrics, but we recommend using NRQL. Using a NRQL alert condition provides additional controls, improved detection time, and consistency across all data types.
In 2021, we made it easier to create NRQL alert conditions from charts and queries throughout New Relic. See below an example of how to create an APM external service condition using NRQL.
Setting up an APM or browser monitoring metric alert condition is a two-part process: First, you need to identify the entity, then you create the NRQL condition.
Here's a procedure showing how you might set up a condition for an APM-monitored app.
First, you'll identify the entity for which you'll set the alert condition:
Go to one.newrelic.com > APM in the toolbar.
Find the service you’d like to alert on.
Click on the service.
In the left navigation pane, click External services.
Under Top 20 external services, find the service you want and click on it.
On the right side of the page, where you see graphs for Response time and External calls per minute (throughput), decide which of these two options you would like to alert on.
In the upper-right corner of the graph you choose, click the three dots, and select Create alert condition.
If you don’t see these three dots, ensure the Show new view option at the top of the page is enabled.
This launches a modal with the NRQL alert condition builder, the query is pre-populated.
If you choose response time, your query may look like this:
If you choose external calls per minute, your query may look like this:
With your query pre-populated in the condition builder, you'll next create the NRQL alert condition.
In the modal, complete the following:
Enter a condition name.
In Define your signal, observe that any
TIMESERIESclauses are removed so that the NRQL query syntax is valid.
If no results are returned, ensure you are in the correct account by looking at the current account in the upper-left of the modal. If it's not correct, you may need to close out of the modal and double-check that the correct account is selected in the account picker in the upper-left corner of the page.
Fill out the remaining fields, select or create a policy near the bottom of the form, and save your condition.
Optional: see how to query APM metric timeslice data with NRQL.