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

Feature Idea: Need an NRQL alert with details sent



Please paste the [permalink][1] to the page in question below:

Please include any NRQL you are using:

SELECT count(*) FROM Transaction WHERE appName = ‘My Application’ AND httpResponseCode LIKE ‘4%’

Please share your question/describe your issue below. Include any screenshots that may help us understand your question:

even though we are getting alerted, we don’t see which error code its complaining about. The alert shows the condition has been met but i would like to see the error code, error message and also the request included in the alert. How can i do that ?

New Relic edit

  • I want this, too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.

Feature idea: query data available in custom webhook payload
Feature idea: query data available in custom webhook payload
How to disable auto-close for alert policy violation?

Hi, @darisaam: It is not possible to customize the content of alert notifications. The only solution I can think of is to create a separate alert condition for each error code, and include the code in the condition name. Maybe someone else has a better suggestion?


Good thinking @philweber!

@stefan_garnham is another creative NRQL querier. Any thoughts to share on this one, Stefan? :blush:


After considering, I think this could be a feature request, if it is not already on the forum. With NRQL alerts in particular, any alert in general, it would be useful to be able to set some of the content in the message. In this case, the NRQL query has resulted in an alert being fired based on the count of httpResponseCode but the alert information is not particularly informative. If @darisaam had the ability to set the content on the result of another NRQL query then the alert becomes more informative. Something like:

SELECT httpResponseCode, errorMessage, name FROM Transaction WHERE appName = 'My Application' AND httpResponseCode LIKE '4%'

I think the feature should also allow us to set the alert content to free text and the result of a NRQL query.


Awesome, @stefan_garnham! I’ll add a poll to this one so you and @darisaam (and others!) can vote ! :blush:


Hi Phil,

This would be a suitable solution for me at the moment, however, I am not sure how to do it, do you do it in the Insights UI itself? Is it the thresholds parameters? If so how do you specify who gets the alert?

Many thanks,



Hi, @AndrewWalker: Visit, or select Alerts New from the top menu bar, then follow this process to create a NRQL condition in a new or existing alert policy:

In the alert policy, you will see two tabs: Conditions and Notifications. After defining the desired alert conditions, select the Notifications tab to select how you wish to be notified if one or more of the conditions is violated:

If you are new to Alerts, you may find these videos helpful:


I have multiple alert conditions on custom events that are mostly identical, with the only difference being that they get their value from a subset (source) of the custom event. All the conditions look like this:

SELECT latest(value) from CustomEvent where source = …

Right now I need to create a condition for every value of ‘source’, if I want the ‘source’ to appear in the alert title.
Ideally I’d like to create a single condition and then include data coming from a NRQL query into it. This query doesn’t have to be the same as the one triggering the alert condition.

I can include custom text in the webhook request following the example in

But from there you only have access to a limited set of custom attributes

It would be very useful to include data from other fields or from a different NRQL query in the payload.


Yes, absolutely… having a graph of a condition being met is pretty much useless to us. We already know the condition is met because of the e-mail, I want to see the actual data returned in these queries. Not sure why this is so limited.