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

Alerting in multiple Appname via NRQL


#1

Hello - I would like to setup an alarm for multiple appnames on a single Alert policy.
Currently, i am using single appname only:
SELECT average(duration) FROM Transaction WHERE appName=‘search’

Is there a query to use to have a multiple appname?
SELECT average(duration) FROM Transaction WHERE appName=‘search1’ or appname=‘search2’ etc…

Thank you,
-Jason


#2

Hello @jason.iglipa, Yes, you could use a query like:

SELECT average(duration) FROM Transaction WHERE appName=‘search1’ OR appname=‘search2’ FACET appName

Or

SELECT average(duration) FROM Transaction WHERE appName IN (‘search1’ ,‘search2’) FACET appName

For more information on this, refer: NRQL syntax, clauses, and functions :slight_smile:


#3

Hi, @jason.iglipa: Try:

SELECT average(duration) 
FROM Transaction 
WHERE appName IN ('search1', 'search2')
FACET appName

You may also assign a label to the applications, and create an alert condition that targets the label.


#4

Hi @zahrasiddiqa / @philweber - Appreciate the prompt response as always. It worked!

Thank you,
-Jason