Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude a health check resource from Datadog metric alert monitor query?

We are setting up a metric alert monitor and other monitors using Terraforms. The query looks like this:

 query = "max(last_10m):p95:trace.netty.request{env:${var.env},service:${local.service_name}} >= 4"

We would like to exclude health checks from this particular metric only, e.g. GET /healthcheck

How can this be achieved? Are there some examples?

like image 655
OSGI Java Avatar asked Oct 16 '25 02:10

OSGI Java


1 Answers

Resources like the health check have a resource_name tag. This tag can be used to exclude them, e.g. !resource_name:get_/health

Here is an example of a query excluding the health check resources:

 query = "max(last_10m):p95:trace.netty.request{env:${var.env},service:${local.service_name},!resource_name:get_/health} >= 4"

Visit DataDog documentation for more information.

like image 94
OSGI Java Avatar answered Oct 19 '25 00:10

OSGI Java



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!