I would like to setup a NRQL alert where I could set a threshold if a specific error occurs more than X% times within Y minutes.
For example, if ‘Provider validation’ errors are more than 2% of the total transactions within 5 minutes I would like to send an alert.
I made a query that looks like this:
select filter(count(*), WHERE `error.message` LIKE '%Provider Valudation%') * 100 / filter(count(*), WHERE duration is not null) FROM Transaction, TransactionError WHERE appName = 'pricing-api-aws-integration'
Now this query runs fine when I try this inside an insights dashboard. I get a number that represents the correct percentage.
When I use this same query when I create an alert I get a different result entirely. I get a graph where the x-axis represents the time and the y-axis represents binops. I would like to know how I can get a correct representation in percentages so that I can create an alert based of off this.