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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With