Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Alert only when all locations fail

syntheticalerts

#1

Our AppDev team has requested that alerts should only be triggered when all locations being tested fail. I tried doing this with a NRQL but it did not alert. Anyone have suggestions?

SELECT percentage(count(*), WHERE result = ‘SUCCESS’ ) FROM SyntheticCheck where monitorName = ‘{name of synthetic monitor}’


#2

Hi @hanastasi!

It looks like this post might be helpful in this situation:

Let me know if that works!


#3

Thanks!

I looked at the link and it mentions the need for the Node.js plugin. Is this still needed and if so, which one should I install?


#4

Hi @hanastasi,

To clarify, with NRQL alerting, you shouldn’t need to install any plugin. The following query should work for your situation:

SELECT uniqueCount(location) 
FROM SyntheticCheck 
WHERE result = 'FAILED' AND monitorName = 'My Monitor'

Also, this post covers NRQL alerting for Synthetics a bit more in-depth. Even though the specific query is for alerting on X failures in Y minutes, you might still find it helpful.

Let me know if that helps!


#5

The last link you sent is perfect!! Thank you!


#6

I setup the alert as described in the post but it’s not firing when the condition is met. HELP!!


#7

Hi @hanastasi! I am getting some mixed signals from your last 2 responses—we are happy to help if you need us! Looks like you also have a private ticket going with a Synthetics expert. Have you come to a resolution? Eager to hear an update from you when you do! :blush:


#8

I met with a Tech Eng and got this resolved.


#9

Happy to hear that, @hanastasi! If you learned something you think the rest of the community will benefit from knowing during this process, please share it here! :blush: Always nice to pay the knowledge forward.


#10

This is really useful


#11

Glad to hear that you found @cneff’s post useful! Let us know if you need anything else! :blush: