FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

datadog_monitor

Provides a Datadog monitor resource. This can be used to create and manage Datadog monitors.

Example Usage

# Create a new Datadog monitor
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} > 2"

  thresholds {
	ok = 0
	warning = 1
	critical = 2
  }

  notify_no_data = false
  renotify_interval = 60

  notify_audit = false
  timeout_h = 60
  include_tags = true
  silenced {
    "*" = 0
  }
  tags {
    "foo" = "bar"
    "bar" = "baz"
  }
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Monitors can be imported using their numeric ID, e.g.

$ terraform import datadog_monitor.bytes_received_localhost 2081

See the source of this document at Terraform.io