2021-04-26 14:27:19 +00:00
{
2024-07-19 14:14:43 +00:00
"editable" : false ,
2024-10-21 14:41:14 +00:00
"links" : [
{
"asDropdown" : true ,
"includeVars" : true ,
"keepTime" : true ,
"tags" : [
"kubernetes"
] ,
"targetBlank" : false ,
"title" : "Kubernetes" ,
"type" : "dashboards"
}
] ,
2024-07-19 14:14:43 +00:00
"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
}
} ,
"overrides" : [
{
"matcher" : {
"id" : "byFrameRefID" ,
"options" : "B"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"properties" : [
{
"id" : "custom.lineStyle" ,
"value" : {
"fill" : "dash"
}
} ,
{
"id" : "custom.lineWidth" ,
"value" : 2
} ,
{
"id" : "color" ,
"value" : {
"fixedColor" : "red" ,
"mode" : "fixed"
}
}
]
} ,
{
"matcher" : {
"id" : "byFrameRefID" ,
"options" : "C"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"properties" : [
{
"id" : "custom.lineStyle" ,
"value" : {
"fill" : "dash"
}
} ,
{
"id" : "custom.lineWidth" ,
"value" : 2
} ,
{
"id" : "color" ,
"value" : {
"fixedColor" : "orange" ,
"mode" : "fixed"
}
}
]
}
]
} ,
"gridPos" : {
"h" : 7 ,
"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"
}
} ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"targets" : [
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"legendFormat" : "{{workload}} - {{workload_type}}"
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-10-21 14:41:14 +00:00
"expr" : "scalar(max(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"requests.cpu|cpu\"}))" ,
2024-07-19 14:14:43 +00:00
"legendFormat" : "quota - requests"
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-10-21 14:41:14 +00:00
"expr" : "scalar(max(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"limits.cpu\"}))" ,
2024-07-19 14:14:43 +00:00
"legendFormat" : "quota - limits"
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" : "/%/"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"properties" : [
{
"id" : "unit" ,
"value" : "percentunit"
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "Workload"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"properties" : [
{
"id" : "links" ,
"value" : [
{
"title" : "Drill down to workloads" ,
"url" : "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?${datasource:queryparam}&var-cluster=$cluster&var-namespace=$namespace&var-type=${__data.fields.Type}&var-workload=${__data.fields.Workload}"
}
]
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "Running Pods"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"properties" : [
{
"id" : "unit" ,
"value" : "none"
}
]
}
]
} ,
"gridPos" : {
"h" : 7 ,
"w" : 24 ,
"x" : 0 ,
"y" : 7
} ,
"id" : 2 ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"targets" : [
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "count(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}) by (workload, workload_type)" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"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(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"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(\n node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"cpu\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"format" : "table" ,
"instant" : true
}
] ,
"title" : "CPU Quota" ,
"transformations" : [
{
"id" : "joinByField" ,
"options" : {
"byField" : "workload" ,
"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 ,
"workload_type 2" : true ,
"workload_type 3" : true ,
"workload_type 4" : true ,
"workload_type 5" : true ,
"workload_type 6" : true
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"indexByName" : {
"Time 1" : 0 ,
"Time 2" : 1 ,
"Time 3" : 2 ,
"Time 4" : 3 ,
"Time 5" : 4 ,
"Time 6" : 5 ,
"Value #A" : 8 ,
"Value #B" : 9 ,
"Value #C" : 10 ,
"Value #D" : 11 ,
"Value #E" : 12 ,
"Value #F" : 13 ,
"workload" : 6 ,
"workload_type 1" : 7 ,
"workload_type 2" : 14 ,
"workload_type 3" : 15 ,
"workload_type 4" : 16 ,
"workload_type 5" : 17 ,
"workload_type 6" : 18
} ,
"renameByName" : {
"Value #A" : "Running Pods" ,
"Value #B" : "CPU Usage" ,
"Value #C" : "CPU Requests" ,
"Value #D" : "CPU Requests %" ,
"Value #E" : "CPU Limits" ,
"Value #F" : "CPU Limits %" ,
"workload" : "Workload" ,
"workload_type 1" : "Type"
2021-04-26 14:27:19 +00:00
}
2024-07-19 14:14:43 +00:00
}
2021-04-26 14:27:19 +00:00
}
] ,
2024-07-19 14:14:43 +00:00
"type" : "table"
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
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"unit" : "bytes"
} ,
"overrides" : [
{
"matcher" : {
"id" : "byFrameRefID" ,
"options" : "B"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"properties" : [
{
"id" : "custom.lineStyle" ,
"value" : {
"fill" : "dash"
}
} ,
{
"id" : "custom.lineWidth" ,
"value" : 2
} ,
{
"id" : "color" ,
"value" : {
"fixedColor" : "red" ,
"mode" : "fixed"
}
}
]
} ,
{
"matcher" : {
"id" : "byFrameRefID" ,
"options" : "C"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"properties" : [
{
"id" : "custom.lineStyle" ,
"value" : {
"fill" : "dash"
}
} ,
{
"id" : "custom.lineWidth" ,
"value" : 2
} ,
{
"id" : "color" ,
"value" : {
"fixedColor" : "orange" ,
"mode" : "fixed"
}
}
]
}
]
} ,
"gridPos" : {
"h" : 7 ,
"w" : 24 ,
"x" : 0 ,
"y" : 14
} ,
"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"
}
} ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"targets" : [
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "sum(\n container_memory_working_set_bytes{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"legendFormat" : "{{workload}} - {{workload_type}}"
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-10-21 14:41:14 +00:00
"expr" : "scalar(max(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"requests.memory|memory\"}))" ,
2024-07-19 14:14:43 +00:00
"legendFormat" : "quota - requests"
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
2024-10-21 14:41:14 +00:00
"expr" : "scalar(max(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"limits.memory\"}))" ,
2024-07-19 14:14:43 +00:00
"legendFormat" : "quota - limits"
2021-04-26 14:27:19 +00:00
}
] ,
"title" : "Memory 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" : {
"defaults" : {
"unit" : "bytes"
} ,
"overrides" : [
{
"matcher" : {
"id" : "byRegexp" ,
"options" : "/%/"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"properties" : [
{
"id" : "unit" ,
"value" : "percentunit"
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "Workload"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"properties" : [
{
"id" : "links" ,
"value" : [
{
"title" : "Drill down to workloads" ,
"url" : "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?${datasource:queryparam}&var-cluster=$cluster&var-namespace=$namespace&var-type=${__data.fields.Type}&var-workload=${__data.fields.Workload}"
}
]
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "Running Pods"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"properties" : [
{
"id" : "unit" ,
"value" : "none"
}
]
}
]
} ,
"gridPos" : {
"h" : 7 ,
"w" : 24 ,
"x" : 0 ,
"y" : 21
} ,
"id" : 4 ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"targets" : [
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "count(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}) by (workload, workload_type)" ,
"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(\n container_memory_working_set_bytes{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(\n container_memory_working_set_bytes{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_requests{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"format" : "table" ,
"instant" : true
} ,
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
} ,
"expr" : "sum(\n container_memory_working_set_bytes{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\", container!=\"\", image!=\"\"}\n * on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n/sum(\n kube_pod_container_resource_limits{job=\"kube-state-metrics\", cluster=\"$cluster\", namespace=\"$namespace\", resource=\"memory\"}\n* on(namespace,pod)\n group_left(workload, workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}\n) by (workload, workload_type)\n" ,
"format" : "table" ,
"instant" : true
2021-04-26 14:27:19 +00:00
}
] ,
"title" : "Memory 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" : "workload" ,
"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 ,
"workload_type 2" : true ,
"workload_type 3" : true ,
"workload_type 4" : true ,
"workload_type 5" : true ,
"workload_type 6" : true
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"indexByName" : {
"Time 1" : 0 ,
"Time 2" : 1 ,
"Time 3" : 2 ,
"Time 4" : 3 ,
"Time 5" : 4 ,
"Time 6" : 5 ,
"Value #A" : 8 ,
"Value #B" : 9 ,
"Value #C" : 10 ,
"Value #D" : 11 ,
"Value #E" : 12 ,
"Value #F" : 13 ,
"workload" : 6 ,
"workload_type 1" : 7 ,
"workload_type 2" : 14 ,
"workload_type 3" : 15 ,
"workload_type 4" : 16 ,
"workload_type 5" : 17 ,
"workload_type 6" : 18
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"renameByName" : {
"Value #A" : "Running Pods" ,
"Value #B" : "Memory Usage" ,
"Value #C" : "Memory Requests" ,
"Value #D" : "Memory Requests %" ,
"Value #E" : "Memory Limits" ,
"Value #F" : "Memory Limits %" ,
"workload" : "Workload" ,
"workload_type 1" : "Type"
2021-04-26 14:27:19 +00:00
}
2024-07-19 14:14:43 +00:00
}
2021-04-26 14:27:19 +00:00
}
] ,
2024-07-19 14:14:43 +00:00
"type" : "table"
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" : "/Bandwidth/"
} ,
"properties" : [
{
"id" : "unit" ,
"value" : "Bps"
}
]
} ,
{
"matcher" : {
"id" : "byRegexp" ,
"options" : "/Packets/"
} ,
"properties" : [
{
"id" : "unit" ,
"value" : "pps"
}
]
} ,
{
"matcher" : {
"id" : "byName" ,
"options" : "Workload"
} ,
"properties" : [
{
"id" : "links" ,
"value" : [
{
"title" : "Drill down to workloads" ,
"url" : "/d/a164a7f0339f99e89cea5cb47e9be617/k8s-resources-workload?${datasource:queryparam}&var-cluster=$cluster&var-namespace=$namespace&var-type=${__data.fields.Type}&var-workload=${__data.fields.Workload}"
}
]
}
]
}
]
} ,
"gridPos" : {
"h" : 7 ,
"w" : 24 ,
"x" : 0 ,
"y" : 28
} ,
"id" : 5 ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"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(rate(container_network_receive_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}) by (workload))\n" ,
"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(rate(container_network_transmit_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}) by (workload))\n" ,
"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(rate(container_network_receive_packets_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}) by (workload))\n" ,
"format" : "table" ,
"instant" : true
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(rate(container_network_transmit_packets_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}) by (workload))\n" ,
"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(rate(container_network_receive_packets_dropped_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}) by (workload))\n" ,
"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(rate(container_network_transmit_packets_dropped_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload_type=~\"$type\"}) by (workload))\n" ,
"format" : "table" ,
"instant" : true
}
] ,
"title" : "Current Network Usage" ,
"transformations" : [
{
"id" : "joinByField" ,
"options" : {
"byField" : "workload" ,
"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
} ,
"indexByName" : {
"Time 1" : 0 ,
"Time 2" : 1 ,
"Time 3" : 2 ,
"Time 4" : 3 ,
"Time 5" : 4 ,
"Time 6" : 5 ,
"Value #A" : 7 ,
"Value #B" : 8 ,
"Value #C" : 9 ,
"Value #D" : 10 ,
"Value #E" : 11 ,
"Value #F" : 12 ,
"workload" : 6
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"renameByName" : {
"Value #A" : "Current Receive Bandwidth" ,
"Value #B" : "Current Transmit Bandwidth" ,
"Value #C" : "Rate of Received Packets" ,
"Value #D" : "Rate of Transmitted Packets" ,
"Value #E" : "Rate of Received Packets Dropped" ,
"Value #F" : "Rate of Transmitted Packets Dropped" ,
"workload" : "Workload"
2021-04-26 14:27:19 +00:00
}
2024-07-19 14:14:43 +00:00
}
2021-04-26 14:27:19 +00:00
}
] ,
2024-07-19 14:14:43 +00:00
"type" : "table"
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
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"unit" : "Bps"
}
} ,
"gridPos" : {
"h" : 7 ,
"w" : 12 ,
"x" : 0 ,
"y" : 35
} ,
"id" : 6 ,
"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
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"tooltip" : {
"mode" : "single"
}
} ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"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(rate(container_network_receive_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=~\"$type\"}) by (workload))\n" ,
"legendFormat" : "__auto"
}
] ,
"title" : "Receive Bandwidth" ,
"type" : "timeseries"
} ,
{
"datasource" : {
"type" : "datasource" ,
"uid" : "-- Mixed --"
} ,
"fieldConfig" : {
"defaults" : {
"custom" : {
"fillOpacity" : 10 ,
"showPoints" : "never" ,
"spanNulls" : true
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"unit" : "Bps"
}
} ,
"gridPos" : {
"h" : 7 ,
"w" : 12 ,
"x" : 12 ,
"y" : 35
} ,
"id" : 7 ,
"interval" : "1m" ,
"options" : {
"legend" : {
"asTable" : true ,
"calcs" : [
"lastNotNull"
] ,
"displayMode" : "table" ,
"placement" : "right" ,
"showLegend" : true
} ,
"tooltip" : {
"mode" : "single"
}
} ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"targets" : [
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "(sum(rate(container_network_transmit_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=~\"$type\"}) by (workload))\n" ,
"legendFormat" : "__auto"
2021-04-26 14:27:19 +00:00
}
] ,
2024-07-19 14:14:43 +00:00
"title" : "Transmit Bandwidth" ,
"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" : {
"custom" : {
"fillOpacity" : 10 ,
"showPoints" : "never" ,
"spanNulls" : true
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"unit" : "Bps"
}
} ,
"gridPos" : {
"h" : 7 ,
"w" : 12 ,
"x" : 0 ,
"y" : 42
} ,
"id" : 8 ,
"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"
}
} ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"targets" : [
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "(avg(rate(container_network_receive_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=~\"$type\"}) by (workload))\n" ,
"legendFormat" : "__auto"
}
] ,
"title" : "Average Container Bandwidth by Workload: Received" ,
"type" : "timeseries"
} ,
{
"datasource" : {
"type" : "datasource" ,
"uid" : "-- Mixed --"
} ,
"fieldConfig" : {
"defaults" : {
"custom" : {
"fillOpacity" : 10 ,
"showPoints" : "never" ,
"spanNulls" : true
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"unit" : "Bps"
}
} ,
"gridPos" : {
"h" : 7 ,
"w" : 12 ,
"x" : 12 ,
"y" : 42
} ,
"id" : 9 ,
"interval" : "1m" ,
"options" : {
"legend" : {
"asTable" : true ,
"calcs" : [
"lastNotNull"
] ,
"displayMode" : "table" ,
"placement" : "right" ,
"showLegend" : true
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"tooltip" : {
"mode" : "single"
}
} ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"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" : "(avg(rate(container_network_transmit_bytes_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=~\"$type\"}) by (workload))\n" ,
"legendFormat" : "__auto"
}
] ,
"title" : "Average Container Bandwidth by Workload: Transmitted" ,
"type" : "timeseries"
} ,
{
"datasource" : {
"type" : "datasource" ,
"uid" : "-- Mixed --"
} ,
"fieldConfig" : {
"defaults" : {
"custom" : {
"fillOpacity" : 10 ,
"showPoints" : "never" ,
"spanNulls" : true
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"unit" : "pps"
}
} ,
"gridPos" : {
"h" : 7 ,
"w" : 12 ,
"x" : 0 ,
"y" : 49
} ,
"id" : 10 ,
"interval" : "1m" ,
"options" : {
"legend" : {
"asTable" : true ,
"calcs" : [
"lastNotNull"
] ,
"displayMode" : "table" ,
"placement" : "right" ,
"showLegend" : true
} ,
"tooltip" : {
"mode" : "single"
}
} ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"targets" : [
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "(sum(rate(container_network_receive_packets_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=~\"$type\"}) by (workload))\n" ,
"legendFormat" : "__auto"
2021-04-26 14:27:19 +00:00
}
] ,
2024-07-19 14:14:43 +00:00
"title" : "Rate of Received Packets" ,
"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" : {
"custom" : {
"fillOpacity" : 10 ,
"showPoints" : "never" ,
"spanNulls" : true
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"unit" : "pps"
}
} ,
"gridPos" : {
"h" : 7 ,
"w" : 12 ,
"x" : 12 ,
"y" : 49
} ,
"id" : 11 ,
"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"
}
} ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"targets" : [
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "(sum(rate(container_network_transmit_packets_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=~\"$type\"}) by (workload))\n" ,
"legendFormat" : "__auto"
}
] ,
"title" : "Rate of Transmitted Packets" ,
"type" : "timeseries"
} ,
{
"datasource" : {
"type" : "datasource" ,
"uid" : "-- Mixed --"
} ,
"fieldConfig" : {
"defaults" : {
"custom" : {
"fillOpacity" : 10 ,
"showPoints" : "never" ,
"spanNulls" : true
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"unit" : "pps"
}
} ,
"gridPos" : {
"h" : 7 ,
"w" : 12 ,
"x" : 0 ,
"y" : 56
} ,
"id" : 12 ,
"interval" : "1m" ,
"options" : {
"legend" : {
"asTable" : true ,
"calcs" : [
"lastNotNull"
] ,
"displayMode" : "table" ,
"placement" : "right" ,
"showLegend" : true
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"tooltip" : {
"mode" : "single"
}
} ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"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(rate(container_network_receive_packets_dropped_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=~\"$type\"}) by (workload))\n" ,
"legendFormat" : "__auto"
}
] ,
"title" : "Rate of Received Packets Dropped" ,
"type" : "timeseries"
} ,
{
"datasource" : {
"type" : "datasource" ,
"uid" : "-- Mixed --"
} ,
"fieldConfig" : {
"defaults" : {
"custom" : {
"fillOpacity" : 10 ,
"showPoints" : "never" ,
"spanNulls" : true
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"unit" : "pps"
}
} ,
"gridPos" : {
"h" : 7 ,
"w" : 12 ,
"x" : 12 ,
"y" : 56
} ,
"id" : 13 ,
"interval" : "1m" ,
"options" : {
"legend" : {
"asTable" : true ,
"calcs" : [
"lastNotNull"
] ,
"displayMode" : "table" ,
"placement" : "right" ,
"showLegend" : true
} ,
"tooltip" : {
"mode" : "single"
}
} ,
2024-10-21 14:41:14 +00:00
"pluginVersion" : "v11.1.0" ,
2024-07-19 14:14:43 +00:00
"targets" : [
{
"datasource" : {
"type" : "prometheus" ,
"uid" : "${datasource}"
2021-04-26 14:27:19 +00:00
} ,
2024-07-19 14:14:43 +00:00
"expr" : "(sum(rate(container_network_transmit_packets_dropped_total{job=\"kubelet\", cluster=\"$cluster\", namespace=\"$namespace\"}[$__rate_interval])\n* on (namespace,pod)\ngroup_left(workload,workload_type) namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\", workload_type=~\"$type\"}) by (workload))\n" ,
"legendFormat" : "__auto"
2021-04-26 14:27:19 +00:00
}
] ,
2024-07-19 14:14:43 +00:00
"title" : "Rate of Transmitted Packets Dropped" ,
"type" : "timeseries"
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" : "namespace" ,
2022-09-16 09:21:38 +00:00
"name" : "namespace" ,
2024-07-19 14:14:43 +00:00
"query" : "label_values(kube_namespace_status_phase{job=\"kube-state-metrics\", cluster=\"$cluster\"}, namespace)" ,
2021-04-26 14:27:19 +00:00
"refresh" : 2 ,
2022-09-16 09:21:38 +00:00
"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 ,
2023-08-22 13:02:40 +00:00
"includeAll" : true ,
2024-07-19 14:14:43 +00:00
"label" : "workload_type" ,
2022-09-16 09:21:38 +00:00
"name" : "type" ,
"query" : "label_values(namespace_workload_pod:kube_pod_owner:relabel{cluster=\"$cluster\", namespace=\"$namespace\", workload=~\".+\"}, workload_type)" ,
2021-04-26 14:27:19 +00:00
"refresh" : 2 ,
2024-07-19 14:14:43 +00:00
"sort" : 1 ,
"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 / Namespace (Workloads)" ,
2024-07-19 14:14:43 +00:00
"uid" : "a87fb0d919ec0ea5f6543124e16c42a5"
2021-04-26 14:27:19 +00:00
}