DataDog / datadog-cloudformation-resources

Apache License 2.0
51 stars 35 forks source link

Monitor "comparison" field is missing #211

Closed hlascelles closed 1 year ago

hlascelles commented 2 years ago

There is no "comparison" field in the monitors. All monitors alert when a value is "greater than (>)". There is no way to say "less than (<)".

See this file for the definition: https://github.com/DataDog/datadog-cloudformation-resources/blob/master/datadog-monitors-monitor-handler/datadog-monitors-monitor.json

See the "export" from Datadog:

image

Solution

Add the "Comparison" field, probably about here: https://github.com/DataDog/datadog-cloudformation-resources/blob/26f4473a78445b941e1b5a982f31a5b3be21a1ff/datadog-monitors-monitor-handler/datadog-monitors-monitor.json#L54

Thanks!

hlascelles commented 2 years ago

Related subject: https://github.com/DataDog/datadog-cloudformation-resources/issues/209

github-actions[bot] commented 2 years ago

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.

If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of this project.

  2. Comment that the issue is still reproducible and include updated details requested in the issue template.

hlascelles commented 2 years ago

Still valid and reproducible.

skarimo commented 2 years ago

@hlascelles thanks for opening this. What does your query look like? The comparison should be controllable by the query. For example: "avg(last_5m):avg:kubernetes.cpu.user.total{kube_namespace:spi-ci,cluster_name:boop-dev-blue} by {pod_name} <= 2"

Can you update your query and let us know if that works for you?

hlascelles commented 1 year ago

Yes, that does work, thanks! I think the comparitor is still missing from where it should be, but that alternative works fine. Thanks!