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 on error anomalies and/or new errors

alerts
errors

#1

Hello

Is there a way to get alerting based on error anomalies and/or new errors? For example, if a live deployment is done and a particular type of error (based on the error message) now occurs more than it used to. Also if a new error entirely (again based on the error message) has come about. Is there a way to get automatic alerts based on these scenarios?

I’ve had a look at Insights and wondering if there is a way to accomplish this with the TransactionError data set?

Many thanks
Dave


#2

Hi @david.williams - I think that baseline alerts would help here but I have not used them myself.


#3

Hi, @david.williams: I don’t know if Alerts can do exactly what you’re looking for. The phrase, “more (or less) than it used to” could be rephrased, “deviates from the baseline”, which is exactly what baseline alert conditions are designed to detect.

To detect individual errors, you will have to use a NRQL condition (APM metric conditions can only alert on the overall error rate of the application). In order to create a baseline NRQL condition, you must create a separate condition for each error message you wish to monitor:

SELECT count(*) FROM TransactionError WHERE appName = 'My Application' AND `error.message` = 'Error 1'
SELECT count(*) FROM TransactionError WHERE appName = 'My Application' AND `error.message` = 'Error 2'

This is admittedly cumbersome, and requires you to know in advance which error messages you wish to monitor.

The alternative is to create a non-baseline NRQL condition:

SELECT count(*) FROM TransactionError WHERE appName = 'My Application' FACET `error.message`

In this case, you would specify a static threshold: you want Alerts to create an incident if any individual error message occurs more than X times per minute.

Ideally, you could use a FACET query to create a baseline condition, but unfortunately that is not currently possible.