Create NRQL baseline alert for External services based on name of the external service

@NateHeinrich Is there are way to create NRQL baseline alert for External services based on name of the external service? I haven’t figured a way to achieve this yet.

New Relic Edit

Hey @CHRISTOPHER.MCKENNA - I moved your question out of the Spring Cleaning thread so that our friends will have an easier time finding it and responding. (HR)

Hey @CHRISTOPHER.MCKENNA, the standard measurement of an external service in APM event data is the externalDuration attribute, which measures the total response time of all external calls in a Transaction. As far as I know, there is not a default measurement of the individual response time for each external service call, which is what I’m assuming would be necessary to generate this sort of alert.

It might be possible to custom-instrument individual external service calls as either a custom event type or as custom attributes on an individual event.

Are you looking to measure all external service calls using NRQL Baseline alerts, or are there a select few which you would like to monitor?

Looks like you can alert on APM>External Service>Service URL in Alerts.

In the past I’ve done this with application metric baseline and adding the custom metric for the external call found using api explorer/data explorer.

1 Like

Hey @CHRISTOPHER.MCKENNA - were @amasten or @6MM’s comments helpful? Let us know if you have additional questions.

I’ll explore this path forward. I know the URLs of interest so this should do the trick.

1 Like

Awesome! Let us know how that goes. :slight_smile:

Hi all, we are stuck on this external monitoring problem too. It would be great to know when some of our external services are slow or unresponsive so that we can send out an alert and do something about it, but I can’t seem to get it working as expected.

Is there any way to do this within APM?

Exact goal:

  • Create alert when external service response time averages 3+ seconds for 5 minutes and send email.
  • Create alert when external service is not responsive at all and send email.

Can I make either of those work?

Hi, @it-magento-admin: Have you tried creating an external service alert condition?


1 Like

I need to do the same thing… and I tried to do it via this method but when i type the endpoint i want to monitor into the “Enter external service URL” it says it’s “Not Found”
and then even if i put it in, the graph doesn’t show response times.

So why can’t I monitor the external service endpoints the app is calling? Why is it not found when clearly when I go to the app in APM and go to External Services it shows up in the list

very confused.


Hi, @Todd.Staples: Can you post a link to the alert policy containing this condition? Only New Relic personnel will be able to access the link.

Did someone helped you with this? Im having the same issue, always getting No Results Found

Sorry for not getting back to this… but yes, i did solve this.
I used what @philweber referenced above. The External Service alert condition. BUT there were some odd behaviors I had to navigate around.

  1. Add new alert condition
  2. Select “APM” and then “External service” and click “Next, select entities”
  3. Pick your app that you want to test FROM. Check it off… and click “Next, define thresholds”
  4. Add your target endpoint into the endpoint box. “” for instance.

BUT Here’s the issue i found. When you put that “” into the “Enter external service URL” box. You’re going to see that it says “No results found” but actually that’s OKAY!

Set up the rest of the things… I.e. Response time… an average… above… 3s… for at least… 5 minutes.

and save.

go back into that alert condition after it’s saved.
And low and behold… it’s seeing data. Also the value inside the “Enter external service URL” box has changed to something like …


Which is odd… but i’ve decided not to question… and instead just accepted my reality and moved on. Now confident that my external endpoints are being monitored successfully for response time elevations.

Which they are because i’ve had these alerts trigger.


Glad that worked for you - the behaviour you mention with the condition creation is rather odd. I’ll do some digging on that here & report to the right team if I can confirm that’s a bug.

Good to hear the conditions are working for you though :smiley:

So how did that digging go? I can confirm the odd behavior.

Are you having a problem? If so is your issue the same or different?

Hi @6MM, Well I came across the issue reported by Todd.Staples previously in this thread and I was curious if it is a confirmed bug by now. :slight_smile: I found this thread because I was looking for a way to set up baseline alerting on my external services durations per sevice. As far as I can tell the current alerting on offer for external services is based on thresholds. I have not found any way around that so far.

What do you want to alert on?

Have you tried making an alert on your external service using the multiple approaches available today?

I would like to alert on duration and throughput. Yes, I tried using NRQL baseline alerting but it seems to me that the only duration I can dig up is a combined average for all externals (as indicated by @amasten in a post above ) and I’d like to monitor them individually. Like I said, I have no problem setting up an alert using thresholds, but baseline would be more fit for purpose. Thresholds are not working very well with the services I want to monitor.

SELECT average(newrelic.timeslice.value) from Metric where appName = 'foo' AND metricTimesliceName = 'External/callsomething...'

You can poke about at your available timeslice metrics by doing something like this:

SELECT uniques(metricTimesliceName) FROM Metric WHERE appName = 'foo' AND newrelic.timeslice.value IS NOT NULL limit max

1 Like

@johan.nordanfors how did @6MM suggestions work out for you?