terraform-provider-datadog
terraform-provider-datadog copied to clipboard
[Feature Request] `on_missing_data` not supported for log monitors
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
1.1.7
Affected Resource(s)
datadog_monitor
Expected Behavior
Able to specify on_missing_data
in a datadog_monitor
resource with type = "log alert"
.
Actual Behavior
The field value defaults to "default"
in the created resource.
same problem with type = error-tracking alert
Hi, what version of the Datadog terraform provider are you using? Could you share a sample config as well.
I tested out the below resource with v3.15.1 and on_missing_data
property is set properly on the created monitor resource:
resource "datadog_monitor" "foo" {
name = "Log alert monitor"
type = "log alert"
message = "some message Notify: @hipchat-channel"
escalation_message = "the situation has escalated @pagerduty"
query = "logs(\"service:foo AND type:error\").index(\"main\").rollup(\"count\").by(\"source\").last(\"5m\") > 2"
monitor_thresholds {
warning = "1.0"
critical = "2.0"
}
renotify_interval = 60
renotify_occurrences = 5
renotify_statuses = ["alert", "warn"]
notify_audit = false
timeout_h = 1
group_retention_duration = "2d"
on_missing_data = "show_no_data"
new_host_delay = 600
evaluation_delay = 700
include_tags = true
require_full_window = true
locked = false
tags = ["foo:bar", "baz"]
enable_logs_sample = true
}
Closing this issue for now as we were unable to reproduce. Feel free to re-open and share a sample config if the behavior is still occurring for you. Thanks!
Apologies, I have missed your response. I have now upgraded to 3.19.1 and it works as expected.
@drmaciej for above just changing Datadog provider version 3.19.1 works or even Terraform needs a specific version or above ?