2021-04-26 14:27:19 +00:00
{
2024-07-19 14:14:43 +00:00
"editable" : false ,
"panels" : [
2021-04-26 14:27:19 +00:00
{
2024-07-19 14:14:43 +00:00
"datasource" : {
"type" : "datasource" ,
"uid" : "-- Mixed --"
} ,
"fieldConfig" : {
"defaults" : {
"custom" : {
"fillOpacity" : 10 ,
"showPoints" : "never" ,
"spanNulls" : true ,
"stacking" : {
"mode" : "normal"
2021-04-26 14:27:19 +00:00
}
2024-07-19 14:14:43 +00:00
}
} ,
"overrides" : [
{
"matcher" : {
"id" : "byName" ,
"options" : "max capacity"
} ,
"properties" : [
{
"id" : "color" ,
"value" : {
"fixedColor" : "red" ,
"mode" : "fixed"
}
} ,
{
"id" : "custom.stacking" ,
"value" : {
"mode" : "none"
}
} ,
{
"id" : "custom.hideFrom" ,
"value" : {
"legend" : false ,
"tooltip" : true ,
"viz" : false
}
} ,
{
"id" : "custom.lineStyle" ,
"value" : {
"dash" : [
10 ,
10
] ,
"fill" : "dash"
}
}
]
}
]
} ,
"gridPos" : {
"h" : 6 ,
"w" : 24 ,
"x" : 0 ,
"y" : 0
} ,
"id" : 1 ,
"interval" : "1m" ,
"options" : {
"legend" : {
"asTable" : true ,
"calcs" : [
"lastNotNull"
2021-04-26 14:27:19 +00:00
] ,
2024-07-19 14:14:43 +00:00
"displayMode" : "table" ,
"placement" : "right" ,
"showLegend" : true
} ,
"tooltip" : {
"mode" : "single"
}
} ,
"pluginVersion" : "v11.0.0" ,
"targets" : [
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "sum(kube_node_status_capacity{cluster=\"$cluster\", node=~\"$node\", resource=\"cpu\"})" ,
"legendFormat" : "max capacity"
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", node=~\"$node\"}) by (pod)" ,
"legendFormat" : "{{pod}}"
2021-04-26 14:27:19 +00:00
}
] ,
"title" : "CPU Usage" ,
2024-07-19 14:14:43 +00:00
"type" : "timeseries"
2021-04-26 14:27:19 +00:00
} ,
{
2024-07-19 14:14:43 +00:00
"datasource" : {
"type" : "datasource" ,
"uid" : "-- Mixed --"
} ,
"fieldConfig" : {
"overrides" : [
{
"matcher" : {
"id" : "byRegexp" ,
"options" : "/%/"
} ,
"properties" : [
{
"id" : "unit" ,
"value" : "percentunit"
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "Pod"
} ,
"properties" : [
{
"id" : "links" ,
"value" : [
{
"title" : "Drill down to pods" ,
"url" : "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?${datasource:queryparam}&var-cluster=$cluster&var-namespace=$namespace&var-pod=${__data.fields.Pod}"
}
]
}
]
}
]
} ,
"gridPos" : {
"h" : 6 ,
"w" : 24 ,
"x" : 0 ,
"y" : 6
} ,
"id" : 2 ,
"pluginVersion" : "v11.0.0" ,
"targets" : [
2021-04-26 14:27:19 +00:00
{
2024-07-19 14:14:43 +00:00
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", node=~\"$node\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", node=~\"$node\"}) by (pod) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", node=~\"$node\"}) by (pod) / sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
2021-04-26 14:27:19 +00:00
}
] ,
"title" : "CPU Quota" ,
2024-07-19 14:14:43 +00:00
"transformations" : [
2021-04-26 14:27:19 +00:00
{
2024-07-19 14:14:43 +00:00
"id" : "joinByField" ,
"options" : {
"byField" : "pod" ,
"mode" : "outer"
}
} ,
{
"id" : "organize" ,
"options" : {
"excludeByName" : {
"Time" : true ,
"Time 1" : true ,
"Time 2" : true ,
"Time 3" : true ,
"Time 4" : true ,
"Time 5" : true
} ,
"renameByName" : {
"Value #A" : "CPU Usage" ,
"Value #B" : "CPU Requests" ,
"Value #C" : "CPU Requests %" ,
"Value #D" : "CPU Limits" ,
"Value #E" : "CPU Limits %" ,
"pod" : "Pod"
2022-09-16 09:21:38 +00:00
}
2024-07-19 14:14:43 +00:00
}
}
] ,
"type" : "table"
} ,
{
"datasource" : {
"type" : "datasource" ,
"uid" : "-- Mixed --"
} ,
"fieldConfig" : {
"defaults" : {
"custom" : {
"fillOpacity" : 10 ,
"showPoints" : "never" ,
"spanNulls" : true ,
"stacking" : {
"mode" : "normal"
2021-04-26 14:27:19 +00:00
}
2024-07-19 14:14:43 +00:00
} ,
"unit" : "bytes"
} ,
"overrides" : [
{
"matcher" : {
"id" : "byName" ,
"options" : "max capacity"
} ,
"properties" : [
{
"id" : "color" ,
"value" : {
"fixedColor" : "red" ,
"mode" : "fixed"
}
} ,
{
"id" : "custom.stacking" ,
"value" : {
"mode" : "none"
}
} ,
{
"id" : "custom.hideFrom" ,
"value" : {
"legend" : false ,
"tooltip" : true ,
"viz" : false
}
} ,
{
"id" : "custom.lineStyle" ,
"value" : {
"dash" : [
10 ,
10
] ,
"fill" : "dash"
}
}
]
}
]
} ,
"gridPos" : {
"h" : 6 ,
"w" : 24 ,
"x" : 0 ,
"y" : 12
} ,
"id" : 3 ,
"interval" : "1m" ,
"options" : {
"legend" : {
"asTable" : true ,
"calcs" : [
"lastNotNull"
2021-04-26 14:27:19 +00:00
] ,
2024-07-19 14:14:43 +00:00
"displayMode" : "table" ,
"placement" : "right" ,
"showLegend" : true
} ,
"tooltip" : {
"mode" : "single"
}
} ,
"pluginVersion" : "v11.0.0" ,
"targets" : [
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "sum(kube_node_status_capacity{cluster=\"$cluster\", node=~\"$node\", resource=\"memory\"})" ,
"legendFormat" : "max capacity"
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\", container!=\"\"}) by (pod)" ,
"legendFormat" : "{{pod}}"
2021-04-26 14:27:19 +00:00
}
] ,
2024-07-19 14:14:43 +00:00
"title" : "Memory Usage (w/o cache)" ,
"type" : "timeseries"
2021-04-26 14:27:19 +00:00
} ,
{
2024-07-19 14:14:43 +00:00
"datasource" : {
"type" : "datasource" ,
"uid" : "-- Mixed --"
} ,
"fieldConfig" : {
"defaults" : {
"unit" : "bytes"
} ,
"overrides" : [
{
"matcher" : {
"id" : "byRegexp" ,
"options" : "/%/"
} ,
"properties" : [
{
"id" : "unit" ,
"value" : "percentunit"
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "Pod"
} ,
"properties" : [
{
"id" : "links" ,
"value" : [
{
"title" : "Drill down to pods" ,
"url" : "/d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?${datasource:queryparam}&var-cluster=$cluster&var-namespace=$namespace&var-pod=${__data.fields.Pod}"
}
]
}
]
}
]
} ,
"gridPos" : {
"h" : 6 ,
"w" : 24 ,
"x" : 0 ,
"y" : 18
} ,
"id" : 4 ,
"pluginVersion" : "v11.0.0" ,
"targets" : [
2021-04-26 14:27:19 +00:00
{
2024-07-19 14:14:43 +00:00
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests{cluster=\"$cluster\", node=~\"$node\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(node_namespace_pod_container:container_memory_working_set_bytes{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod) / sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{cluster=\"$cluster\", node=~\"$node\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(node_namespace_pod_container:container_memory_rss{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(node_namespace_pod_container:container_memory_cache{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(node_namespace_pod_container:container_memory_swap{cluster=\"$cluster\", node=~\"$node\",container!=\"\"}) by (pod)" ,
"format" : "table" ,
"instant" : true
2021-04-26 14:27:19 +00:00
}
] ,
"title" : "Memory Quota" ,
2024-07-19 14:14:43 +00:00
"transformations" : [
{
"id" : "joinByField" ,
"options" : {
"byField" : "pod" ,
"mode" : "outer"
}
} ,
{
"id" : "organize" ,
"options" : {
"excludeByName" : {
"Time" : true ,
"Time 1" : true ,
"Time 2" : true ,
"Time 3" : true ,
"Time 4" : true ,
"Time 5" : true ,
"Time 6" : true ,
"Time 7" : true ,
"Time 8" : true
} ,
"renameByName" : {
"Value #A" : "Memory Usage" ,
"Value #B" : "Memory Requests" ,
"Value #C" : "Memory Requests %" ,
"Value #D" : "Memory Limits" ,
"Value #E" : "Memory Limits %" ,
"Value #F" : "Memory Usage (RSS)" ,
"Value #G" : "Memory Usage (Cache)" ,
"Value #H" : "Memory Usage (Swap)" ,
"pod" : "Pod"
}
}
}
] ,
"type" : "table"
2021-04-26 14:27:19 +00:00
}
] ,
2024-07-19 14:14:43 +00:00
"refresh" : "10s" ,
"schemaVersion" : 39 ,
2021-04-26 14:27:19 +00:00
"tags" : [
"kubernetes"
] ,
"templating" : {
"list" : [
{
"current" : {
2024-07-19 14:14:43 +00:00
"selected" : true ,
2021-04-26 14:27:19 +00:00
"text" : "default" ,
"value" : "default"
} ,
"hide" : 0 ,
2024-04-04 13:39:36 +00:00
"label" : "Data source" ,
2021-04-26 14:27:19 +00:00
"name" : "datasource" ,
"query" : "prometheus" ,
"regex" : "" ,
"type" : "datasource"
} ,
{
2024-07-19 14:14:43 +00:00
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
"hide" : 2 ,
2024-07-19 14:14:43 +00:00
"label" : "cluster" ,
2021-04-26 14:27:19 +00:00
"name" : "cluster" ,
2022-09-16 09:21:38 +00:00
"query" : "label_values(up{job=\"kube-state-metrics\"}, cluster)" ,
2021-04-26 14:27:19 +00:00
"refresh" : 2 ,
"sort" : 1 ,
2024-07-19 14:14:43 +00:00
"type" : "query"
2021-04-26 14:27:19 +00:00
} ,
{
2024-07-19 14:14:43 +00:00
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
"hide" : 0 ,
2024-07-19 14:14:43 +00:00
"label" : "node" ,
2021-04-26 14:27:19 +00:00
"multi" : true ,
"name" : "node" ,
2022-09-16 09:21:38 +00:00
"query" : "label_values(kube_node_info{cluster=\"$cluster\"}, node)" ,
2021-04-26 14:27:19 +00:00
"refresh" : 2 ,
2024-07-19 14:14:43 +00:00
"type" : "query"
2021-04-26 14:27:19 +00:00
}
]
} ,
"time" : {
"from" : "now-1h" ,
"to" : "now"
} ,
"timezone" : "UTC" ,
2021-04-26 14:46:35 +00:00
"title" : "Compute Resources / Node (Pods)" ,
2024-07-19 14:14:43 +00:00
"uid" : "200ac8fdbfbb74b39aff88118e4d1c2c"
2021-04-26 14:27:19 +00:00
}