Skip to content

Commit

Permalink
fix query for ecs service count (#341)
Browse files Browse the repository at this point in the history
Co-authored-by: Mike Porter <mike.porter@daveramsey.com>
  • Loading branch information
mupi2k and Mike Porter authored Mar 27, 2024
1 parent b64f851 commit 5c0052e
Showing 1 changed file with 67 additions and 67 deletions.
134 changes: 67 additions & 67 deletions dashboards/ecs/ecs_cluster_dashboard.sp
Original file line number Diff line number Diff line change
Expand Up @@ -11,98 +11,98 @@ dashboard "ecs_cluster_dashboard" {

# Analysis
card {
query = query.ecs_cluster_count
width = 3
}

card {
query = query.ecs_cluster_active_service_count
width = 3
}
query = query.ecs_cluster_count
width = 3
}

# Assessments
card {
query = query.ecs_cluster_container_insights_disabled
width = 3
}
card {
query = query.ecs_cluster_active_service_count
width = 3
}

# Assessments
card {
query = query.ecs_cluster_container_insights_disabled
width = 3
}

}

container {
}

title = "Assessments"
width = 6
container {

chart {
title = "Container Insights Status"
query = query.ecs_cluster_container_insights_status
type = "donut"
width = 4
title = "Assessments"
width = 6

series "count" {
point "enabled" {
color = "ok"
}
point "disabled" {
color = "alert"
chart {
title = "Container Insights Status"
query = query.ecs_cluster_container_insights_status
type = "donut"
width = 4

series "count" {
point "enabled" {
color = "ok"
}
point "disabled" {
color = "alert"
}
}
}
}
}

container {

title = "Cost"
width = 6
container {

table {
title = "Cost"
width = 6
title = "Forecast"
query = query.ecs_cluster_monthly_forecast_table
}

chart {
width = 6
type = "column"
title = "Monthly Cost - 12 Months"
query = query.ecs_cluster_cost_per_month
table {
width = 6
title = "Forecast"
query = query.ecs_cluster_monthly_forecast_table
}

chart {
width = 6
type = "column"
title = "Monthly Cost - 12 Months"
query = query.ecs_cluster_cost_per_month
}

}

}
container {

container {
title = "Analysis"

title = "Analysis"
chart {
title = "Clusters by Account"
query = query.ecs_cluster_by_account
type = "column"
width = 4
}

chart {
title = "Clusters by Account"
query = query.ecs_cluster_by_account
type = "column"
width = 4
}
chart {
title = "Clusters by Region"
query = query.ecs_cluster_by_region
type = "column"
width = 4
}

chart {
title = "Clusters by Region"
query = query.ecs_cluster_by_region
type = "column"
width = 4
}
chart {
title = "Clusters by Status"
query = query.ecs_cluster_by_status
type = "column"
width = 4
}

chart {
title = "Clusters by Status"
query = query.ecs_cluster_by_status
type = "column"
width = 4
}

}

}

# Card Queries
# Card Queries

query "ecs_cluster_count" {
query "ecs_cluster_count" {
sql = <<-EOQ
select
count(*) as "Clusters"
Expand All @@ -114,7 +114,7 @@ query "ecs_cluster_count" {
query "ecs_cluster_active_service_count" {
sql = <<-EOQ
select
count(*) as "Cluster Active Services"
sum(active_services_count) as "Cluster Active Services"
from
aws_ecs_cluster;
EOQ
Expand Down

0 comments on commit 5c0052e

Please sign in to comment.