diff --git a/dashboards/google-kubernetes-engine/gke-compute-resources-cluster-view.json b/dashboards/google-kubernetes-engine/gke-compute-resources-cluster-view.json index 95c3ebaf88..7169b44973 100644 --- a/dashboards/google-kubernetes-engine/gke-compute-resources-cluster-view.json +++ b/dashboards/google-kubernetes-engine/gke-compute-resources-cluster-view.json @@ -166,7 +166,7 @@ "scorecard": { "timeSeriesQuery": { "prometheusQuery": "sum(avg_over_time(kubernetes_io:container_memory_used_bytes{monitored_resource=\"k8s_container\", ${project_id}, ${cluster_name}, ${location}}[${__interval}]))\n/\nsum(avg_over_time(kubernetes_io:container_memory_limit_bytes{monitored_resource=\"k8s_container\", ${project_id}, ${cluster_name}, ${location}}[${__interval}])) * 100", - "unitOverride": "", + "unitOverride": "%", "outputFullDuration": false }, "blankView": {}, diff --git a/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.01.png b/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.01.png index a579e523eb..f221dd4c12 100644 Binary files a/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.01.png and b/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.01.png differ diff --git a/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.02.png b/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.02.png index 5d2c73aad4..d6b0b8c42d 100644 Binary files a/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.02.png and b/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.02.png differ diff --git a/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.03.png b/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.03.png new file mode 100644 index 0000000000..9c5a6904c6 Binary files /dev/null and b/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.03.png differ diff --git a/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.json b/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.json index 3d41a48e0c..f63e6b4303 100644 --- a/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.json +++ b/dashboards/google-kubernetes-engine/gke-compute-resources-node-view.json @@ -1,98 +1,176 @@ { - "category": "CUSTOM", + "displayName": "GKE Compute Resources - Node View", "dashboardFilters": [ { - "filterType": "RESOURCE_LABEL", "labelKey": "project_id", + "templateVariable": "project_id", "stringValue": "", - "templateVariable": "project_id" + "filterType": "RESOURCE_LABEL", + "valueType": "STRING" }, { - "filterType": "RESOURCE_LABEL", "labelKey": "location", + "templateVariable": "location", "stringValue": "", - "templateVariable": "location" + "filterType": "RESOURCE_LABEL", + "valueType": "STRING" }, { - "filterType": "RESOURCE_LABEL", "labelKey": "cluster_name", + "templateVariable": "cluster_name", "stringValue": "", - "templateVariable": "cluster_name" + "filterType": "RESOURCE_LABEL", + "valueType": "STRING" } ], - "displayName": "GKE Compute Resources - Node View", "labels": {}, "mosaicLayout": { - "columns": 12, + "columns": 48, "tiles": [ { - "height": 2, + "xPos": 8, + "width": 8, + "height": 8, "widget": { "scorecard": { - "blankView": {}, - "thresholds": [], "timeSeriesQuery": { - "apiSource": "DEFAULT_CLOUD", "timeSeriesFilter": { + "filter": "metric.type=\"kubernetes.io/node/cpu/total_cores\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}", "aggregation": { "alignmentPeriod": "60s", + "perSeriesAligner": "ALIGN_MEAN", "crossSeriesReducer": "REDUCE_SUM", - "groupByFields": [], - "perSeriesAligner": "ALIGN_MEAN" - }, - "filter": "metric.type=\"kubernetes.io/node/cpu/total_cores\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}" - } - } + "groupByFields": [] + } + }, + "unitOverride": "", + "outputFullDuration": false + }, + "blankView": {}, + "thresholds": [], + "dimensions": [], + "measures": [] }, "title": "Total Cores" - }, - "width": 2, - "xPos": 2, - "yPos": 0 + } }, { - "height": 2, + "width": 8, + "height": 8, "widget": { "scorecard": { + "timeSeriesQuery": { + "timeSeriesFilter": { + "filter": "metric.type=\"kubernetes.io/node/cpu/core_usage_time\" resource.type=\"k8s_node\" ${project_id} ${location} ${cluster_name}", + "aggregation": { + "alignmentPeriod": "60s", + "perSeriesAligner": "ALIGN_RATE", + "groupByFields": [] + }, + "secondaryAggregation": { + "alignmentPeriod": "60s", + "perSeriesAligner": "ALIGN_MEAN", + "crossSeriesReducer": "REDUCE_COUNT", + "groupByFields": [] + } + }, + "unitOverride": "", + "outputFullDuration": false + }, "blankView": {}, "thresholds": [], - "timeSeriesQuery": { - "timeSeriesQueryLanguage": "fetch k8s_node\n| metric 'kubernetes.io/node/cpu/total_cores'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| group_by 1m, [value_total_cores_mean: mean(value.total_cores)]\n| every 1m\n| group_by [], [row_count: row_count()]" - } + "dimensions": [], + "measures": [] }, "title": "Total Nodes" - }, - "width": 2, - "xPos": 0, - "yPos": 0 + } }, { - "height": 2, + "xPos": 24, + "width": 8, + "height": 8, "widget": { "scorecard": { + "timeSeriesQuery": { + "timeSeriesFilter": { + "filter": "metric.type=\"kubernetes.io/node/memory/total_bytes\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}", + "aggregation": { + "alignmentPeriod": "60s", + "perSeriesAligner": "ALIGN_MEAN", + "crossSeriesReducer": "REDUCE_SUM", + "groupByFields": [] + } + }, + "unitOverride": "", + "outputFullDuration": false + }, "blankView": {}, "thresholds": [], + "dimensions": [], + "measures": [] + }, + "title": "Total Memory" + } + }, + { + "xPos": 16, + "width": 8, + "height": 8, + "widget": { + "scorecard": { "timeSeriesQuery": { - "apiSource": "DEFAULT_CLOUD", "timeSeriesFilter": { + "filter": "metric.type=\"kubernetes.io/node/cpu/allocatable_cores\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}", "aggregation": { "alignmentPeriod": "60s", + "perSeriesAligner": "ALIGN_MEAN", "crossSeriesReducer": "REDUCE_SUM", - "groupByFields": [], - "perSeriesAligner": "ALIGN_MEAN" - }, - "filter": "metric.type=\"kubernetes.io/node/memory/total_bytes\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}" - } - } + "groupByFields": [] + } + }, + "unitOverride": "", + "outputFullDuration": false + }, + "blankView": {}, + "thresholds": [], + "dimensions": [], + "measures": [] }, - "title": "Total Memory" - }, - "width": 2, - "xPos": 6, - "yPos": 0 + "title": "Allocatable Cores" + } }, { - "height": 4, + "xPos": 32, + "width": 8, + "height": 8, + "widget": { + "scorecard": { + "timeSeriesQuery": { + "timeSeriesFilter": { + "filter": "metric.type=\"kubernetes.io/node/memory/allocatable_bytes\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}", + "aggregation": { + "alignmentPeriod": "60s", + "perSeriesAligner": "ALIGN_MEAN", + "crossSeriesReducer": "REDUCE_SUM", + "groupByFields": [] + } + }, + "unitOverride": "", + "outputFullDuration": false + }, + "blankView": {}, + "thresholds": [], + "dimensions": [], + "measures": [] + }, + "title": "Allocatable Memory" + } + }, + { + "xPos": 24, + "yPos": 40, + "width": 24, + "height": 16, "widget": { "title": "Memory Util % per Node - Top 50", "xyChart": { @@ -104,426 +182,593 @@ "plotType": "LINE", "targetAxis": "Y1", "timeSeriesQuery": { - "timeSeriesQueryLanguage": "fetch k8s_node\n| metric 'kubernetes.io/node/memory/allocatable_utilization'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| group_by 1m,\n [value_allocatable_utilization_mean: mean(value.allocatable_utilization)]\n| every 1m\n| group_by [resource.node_name],\n [value_allocatable_utilization_mean_aggregate:\n aggregate(value_allocatable_utilization_mean)]\n| scale '%'\n| top 50 " + "prometheusQuery": "topk(50, avg by (node_name)(avg_over_time(kubernetes_io:node_memory_allocatable_utilization{monitored_resource=\"k8s_node\", ${project_id}, ${cluster_name}, ${location}}[${__interval}]))) * 100\n", + "unitOverride": "%" } } ], "thresholds": [], "timeshiftDuration": "0s", "yAxis": { + "label": "", "scale": "LINEAR" } } - }, - "width": 6, - "xPos": 6, - "yPos": 6 + } }, { - "height": 4, + "yPos": 40, + "width": 24, + "height": 16, "widget": { - "title": "CPU Util % per Node - Top 50", "xyChart": { - "chartOptions": { - "mode": "COLOR" - }, "dataSets": [ { + "timeSeriesQuery": { + "prometheusQuery": "topk(50, avg by (node_name)(avg_over_time(kubernetes_io:node_cpu_allocatable_utilization{monitored_resource=\"k8s_node\", ${project_id}, ${cluster_name}, ${location}}[${__interval}]))) * 100\n", + "unitOverride": "%", + "outputFullDuration": false + }, "plotType": "LINE", + "legendTemplate": "", "targetAxis": "Y1", - "timeSeriesQuery": { - "timeSeriesQueryLanguage": "fetch k8s_node\n| metric 'kubernetes.io/node/cpu/allocatable_utilization'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| group_by 1m, [value_allocatable_utilization_mean: mean(value.allocatable_utilization)]\n| every 1m\n| scale '%'\n| top 50\n" - } + "dimensions": [], + "measures": [], + "breakdowns": [] } ], - "thresholds": [], "timeshiftDuration": "0s", + "thresholds": [], "yAxis": { + "label": "", "scale": "LINEAR" + }, + "chartOptions": { + "mode": "COLOR", + "showLegend": false, + "displayHorizontal": false } - } - }, - "width": 6, - "xPos": 0, - "yPos": 6 + }, + "title": "CPU Util % per Node - Top 50" + } }, { - "height": 4, + "xPos": 24, + "yPos": 24, + "width": 24, + "height": 16, "widget": { - "title": "Memory Usage per Node - Top 50", "xyChart": { - "chartOptions": { - "mode": "COLOR" - }, "dataSets": [ { + "timeSeriesQuery": { + "timeSeriesQueryLanguage": " fetch k8s_node\n| metric 'kubernetes.io/node/memory/used_bytes'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| group_by 1m,\n [value_used_bytes_mean: mean(value.used_bytes)]\n| every 1m\n| group_by [resource.node_name],\n [value_used_bytes_mean_aggregate:\n aggregate(value_used_bytes_mean)]\n| top 50 ", + "unitOverride": "", + "outputFullDuration": false + }, "plotType": "STACKED_AREA", + "legendTemplate": "", "targetAxis": "Y1", - "timeSeriesQuery": { - "timeSeriesQueryLanguage": " fetch k8s_node\n| metric 'kubernetes.io/node/memory/used_bytes'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| group_by 1m,\n [value_used_bytes_mean: mean(value.used_bytes)]\n| every 1m\n| group_by [resource.node_name],\n [value_used_bytes_mean_aggregate:\n aggregate(value_used_bytes_mean)]\n| top 50 " - } + "dimensions": [], + "measures": [], + "breakdowns": [] } ], - "thresholds": [], "timeshiftDuration": "0s", + "thresholds": [], "yAxis": { + "label": "", "scale": "LINEAR" + }, + "chartOptions": { + "mode": "COLOR", + "showLegend": false, + "displayHorizontal": false } - } - }, - "width": 6, - "xPos": 6, - "yPos": 2 + }, + "title": "Memory Usage per Node - Top 50" + } }, { - "height": 4, + "yPos": 24, + "width": 24, + "height": 16, "widget": { - "title": "CPU Usage per Node - Top 50", "xyChart": { - "chartOptions": { - "mode": "COLOR" - }, "dataSets": [ { + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "{ fetch k8s_node\n | metric 'kubernetes.io/node/cpu/allocatable_utilization'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n | group_by 1m,\n [value_allocatable_utilization_mean: mean(value.allocatable_utilization)]\n | every 1m\n; fetch k8s_node\n | metric 'kubernetes.io/node/cpu/allocatable_cores'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n | group_by 1m, [value_allocatable_core_mean: mean(value.allocatable_cores)]\n | every 1m }\n| join\n| value [scaled_util: val(0) * val(1)]\n| top 50\n", + "unitOverride": "", + "outputFullDuration": false + }, "plotType": "STACKED_AREA", + "legendTemplate": "", "targetAxis": "Y1", - "timeSeriesQuery": { - "timeSeriesQueryLanguage": "{ fetch k8s_node\n | metric 'kubernetes.io/node/cpu/allocatable_utilization'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n | group_by 1m,\n [value_allocatable_utilization_mean: mean(value.allocatable_utilization)]\n | every 1m\n; fetch k8s_node\n | metric 'kubernetes.io/node/cpu/allocatable_cores'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n | group_by 1m, [value_allocatable_core_mean: mean(value.allocatable_cores)]\n | every 1m }\n| join\n| value [scaled_util: val(0) * val(1)]\n| top 50\n" - } + "dimensions": [], + "measures": [], + "breakdowns": [] } ], - "thresholds": [], "timeshiftDuration": "0s", + "thresholds": [], "yAxis": { + "label": "", "scale": "LINEAR" + }, + "chartOptions": { + "mode": "COLOR", + "showLegend": false, + "displayHorizontal": false } - } - }, - "width": 6, - "xPos": 0, - "yPos": 2 + }, + "title": "CPU Usage per Node - Top 50" + } }, { - "height": 4, + "yPos": 72, + "width": 48, + "height": 16, "widget": { "timeSeriesTable": { "dataSets": [ { "timeSeriesQuery": { - "timeSeriesQueryLanguage": "fetch k8s_pod\n| metric 'kubernetes.io/pod/network/received_bytes_count'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| align rate(1m)\n| every 1m\n| group_by [resource.project_id, resource.location, resource.cluster_name, resource.namespace_name, resource.pod_name, metadata.system.node_name],\n [value_received_bytes_count_mean: pick_any(value.received_bytes_count)]\n | group_by [metadata.system.node_name], [row_count()]\n" - } + "timeSeriesFilter": { + "filter": "metric.type=\"kubernetes.io/pod/network/received_bytes_count\" resource.type=\"k8s_pod\" ${project_id} ${location} ${cluster_name}", + "aggregation": { + "alignmentPeriod": "60s", + "perSeriesAligner": "ALIGN_RATE", + "crossSeriesReducer": "REDUCE_SUM", + "groupByFields": [ + "resource.label.\"pod_name\"", + "metadata.system_labels.\"node_name\"" + ] + }, + "secondaryAggregation": { + "alignmentPeriod": "60s", + "perSeriesAligner": "ALIGN_MEAN", + "crossSeriesReducer": "REDUCE_COUNT", + "groupByFields": [ + "metadata.system_labels.\"node_name\"" + ] + } + }, + "unitOverride": "", + "outputFullDuration": false + }, + "tableTemplate": "", + "minAlignmentPeriod": "60s" + }, + { + "timeSeriesQuery": { + "timeSeriesFilter": { + "filter": "metric.type=\"kubernetes.io/container/cpu/core_usage_time\" resource.type=\"k8s_container\" ${project_id} ${location} ${cluster_name}", + "aggregation": { + "alignmentPeriod": "60s", + "perSeriesAligner": "ALIGN_RATE", + "crossSeriesReducer": "REDUCE_SUM", + "groupByFields": [ + "resource.label.\"pod_name\"", + "metadata.system_labels.\"node_name\"", + "resource.label.\"container_name\"" + ] + }, + "secondaryAggregation": { + "alignmentPeriod": "60s", + "perSeriesAligner": "ALIGN_MEAN", + "crossSeriesReducer": "REDUCE_COUNT", + "groupByFields": [ + "metadata.system_labels.\"node_name\"" + ] + } + }, + "unitOverride": "", + "outputFullDuration": false + }, + "tableTemplate": "", + "minAlignmentPeriod": "60s" } ], - "metricVisualization": "NUMBER" + "metricVisualization": "NUMBER", + "columnSettings": [ + { + "column": "system_labels.node_name", + "visible": true, + "displayName": "Node Name" + }, + { + "column": "value", + "visible": true, + "displayName": "Pod count" + }, + { + "column": "value-1", + "visible": true, + "displayName": "Container count" + } + ], + "opsAnalyticsSettings": { + "maxRows": "0", + "showFilterBar": false, + "pageSize": "0" + }, + "displayColumnType": false }, "title": "Number of Pods per Node" - }, - "width": 6, - "xPos": 0, - "yPos": 14 + } }, { - "height": 4, + "xPos": 24, + "yPos": 56, + "width": 24, + "height": 16, "widget": { - "title": "Allocatable Memory by Node", "xyChart": { - "chartOptions": { - "mode": "COLOR" - }, "dataSets": [ { - "minAlignmentPeriod": "60s", - "plotType": "LINE", - "targetAxis": "Y1", "timeSeriesQuery": { - "apiSource": "DEFAULT_CLOUD", "timeSeriesFilter": { + "filter": "metric.type=\"kubernetes.io/node/memory/allocatable_bytes\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}", "aggregation": { "alignmentPeriod": "60s", - "crossSeriesReducer": "REDUCE_NONE", - "perSeriesAligner": "ALIGN_MEAN" - }, - "filter": "metric.type=\"kubernetes.io/node/memory/allocatable_bytes\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}" - } - } + "perSeriesAligner": "ALIGN_MEAN", + "groupByFields": [] + } + }, + "unitOverride": "", + "outputFullDuration": false + }, + "plotType": "LINE", + "legendTemplate": "", + "minAlignmentPeriod": "60s", + "targetAxis": "Y1", + "dimensions": [], + "measures": [], + "breakdowns": [] } ], - "thresholds": [], "timeshiftDuration": "0s", + "thresholds": [], "yAxis": { + "label": "", "scale": "LINEAR" + }, + "chartOptions": { + "mode": "COLOR", + "showLegend": false, + "displayHorizontal": false } - } - }, - "width": 6, - "xPos": 6, - "yPos": 10 - }, - { - "height": 4, - "widget": { - "timeSeriesTable": { - "dataSets": [ - { - "timeSeriesQuery": { - "timeSeriesQueryLanguage": "fetch k8s_container\n| metric 'kubernetes.io/container/cpu/core_usage_time'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| align rate(1m)\n| every 1m\n| group_by\n [resource.project_id, resource.location, resource.cluster_name,\n resource.namespace_name, resource.pod_name, resource.container_name,\n metadata.system.node_name],\n [value_core_usage_time_mean: pick_any(value.core_usage_time)]\n| group_by [metadata.system.node_name], [row_count()]\n| top 50" - } - } - ], - "metricVisualization": "NUMBER" }, - "title": "Number of Containers per Node" - }, - "width": 6, - "xPos": 6, - "yPos": 14 + "title": "Allocatable Memory by Node" + } }, { - "height": 4, + "yPos": 56, + "width": 24, + "height": 16, "widget": { - "title": "Allocatable CPU Cores per Node", "xyChart": { - "chartOptions": { - "mode": "COLOR" - }, "dataSets": [ { - "minAlignmentPeriod": "60s", - "plotType": "LINE", - "targetAxis": "Y1", "timeSeriesQuery": { - "apiSource": "DEFAULT_CLOUD", "timeSeriesFilter": { + "filter": "metric.type=\"kubernetes.io/node/cpu/allocatable_cores\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}", "aggregation": { "alignmentPeriod": "60s", - "crossSeriesReducer": "REDUCE_NONE", - "perSeriesAligner": "ALIGN_MEAN" - }, - "filter": "metric.type=\"kubernetes.io/node/cpu/allocatable_cores\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}" - } - } + "perSeriesAligner": "ALIGN_MEAN", + "groupByFields": [] + } + }, + "unitOverride": "", + "outputFullDuration": false + }, + "plotType": "LINE", + "legendTemplate": "", + "minAlignmentPeriod": "60s", + "targetAxis": "Y1", + "dimensions": [], + "measures": [], + "breakdowns": [] } ], - "thresholds": [], "timeshiftDuration": "0s", + "thresholds": [], "yAxis": { + "label": "", "scale": "LINEAR" + }, + "chartOptions": { + "mode": "COLOR", + "showLegend": false, + "displayHorizontal": false } - } - }, - "width": 6, - "xPos": 0, - "yPos": 10 + }, + "title": "Allocatable CPU Cores per Node" + } }, { - "height": 4, + "yPos": 88, + "width": 24, + "height": 16, "widget": { - "title": "Receive bandwidth per node - Top 50", "xyChart": { - "chartOptions": { - "mode": "COLOR" - }, "dataSets": [ { + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "fetch k8s_node\n| metric 'kubernetes.io/node/network/received_bytes_count'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| align rate(1m)\n| every 1m\n| top 50", + "unitOverride": "", + "outputFullDuration": false + }, "plotType": "STACKED_AREA", + "legendTemplate": "", "targetAxis": "Y1", - "timeSeriesQuery": { - "timeSeriesQueryLanguage": "fetch k8s_node\n| metric 'kubernetes.io/node/network/received_bytes_count'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| align rate(1m)\n| every 1m\n| top 50" - } + "dimensions": [], + "measures": [], + "breakdowns": [] } ], - "thresholds": [], "timeshiftDuration": "0s", + "thresholds": [], "yAxis": { + "label": "", "scale": "LINEAR" + }, + "chartOptions": { + "mode": "COLOR", + "showLegend": false, + "displayHorizontal": false } - } - }, - "width": 6, - "xPos": 0, - "yPos": 18 + }, + "title": "Receive bandwidth per node - Top 50" + } }, { - "height": 4, + "xPos": 24, + "yPos": 88, + "width": 24, + "height": 16, "widget": { - "title": "Transmit bandwidth per node - Top 50", "xyChart": { - "chartOptions": { - "mode": "COLOR" - }, "dataSets": [ { + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "fetch k8s_node\n| metric 'kubernetes.io/node/network/sent_bytes_count'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| align rate(1m)\n| every 1m\n| top 50", + "unitOverride": "", + "outputFullDuration": false + }, "plotType": "STACKED_AREA", + "legendTemplate": "", "targetAxis": "Y1", - "timeSeriesQuery": { - "timeSeriesQueryLanguage": "fetch k8s_node\n| metric 'kubernetes.io/node/network/sent_bytes_count'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| align rate(1m)\n| every 1m\n| top 50" - } + "dimensions": [], + "measures": [], + "breakdowns": [] } ], - "thresholds": [], "timeshiftDuration": "0s", + "thresholds": [], "yAxis": { + "label": "", "scale": "LINEAR" + }, + "chartOptions": { + "mode": "COLOR", + "showLegend": false, + "displayHorizontal": false } - } - }, - "width": 6, - "xPos": 6, - "yPos": 18 + }, + "title": "Transmit bandwidth per node - Top 50" + } }, { - "height": 2, + "yPos": 104, + "width": 48, + "height": 16, "widget": { - "scorecard": { - "blankView": {}, - "thresholds": [], - "timeSeriesQuery": { - "apiSource": "DEFAULT_CLOUD", - "timeSeriesFilter": { - "aggregation": { - "alignmentPeriod": "60s", - "crossSeriesReducer": "REDUCE_SUM", - "groupByFields": [], - "perSeriesAligner": "ALIGN_MEAN" - }, - "filter": "metric.type=\"kubernetes.io/node/cpu/allocatable_cores\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}" - } - } - }, - "title": "Allocatable Cores" - }, - "width": 2, - "xPos": 4, - "yPos": 0 + "title": "Rate of Packets", + "collapsibleGroup": { + "collapsed": false + } + } }, { - "height": 2, + "yPos": 8, + "width": 48, + "height": 16, "widget": { - "scorecard": { - "blankView": {}, - "thresholds": [], - "timeSeriesQuery": { - "apiSource": "DEFAULT_CLOUD", - "timeSeriesFilter": { - "aggregation": { - "alignmentPeriod": "60s", - "crossSeriesReducer": "REDUCE_SUM", - "groupByFields": [], - "perSeriesAligner": "ALIGN_MEAN" - }, - "filter": "metric.type=\"kubernetes.io/node/memory/allocatable_bytes\" resource.type=\"k8s_node\" ${cluster_name} ${project_id} ${location}" + "title": "CPU and memory usage", + "timeSeriesTable": { + "columnSettings": [ + { + "column": "node_name", + "visible": true + }, + { + "column": "value", + "displayName": "CPU cores", + "visible": true + }, + { + "column": "value-1", + "displayName": "CPU %", + "visible": true + }, + { + "column": "value-2", + "displayName": "Memory usage", + "visible": true + }, + { + "column": "value-3", + "displayName": "Memory %", + "visible": true } + ], + "dataSets": [ + { + "minAlignmentPeriod": "60s", + "timeSeriesQuery": { + "outputFullDuration": true, + "timeSeriesFilter": { + "aggregation": { + "alignmentPeriod": "60s", + "crossSeriesReducer": "REDUCE_SUM", + "groupByFields": [ + "resource.label.\"node_name\"" + ], + "perSeriesAligner": "ALIGN_RATE" + }, + "filter": "metric.type=\"kubernetes.io/node/cpu/core_usage_time\" resource.type=\"k8s_node\" ${project_id} ${location} ${cluster_name}" + } + } + }, + { + "timeSeriesQuery": { + "outputFullDuration": true, + "prometheusQuery": "avg by (node_name)(avg_over_time(kubernetes_io:node_cpu_allocatable_utilization{monitored_resource=\"k8s_node\", ${project_id}, ${cluster_name}, ${location}}[${__interval}])) * 100\n", + "unitOverride": "%" + } + }, + { + "minAlignmentPeriod": "60s", + "timeSeriesQuery": { + "outputFullDuration": true, + "timeSeriesFilter": { + "aggregation": { + "alignmentPeriod": "60s", + "crossSeriesReducer": "REDUCE_SUM", + "groupByFields": [ + "resource.label.\"node_name\"" + ], + "perSeriesAligner": "ALIGN_MEAN" + }, + "filter": "metric.type=\"kubernetes.io/node/memory/used_bytes\" resource.type=\"k8s_node\" ${project_id} ${location} ${cluster_name}" + } + } + }, + { + "timeSeriesQuery": { + "outputFullDuration": true, + "prometheusQuery": "avg by (node_name)(avg_over_time(kubernetes_io:node_memory_allocatable_utilization{monitored_resource=\"k8s_node\", ${project_id}, ${cluster_name}, ${location}}[${__interval}])) * 100\n", + "unitOverride": "%" + } + } + ], + "displayColumnType": false, + "metricVisualization": "NUMBER", + "opsAnalyticsSettings": { + "maxRows": "0", + "pageSize": "0", + "showFilterBar": false } - }, - "title": "Allocatable Memory" - }, - "width": 2, - "xPos": 8, - "yPos": 0 - }, - { - "height": 12, - "widget": { - "collapsibleGroup": { - "collapsed": false - }, - "title": "CPU and Memory" - }, - "width": 12, - "xPos": 0, - "yPos": 2 + } + } }, { - "height": 4, + "yPos": 8, + "width": 48, + "height": 64, "widget": { + "title": "CPU and Memory", "collapsibleGroup": { "collapsed": false - }, - "title": "Bandwidth" - }, - "width": 12, - "xPos": 0, - "yPos": 18 + } + } }, { - "height": 4, + "yPos": 88, + "width": 48, + "height": 16, "widget": { + "title": "Bandwidth", "collapsibleGroup": { "collapsed": false - }, - "title": "Pod and Container Count" - }, - "width": 12, - "xPos": 0, - "yPos": 14 + } + } }, { - "height": 4, + "yPos": 72, + "width": 48, + "height": 16, "widget": { + "title": "Pod and Container Count", "collapsibleGroup": { "collapsed": false - }, - "title": "Rate of Packets" - }, - "width": 12, - "xPos": 0, - "yPos": 22 + } + } }, { - "height": 4, + "yPos": 104, + "width": 24, + "height": 16, "widget": { "title": "Received packet count per node - Top 50", "xyChart": { - "chartOptions": { - "mode": "COLOR" - }, "dataSets": [ { + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "fetch k8s_node\n| metric 'networking.googleapis.com/node_flow/ingress_packets_count'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| align rate(1m)\n| every 1m\n| group_by [resource.node_name],\n [value_ingress_packets_count_aggregate:\n aggregate(value.ingress_packets_count)]", + "unitOverride": "", + "outputFullDuration": false + }, "plotType": "STACKED_AREA", + "legendTemplate": "", "targetAxis": "Y1", - "timeSeriesQuery": { - "timeSeriesQueryLanguage": "fetch k8s_node\n| metric 'networking.googleapis.com/node_flow/ingress_packets_count'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| align rate(1m)\n| every 1m\n| group_by [resource.node_name],\n [value_ingress_packets_count_aggregate:\n aggregate(value.ingress_packets_count)]" - } + "dimensions": [], + "measures": [], + "breakdowns": [] } ], - "thresholds": [], "timeshiftDuration": "0s", + "thresholds": [], "yAxis": { + "label": "", "scale": "LINEAR" + }, + "chartOptions": { + "mode": "COLOR", + "showLegend": false, + "displayHorizontal": false } } - }, - "width": 6, - "xPos": 0, - "yPos": 22 + } }, { - "height": 4, + "xPos": 24, + "yPos": 104, + "width": 24, + "height": 16, "widget": { "title": "Transmitted packet count per node - Top 50", "xyChart": { - "chartOptions": { - "mode": "COLOR" - }, "dataSets": [ { + "timeSeriesQuery": { + "timeSeriesQueryLanguage": "fetch k8s_node\n| metric 'networking.googleapis.com/node_flow/egress_packets_count'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| align rate(1m)\n| every 1m\n| group_by [resource.node_name],\n [value_egress_packets_count_aggregate:\n aggregate(value.egress_packets_count)]", + "unitOverride": "", + "outputFullDuration": false + }, "plotType": "STACKED_AREA", + "legendTemplate": "", "targetAxis": "Y1", - "timeSeriesQuery": { - "timeSeriesQueryLanguage": "fetch k8s_node\n| metric 'networking.googleapis.com/node_flow/egress_packets_count'\n| ${project_id}\n| ${location}\n| ${cluster_name}\n| align rate(1m)\n| every 1m\n| group_by [resource.node_name],\n [value_egress_packets_count_aggregate:\n aggregate(value.egress_packets_count)]" - } + "dimensions": [], + "measures": [], + "breakdowns": [] } ], - "thresholds": [], "timeshiftDuration": "0s", + "thresholds": [], "yAxis": { + "label": "", "scale": "LINEAR" + }, + "chartOptions": { + "mode": "COLOR", + "showLegend": false, + "displayHorizontal": false } } - }, - "width": 6, - "xPos": 6, - "yPos": 22 + } } ] }