Skip to content

Instantly share code, notes, and snippets.

@kmshultz
Created April 19, 2017 19:46
Show Gist options
  • Save kmshultz/23bf92aea315a1596d21920092da1c11 to your computer and use it in GitHub Desktop.
Save kmshultz/23bf92aea315a1596d21920092da1c11 to your computer and use it in GitHub Desktop.
Datadog monitor type confusion
$ terraform version
Terraform v0.9.2
Your version of Terraform is out of date! The latest version
is 0.9.3. You can update by downloading from www.terraform.io
$ terraform apply
datadog_monitor.outliermonitor: Creating...
include_tags: "" => "true"
message: "" => "chef resources outlier alert"
name: "" => "test outlier monitor"
new_host_delay: "" => "<computed>"
notify_no_data: "" => "false"
query: "" => "avg(last_5m):outliers(avg:chef.resources.updated{env:prod} by {host}, 'DBSCAN', 3.0) > 0"
require_full_window: "" => "true"
type: "" => "metric alert"
datadog_monitor.outliermonitor: Creation complete (ID: 1905510)
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
The state of your infrastructure has been saved to the path
below. This state is required to modify and destroy your
infrastructure, so keep it safe. To inspect the complete state
use the `terraform show` command.
State path:
$ terraform refresh
datadog_monitor.outliermonitor: Refreshing state... (ID: 1905510)
$ terraform show
datadog_monitor.outliermonitor:
id = 1905510
escalation_message =
include_tags = true
locked = false
message = chef resources outlier alert
name = test outlier monitor
new_host_delay = 300
no_data_timeframe = 0
notify_audit = false
notify_no_data = false
query = avg(last_5m):outliers(avg:chef.resources.updated{env:prod} by {host}, 'DBSCAN', 3.0) > 0
renotify_interval = 0
require_full_window = true
silenced.% = 0
tags.# = 0
thresholds.% = 0
timeout_h = 0
type = query alert # <---------------------------------------
$ terraform apply
datadog_monitor.outliermonitor: Refreshing state... (ID: 1905510)
datadog_monitor.outliermonitor: Modifying... (ID: 1905510)
type: "query alert" => "metric alert"
datadog_monitor.outliermonitor: Modifications complete (ID: 1905510)
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment