Skip to content

Commit

Permalink
Update Watchdog monitor example (#2223)
Browse files Browse the repository at this point in the history
* Update Watchdog monitor example

* update source file

---------

Co-authored-by: Sherzod Karimov <[email protected]>
  • Loading branch information
Nils and skarimo authored Dec 27, 2023
1 parent 4c83c4e commit ee9c9da
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
11 changes: 4 additions & 7 deletions docs/guides/monitors.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@ resource "datadog_monitor" "bar" {

```terraform
resource "datadog_monitor" "watchdog_monitor" {
name = "Watchdog Monitor TF"
name = "Watchdog detected an anomaly: {{event.title}}"
type = "event-v2 alert"
message = "Check out this Watchdog Service Monitor"
escalation_message = "Escalation message"
message = "Watchdog monitor created from Terraform"
query = "events(\"priority:all sources:watchdog tags:(story_type:service env:test_env service:testservice_aggregate)\").rollup(\"count\").by(\"service,resource_name\").last(\"30m\") > 0"
query = "events(\"source:watchdog story_category:apm env:test_env\").rollup(\"count\").by(\"story_key,service,resource_name\").last(\"30m\") > 0"
include_tags = true
tags = ["foo:bar", "baz"]
tags = ["terraform:true"]
}
```

Expand Down
13 changes: 5 additions & 8 deletions examples/guides/watchdog_monitor.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
resource "datadog_monitor" "watchdog_monitor" {
name = "Watchdog Monitor TF"
name = "Watchdog detected an anomaly: {{event.title}}"
type = "event-v2 alert"
message = "Check out this Watchdog Service Monitor"
escalation_message = "Escalation message"
message = "Watchdog monitor created from Terraform"

query = "events(\"priority:all sources:watchdog tags:(story_type:service env:test_env service:testservice_aggregate)\").rollup(\"count\").by(\"service,resource_name\").last(\"30m\") > 0"
query = "events(\"source:watchdog story_category:apm env:test_env\").rollup(\"count\").by(\"story_key,service,resource_name\").last(\"30m\") > 0"

include_tags = true

tags = ["foo:bar", "baz"]
}
tags = ["terraform:true"]
}

0 comments on commit ee9c9da

Please sign in to comment.