From 9a6eb1cb93c7177dd0325ff39ee21aeb083df067 Mon Sep 17 00:00:00 2001 From: thegentlemanphysicist Date: Thu, 5 Oct 2023 15:54:00 -0700 Subject: [PATCH] chore: create dashboard with first panel (#46) * chore: create dashboard with first panel * chore: fix chart type --- terraform/gold-eb75ad-team/dashboards.tf | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/terraform/gold-eb75ad-team/dashboards.tf b/terraform/gold-eb75ad-team/dashboards.tf index 5b6504d..6a806ac 100644 --- a/terraform/gold-eb75ad-team/dashboards.tf +++ b/terraform/gold-eb75ad-team/dashboards.tf @@ -262,3 +262,50 @@ resource "sysdig_monitor_dashboard" "pods_cpu" { } } } + + +resource "sysdig_monitor_dashboard" "general_pod_performance" { + name = "Memory Network and CPU for pods" + description = "The general perfomance dashboard for production prod" + + share { + role = "ROLE_RESOURCE_EDIT" + member { + type = "TEAM" + id = 40193 + } + } + + scope { + metric = "kube_cluster_name" + comparator = "in" + value = ["gold"] + variable = "cluster_name" + } + + scope { + metric = "kube_namespace_name" + comparator = "in" + value = ["eb75ad-prod"] + variable = "namespace_name" + } + + panel { + pos_x = 0 + pos_y = 0 + width = 8 + height = 4 + type = "timechart" + name = "Memory used by pod vs memory request keycloak" + description = "Keycloak memory used by pods compared to the requested memory" + + query { + promql = "(sum by (kube_workload_name,kube_pod_name,kube_cluster_name,kube_namespace_name)(rate(sysdig_container_memory_used_bytes{kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}[$__interval])))/ (sum by (kube_workload_name, kube_pod_name,kube_cluster_name,kube_namespace_name)(kube_pod_container_resource_requests{resource='memory',kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}))" + unit = "percent" + } + } + + + + +}