Skip to content

Commit 3717253

Browse files
VED-1082: Update CloudWatch Dashboard metrics to reflect ECS utilization changes (#1247)
* Update CloudWatch Dashboard metrics to reflect ECS utilization changes - Changed the statistics for Running Task Count from Average to SampleCount. - Removed the Pending Task Count metric from the dashboard. - Updated CPU and Memory metrics to use AWS/ECS namespace and changed their statistics from Average to Maximum. - Renamed titles for CPU and Memory metrics to improve clarity. * Update infrastructure/account/cloudwatch_dashboards.tf Co-authored-by: Ed Hall <239591530+edhall-nhs@users.noreply.github.com> * Update infrastructure/account/cloudwatch_dashboards.tf Co-authored-by: Ed Hall <239591530+edhall-nhs@users.noreply.github.com> * Update infrastructure/account/cloudwatch_dashboards.tf Co-authored-by: Ed Hall <239591530+edhall-nhs@users.noreply.github.com> * Update title for ECS Task Count in CloudWatch Dashboard * Adjust CloudWatch dashboard layout by modifying metric positions and dimensions for improved visualization. * temp test fix * revert test fix --------- Co-authored-by: Ed Hall <239591530+edhall-nhs@users.noreply.github.com>
1 parent ac6dcc4 commit 3717253

1 file changed

Lines changed: 17 additions & 35 deletions

File tree

infrastructure/account/cloudwatch_dashboards.tf

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -631,14 +631,14 @@ resource "aws_cloudwatch_dashboard" "imms-metrics-dashboard" {
631631
"height" : 6,
632632
"properties" : {
633633
"metrics" : [
634-
for cluster in local.ecs_clusters : ["AWS/ECS", "RunningTaskCount", "ClusterName", cluster, { region : var.aws_region }]
634+
for cluster in local.ecs_clusters : ["ECS/ContainerInsights", "TaskCount", "ClusterName", cluster, { region : var.aws_region }]
635635
],
636636
"view" : "timeSeries",
637637
"stacked" : false,
638638
"region" : var.aws_region,
639-
"stat" : "Average",
639+
"stat" : "SampleCount",
640640
"period" : 300,
641-
"title" : "ECS - Running Task Count"
641+
"title" : "ECS - Task Count"
642642
}
643643
},
644644
{
@@ -649,14 +649,14 @@ resource "aws_cloudwatch_dashboard" "imms-metrics-dashboard" {
649649
"height" : 6,
650650
"properties" : {
651651
"metrics" : [
652-
for cluster in local.ecs_clusters : ["AWS/ECS", "PendingTaskCount", "ClusterName", cluster, { region : var.aws_region }]
652+
for cluster in local.ecs_clusters : ["ECS/ContainerInsights", "CpuUtilized", "ClusterName", cluster, { region : var.aws_region }]
653653
],
654654
"view" : "timeSeries",
655655
"stacked" : false,
656656
"region" : var.aws_region,
657-
"stat" : "Average",
657+
"stat" : "Maximum",
658658
"period" : 300,
659-
"title" : "ECS - Pending Task Count"
659+
"title" : "ECS - CPU Utilization"
660660
}
661661
},
662662
{
@@ -667,38 +667,20 @@ resource "aws_cloudwatch_dashboard" "imms-metrics-dashboard" {
667667
"height" : 6,
668668
"properties" : {
669669
"metrics" : [
670-
for cluster in local.ecs_clusters : ["ECS/ContainerInsights", "ContainerCpuUtilized", "ClusterName", cluster, { region : var.aws_region }]
671-
],
672-
"view" : "timeSeries",
673-
"stacked" : false,
674-
"region" : var.aws_region,
675-
"stat" : "Average",
676-
"period" : 300,
677-
"title" : "ECS Container Insights - CPU Utilized"
678-
}
679-
},
680-
{
681-
"type" : "metric",
682-
"x" : 0,
683-
"y" : 50,
684-
"width" : 12,
685-
"height" : 6,
686-
"properties" : {
687-
"metrics" : [
688-
for cluster in local.ecs_clusters : ["ECS/ContainerInsights", "ContainerMemoryUtilized", "ClusterName", cluster, { region : var.aws_region }]
670+
for cluster in local.ecs_clusters : ["ECS/ContainerInsights", "MemoryUtilized", "ClusterName", cluster, { region : var.aws_region }]
689671
],
690672
"view" : "timeSeries",
691673
"stacked" : false,
692674
"region" : var.aws_region,
693-
"stat" : "Average",
675+
"stat" : "Maximum",
694676
"period" : 300,
695-
"title" : "ECS Container Insights - Memory Utilized"
677+
"title" : "ECS - Memory Utilization"
696678
}
697679
},
698680
{
699681
"type" : "text",
700682
"x" : 0,
701-
"y" : 56,
683+
"y" : 50,
702684
"width" : 24,
703685
"height" : 1,
704686
"properties" : {
@@ -708,7 +690,7 @@ resource "aws_cloudwatch_dashboard" "imms-metrics-dashboard" {
708690
{
709691
"type" : "metric",
710692
"x" : 0,
711-
"y" : 57,
693+
"y" : 51,
712694
"width" : 6,
713695
"height" : 6,
714696
"properties" : {
@@ -722,7 +704,7 @@ resource "aws_cloudwatch_dashboard" "imms-metrics-dashboard" {
722704
{
723705
"type" : "metric",
724706
"x" : 6,
725-
"y" : 57,
707+
"y" : 51,
726708
"width" : 6,
727709
"height" : 6,
728710
"properties" : {
@@ -738,7 +720,7 @@ resource "aws_cloudwatch_dashboard" "imms-metrics-dashboard" {
738720
{
739721
"type" : "metric",
740722
"x" : 12,
741-
"y" : 57,
723+
"y" : 51,
742724
"width" : 6,
743725
"height" : 6,
744726
"properties" : {
@@ -756,7 +738,7 @@ resource "aws_cloudwatch_dashboard" "imms-metrics-dashboard" {
756738
{
757739
"type" : "metric",
758740
"x" : 0,
759-
"y" : 63,
741+
"y" : 57,
760742
"width" : 6,
761743
"height" : 6,
762744
"properties" : {
@@ -773,7 +755,7 @@ resource "aws_cloudwatch_dashboard" "imms-metrics-dashboard" {
773755
{
774756
"type" : "metric",
775757
"x" : 6,
776-
"y" : 63,
758+
"y" : 57,
777759
"width" : 6,
778760
"height" : 6,
779761
"properties" : {
@@ -791,7 +773,7 @@ resource "aws_cloudwatch_dashboard" "imms-metrics-dashboard" {
791773
{
792774
"type" : "text",
793775
"x" : 0,
794-
"y" : 69,
776+
"y" : 63,
795777
"width" : 24,
796778
"height" : 1,
797779
"properties" : {
@@ -801,7 +783,7 @@ resource "aws_cloudwatch_dashboard" "imms-metrics-dashboard" {
801783
{
802784
"type" : "alarm",
803785
"x" : 0,
804-
"y" : 70,
786+
"y" : 64,
805787
"width" : 24,
806788
"height" : var.environment == "dev" ? 5 : 10,
807789
"properties" : {

0 commit comments

Comments
 (0)