--- kind: ConfigMap apiVersion: v1 metadata: name: grafana-dashboard-clusters data: clusters-dashboard.json: |- { "annotations": { "list": [ ] }, "editable": true, "gnetId": null, "graphTooltip": 0, "id": 2, "iteration": 1563181647789, "links": [], "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "thanos-querier", "fill": 1, "gridPos": { "h": 9, "w": 24, "x": 0, "y": 0 }, "id": 2, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": {}, "percentage": false, "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{namespace}}", "refId": "A" } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "CPU Usage by Namespace", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "thanos-querier", "fill": 1, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 9 }, "id": 4, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": {}, "percentage": false, "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "expr": "sum(container_memory_rss{ocp_cluster=~\"$cluster\", container_name!=\"\"}) by (namespace)", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "{{namespace}}", "refId": "A" } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Memory Usage (w/o cache)", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "bytes", "label": null, "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } }, { "aliasColors": {}, "bars": false, "columns": [], "dashLength": 10, "dashes": false, "datasource": "thanos-querier", "fill": 1, "fontSize": "100%", "gridPos": { "h": 17, "w": 11, "x": 0, "y": 16 }, "id": 6, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null as zero", "options": {}, "pageSize": null, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "scroll": true, "seriesOverrides": [], "showHeader": true, "sort": { "col": 2, "desc": true }, "spaceLength": 10, "stack": false, "steppedLine": false, "styles": [ { "alias": "Time", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "Time", "type": "hidden" }, { "alias": "Pods", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 0, "link": false, "linkTooltip": "", "linkUrl": "", "pattern": "Value #A", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "Workloads", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 0, "link": false, "linkTooltip": "", "linkUrl": "", "pattern": "Value #B", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "CPU Usage", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "Drill down", "linkUrl": "", "pattern": "Value #C", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "CPU Requests", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "Drill down", "linkUrl": "", "pattern": "Value #D", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "CPU Requests %", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "Drill down", "linkUrl": "", "pattern": "Value #E", "thresholds": [], "type": "number", "unit": "percentunit" }, { "alias": "CPU Limits", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "Drill down", "linkUrl": "", "pattern": "Value #F", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "CPU Limits %", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "Drill down", "linkUrl": "", "pattern": "Value #G", "thresholds": [], "type": "number", "unit": "percentunit" }, { "alias": "Namespace", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "", "linkUrl": "", "pattern": "namespace", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "pattern": "/.*/", "thresholds": [], "type": "string", "unit": "short" } ], "targets": [ { "expr": "count(mixin_pod_workload{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 1, "refId": "A" }, { "expr": "count(avg(mixin_pod_workload{ocp_cluster=~\"$cluster\"}) by (workload, namespace)) by (namespace)", "format": "table", "instant": true, "intervalFactor": 1, "refId": "B" }, { "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 1, "refId": "C" }, { "expr": "sum(kube_pod_container_resource_requests_cpu_cores{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 1, "refId": "D" }, { "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{ocp_cluster=~\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests_cpu_cores{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 1, "refId": "E" }, { "expr": "sum(kube_pod_container_resource_limits_cpu_cores{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 1, "refId": "F" }, { "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{ocp_cluster=~\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_limits_cpu_cores{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 1, "refId": "G" } ], "thresholds": [], "timeFrom": null, "timeShift": null, "title": "CPU Quota", "tooltip": { "shared": false, "sort": 0, "value_type": "individual" }, "transform": "table", "type": "table", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": null, "logBase": 1, "max": null, "min": 0, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": false } ] }, { "aliasColors": {}, "bars": false, "columns": [], "dashLength": 10, "dashes": false, "datasource": "thanos-querier", "fill": 1, "fontSize": "100%", "gridPos": { "h": 17, "w": 13, "x": 11, "y": 16 }, "id": 8, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null as zero", "options": {}, "pageSize": null, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "scroll": true, "seriesOverrides": [], "showHeader": true, "sort": { "col": 0, "desc": true }, "spaceLength": 10, "stack": false, "steppedLine": false, "styles": [ { "alias": "Time", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "Time", "type": "hidden" }, { "alias": "Pods", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 0, "link": false, "linkTooltip": "Drill down to pods", "linkUrl": "/d/85a562078cdf77779eaa1add43ccec1e/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1", "pattern": "Value #A", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "Workloads", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 0, "link": false, "linkTooltip": "", "linkUrl": "", "pattern": "Value #B", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "CPU Usage", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "Drill down", "linkUrl": "", "pattern": "Value #C", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "Memory Usage", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "Drill down", "linkUrl": "", "pattern": "Value #D", "thresholds": [], "type": "number", "unit": "bytes" }, { "alias": "Memory Requests", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "Drill down", "linkUrl": "", "pattern": "Value #E", "thresholds": [], "type": "number", "unit": "bytes" }, { "alias": "Memory Requests %", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "Drill down", "linkUrl": "", "pattern": "Value #F", "thresholds": [], "type": "number", "unit": "percentunit" }, { "alias": "Memory Limits", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "Drill down", "linkUrl": "", "pattern": "Value #G", "thresholds": [], "type": "number", "unit": "bytes" }, { "alias": "Memory Limits %", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "Drill down", "linkUrl": "", "pattern": "Value #H", "thresholds": [], "type": "number", "unit": "percentunit" }, { "alias": "Namespace", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "link": false, "linkTooltip": "", "linkUrl": "", "pattern": "namespace", "thresholds": [], "type": "number", "unit": "short" }, { "alias": "", "colorMode": null, "colors": [], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "pattern": "/.*/", "thresholds": [], "type": "string", "unit": "short" } ], "targets": [ { "expr": "count(mixin_pod_workload{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, "legendFormat": "", "refId": "A", "step": 10 }, { "expr": "count(avg(mixin_pod_workload{ocp_cluster=~\"$cluster\"}) by (workload, namespace)) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, "legendFormat": "", "refId": "B", "step": 10 }, { "expr": "sum(container_memory_rss{ocp_cluster=~\"$cluster\", container_name!=\"\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, "legendFormat": "", "refId": "C", "step": 10 }, { "expr": "sum(kube_pod_container_resource_requests_memory_bytes{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, "legendFormat": "", "refId": "D", "step": 10 }, { "expr": "sum(container_memory_rss{ocp_cluster=~\"$cluster\", container_name!=\"\"}) by (namespace) / sum(kube_pod_container_resource_requests_memory_bytes{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, "legendFormat": "", "refId": "E", "step": 10 }, { "expr": "sum(kube_pod_container_resource_limits_memory_bytes{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, "legendFormat": "", "refId": "F", "step": 10 }, { "expr": "sum(container_memory_rss{ocp_cluster=~\"$cluster\", container_name!=\"\"}) by (namespace) / sum(kube_pod_container_resource_limits_memory_bytes{ocp_cluster=~\"$cluster\"}) by (namespace)", "format": "table", "instant": true, "intervalFactor": 2, "legendFormat": "", "refId": "G", "step": 10 } ], "thresholds": [], "timeFrom": null, "timeShift": null, "title": "Requests by Namespace", "tooltip": { "shared": false, "sort": 0, "value_type": "individual" }, "transform": "table", "type": "table", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": null, "logBase": 1, "max": null, "min": 0, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": false } ] } ], "refresh": false, "schemaVersion": 18, "style": "dark", "tags": [], "templating": { "list": [ { "allValue": null, "current": { "text": "west2", "value": "west2" }, "datasource": "thanos-querier", "definition": "label_values(ocp_cluster)", "hide": 0, "includeAll": false, "label": null, "multi": true, "name": "cluster", "options": [ { "selected": false, "text": "east1", "value": "east1" }, { "selected": true, "text": "west2", "value": "west2" } ], "query": "label_values(ocp_cluster)", "refresh": 0, "regex": "", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tags": [], "tagsQuery": "", "type": "query", "useTags": false } ] }, "time": { "from": "now-5m", "to": "now" }, "timepicker": { "refresh_intervals": [ "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "time_options": [ "5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d" ] }, "timezone": "browser", "title": "OCP Clusters", "version": 4 }