Metric in DataDog to count % of bad requests and number of requests

Viewed 371

We have a datadog metric that measures a % of successful web requests and alerts us if it's more than threshold. A problem with this metric is that it becomes noisy on weekend nights when we don't have too many requests and even a single error can push the metric over the threshold.

Right now the query is like this:

"query": "sum(last_30m):sum:q.inquiry{success:true}.as_count() / sum:q.inquiry.as_count() * 100 < 80"

which counts the number of requests that succeed vs total number of requests and reports if it's more than 80%.

Is there a way to do a boolean operation to do something like

above_query && sum(last_30m):sum:q.inquiry{success:false}.as_count() > 3

which will only alert if the number of bad requests is greater than 3

1 Answers

Create a composite monitor that triggers on your two queries, one with the count threshold and one with the percentage threshold.

Related