Skip to content

Commit

Permalink
feat(DMVP-6117): Remove dividing from the queries as we use unit
Browse files Browse the repository at this point in the history
  • Loading branch information
greta-dasmeta-com authored Nov 26, 2024
1 parent 7c0f0c6 commit 9ad6df0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/dashboard/modules/widgets/pod/memory/base.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ module "base" {
}

metrics = [
{ label = "Avg", color = "FFC300", expression = "avg(rate(container_memory_usage_bytes{pod=~\"${var.pod}-[^-]+-[^-]+$\", namespace=\"${var.namespace}\"}[${var.period}m])) / 1024 / 1024 * 100" },
{ label = "Max", color = "FF774D", expression = "max(rate(container_memory_usage_bytes{pod=~\"${var.pod}-[^-]+-[^-]+$\", namespace=\"${var.namespace}\"}[${var.period}m])) / 1024 / 1024 * 100"},
{ label = "Request", color = "007CEF", expression = "max(kube_pod_container_resource_requests{pod=~\"${var.pod}-[^-]+-[^-]+$\", namespace=\"${var.namespace}\", resource=\"memory\"}) / 1024 / 1024" },
{ label = "Limit", color = "FF0F3C", expression = "max(kube_pod_container_resource_limits{pod=~\"${var.pod}-[^-]+-[^-]+$\", namespace=\"${var.namespace}\", resource=\"memory\"}) / 1024 / 1024" },
{ label = "Avg", color = "FFC300", expression = "avg(rate(container_memory_usage_bytes{pod=~\"${var.pod}-[^-]+-[^-]+$\", namespace=\"${var.namespace}\"}[${var.period}m]))" },
{ label = "Max", color = "FF774D", expression = "max(rate(container_memory_usage_bytes{pod=~\"${var.pod}-[^-]+-[^-]+$\", namespace=\"${var.namespace}\"}[${var.period}m]))"},
{ label = "Request", color = "007CEF", expression = "max(kube_pod_container_resource_requests{pod=~\"${var.pod}-[^-]+-[^-]+$\", namespace=\"${var.namespace}\", resource=\"memory\"})" },
{ label = "Limit", color = "FF0F3C", expression = "max(kube_pod_container_resource_limits{pod=~\"${var.pod}-[^-]+-[^-]+$\", namespace=\"${var.namespace}\", resource=\"memory\"})" },
]
}

0 comments on commit 9ad6df0

Please sign in to comment.