Last active
January 17, 2019 15:05
-
-
Save saml/ae327e6cc9b807009fe75749299a6a51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# metric_monitor.tf | |
resource "datadog_monitor" "metric_monitor" { | |
name = "${var.title}" | |
type = "metric alert" | |
query = "${var.query}" | |
message = "${var.message}" | |
} | |
# yolo.tf | |
module "yolo_monitor" { | |
source = "./.modules/metric_monitor" | |
title = "Something yolo happened" | |
query = "avg(last_15m):max:some.metric > 10" | |
message = "Something happened @slack-my-team-notification" | |
} | |
# yolo2.tf | |
module "yolo_monitor2" { | |
source = "./.modules/metric_monitor" | |
title = "Something different happened" | |
query = "avg(last_15m):max:some.other.metric > 20" | |
message = "Something different happened @slack-my-team-notification" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment