From 1c327beead9681b59349fcdba320be281d2d540d Mon Sep 17 00:00:00 2001 From: Nathan Slaughter <28688390+nslaughter@users.noreply.github.com> Date: Thu, 16 Mar 2023 16:43:51 -0500 Subject: [PATCH 1/7] [ecs] ECS to UQL --- modules/ecs-dashboard/main.tf | 85 ++++++++++++----------------------- 1 file changed, 29 insertions(+), 56 deletions(-) diff --git a/modules/ecs-dashboard/main.tf b/modules/ecs-dashboard/main.tf index 800bdf5..66f9283 100644 --- a/modules/ecs-dashboard/main.tf +++ b/modules/ecs-dashboard/main.tf @@ -8,9 +8,10 @@ terraform { required_version = ">= v1.0.11" } -resource "lightstep_metric_dashboard" "aws_ecs_dashboard" { - project_name = var.lightstep_project - dashboard_name = "AWS ECS" +resource "lightstep_dashboard" "aws_ecs_dashboard" { + project_name = var.lightstep_project + dashboard_name = "AWS ECS" + dashboard_description = "Monitor AWS ECS with this summary dashboard." chart { name = "CPU Utilization" @@ -18,19 +19,12 @@ resource "lightstep_metric_dashboard" "aws_ecs_dashboard" { type = "timeseries" query { - query_name = "a" - display = "line" - hidden = false - - metric = "aws.ecs.cpu_utilization_max" - timeseries_operator = "last" - - - group_by { - aggregation_method = "sum" - keys = ["ClusterName", ] - } - + query_name = "a" + display = "line" + hidden = false + query_string = <