Compare last_1d data with last_1w data in Datadog Terraform

28 Views Asked by At

I am using a datadog terraform to write alert monitors. I want to compare the change in the trend of my metric in last 1 day data vs last 1 week data. I wrote the following query for that:

(sum(last_1d):sum:my_metric.count{field_1:val_1} by {field_1}.as_count()) - (sum(last_1w):sum:my_metric.count{field_1:val_1} by {field_1}.as_count())/7 < 200

But this query is not working. It is showing invalid query.

0

There are 0 best solutions below