Difference between revisions of "Terraform resource: datadog monitor"

From wikieduonline
Jump to navigation Jump to search
Line 6: Line 6:
 
   message            = "Monitor triggered. Notify: @hipchat-channel"
 
   message            = "Monitor triggered. Notify: @hipchat-channel"
 
   escalation_message = "Escalation message @pagerduty"
 
   escalation_message = "Escalation message @pagerduty"
 
+
 
   query = "avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4"
 
   query = "avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4"
 
+
 
   monitor_thresholds {
 
   monitor_thresholds {
 
     warning  = 2
 
     warning  = 2
 
     critical = 4
 
     critical = 4
 
   }
 
   }
 
+
 
   include_tags = true
 
   include_tags = true
 
+
 
   tags = ["foo:bar", "team:fooBar"]
 
   tags = ["foo:bar", "team:fooBar"]
 
  }
 
  }
 +
 +
== Related ==
 +
* <code>[[datadog_monitor_json]]</code>
  
 
== See also ==
 
== See also ==

Revision as of 07:19, 9 July 2024

resource "datadog_monitor" "foo" {
 name               = "Name for monitor foo"
 type               = "metric alert"
 message            = "Monitor triggered. Notify: @hipchat-channel"
 escalation_message = "Escalation message @pagerduty"

 query = "avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4"

 monitor_thresholds {
   warning  = 2
   critical = 4
 }

 include_tags = true

 tags = ["foo:bar", "team:fooBar"]
}

Related

See also

Advertising: