Skip to content

Instantly share code, notes, and snippets.

@maartenvanderhoef
Created July 13, 2018 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maartenvanderhoef/83047f578486dce8f5995d3c728b99d3 to your computer and use it in GitHub Desktop.
Save maartenvanderhoef/83047f578486dce8f5995d3c728b99d3 to your computer and use it in GitHub Desktop.
locals{
working_graph = {
title = "working"
viz = "timeseries"
request = [
{
q= "${format("avg:aws.applicationelb.target_response_time.p95{targetgroup:%s}","targetgroup/qa-web-backend-web/abcdefghij")}"
aggregator = "avg"
type = "line"
style {
palette = "dog_classic"
type = "solid"
width = "normal"
}
}]
}
not_working_graph = {
title = "not_working"
viz = "timeseries"
request = [
{
q= "${format("avg:aws.applicationelb.target_response_time.p95{targetgroup:%s}",local.backend_web_tg)}"
aggregator = "avg"
type = "line"
style {
palette = "dog_classic"
type = "solid"
width = "normal"
}
}]
}
}
resource "datadog_timeboard" "working" {
title = "ECS Cluster graphs for ${terraform.workspace}"
description = "ECS Cluster graphs for ${terraform.workspace}"
read_only = true
graph = ["${local.working_graph}"]
}
resource "datadog_timeboard" "not_working" {
title = "ECS Cluster graphs for ${terraform.workspace}"
description = "ECS Cluster graphs for ${terraform.workspace}"
read_only = true
graph = ["${local.not_working_graph}"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment