├── images ├── summary-by-node.png ├── pods-in-namespace.png ├── summary-by-node-1.png ├── summary-by-node-2.png └── namespaces-in-cluster.png ├── scripts ├── grafana-sa.yml ├── removeClusterSelect.sh ├── grafana-clusterrolebinding.yml ├── grafana-route.yml ├── grafana-service.yml ├── deploy.sh ├── grafana-custom-config-secret.yml └── grafana-deployment-custom.yml ├── README.md ├── dashboards ├── namespaces-in-cluster.json └── pods-in-namespace.json ├── dashboards-cluster-overview ├── all-clusters-ops-cluster-overview.json └── all-clusters-ops-cluster-overview-by-datasource.json └── dashboards-with-cluster-select ├── namespaces-in-cluster.json └── pods-in-namespace.json /images/summary-by-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bszeti/openshift-grafana-dashboards/HEAD/images/summary-by-node.png -------------------------------------------------------------------------------- /images/pods-in-namespace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bszeti/openshift-grafana-dashboards/HEAD/images/pods-in-namespace.png -------------------------------------------------------------------------------- /images/summary-by-node-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bszeti/openshift-grafana-dashboards/HEAD/images/summary-by-node-1.png -------------------------------------------------------------------------------- /images/summary-by-node-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bszeti/openshift-grafana-dashboards/HEAD/images/summary-by-node-2.png -------------------------------------------------------------------------------- /images/namespaces-in-cluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bszeti/openshift-grafana-dashboards/HEAD/images/namespaces-in-cluster.png -------------------------------------------------------------------------------- /scripts/grafana-sa.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | annotations: 5 | serviceaccounts.openshift.io/oauth-redirectreference.grafana: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"grafana-custom"}}' 6 | creationTimestamp: null 7 | name: grafana-custom 8 | -------------------------------------------------------------------------------- /scripts/removeClusterSelect.sh: -------------------------------------------------------------------------------- 1 | for filename in ../dashboards-with-cluster-select/*.json 2 | do 3 | echo $filename 4 | sed 's/, *cluster=\\"$cluster\\"//g' $filename \ 5 | | sed 's/cluster=\\"$cluster\\" *,//g' \ 6 | | sed 's/cluster=\\"$cluster\\"//g' \ 7 | | jq 'del( .templating.list[]| select(.name == "cluster"))' \ 8 | >../dashboards/$(basename $filename) 9 | done -------------------------------------------------------------------------------- /scripts/grafana-clusterrolebinding.yml: -------------------------------------------------------------------------------- 1 | apiVersion: authorization.openshift.io/v1 2 | groupNames: null 3 | kind: ClusterRoleBinding 4 | metadata: 5 | name: grafana-custom 6 | roleRef: 7 | name: grafana 8 | subjects: 9 | - kind: ServiceAccount 10 | name: grafana-custom 11 | namespace: openshift-monitoring 12 | userNames: 13 | - system:serviceaccount:openshift-monitoring:grafana-custom 14 | -------------------------------------------------------------------------------- /scripts/grafana-route.yml: -------------------------------------------------------------------------------- 1 | apiVersion: route.openshift.io/v1 2 | kind: Route 3 | metadata: 4 | annotations: 5 | openshift.io/host.generated: "true" 6 | creationTimestamp: null 7 | name: grafana-custom 8 | spec: 9 | port: 10 | targetPort: https 11 | tls: 12 | termination: reencrypt 13 | to: 14 | kind: Service 15 | name: grafana-custom 16 | weight: 100 17 | wildcardPolicy: None 18 | -------------------------------------------------------------------------------- /scripts/grafana-service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | annotations: 5 | service.alpha.openshift.io/serving-cert-secret-name: grafana-custom-tls 6 | creationTimestamp: null 7 | name: grafana-custom 8 | spec: 9 | ports: 10 | - name: https 11 | port: 3000 12 | protocol: TCP 13 | targetPort: https 14 | selector: 15 | app: grafana-custom 16 | sessionAffinity: None 17 | type: ClusterIP 18 | status: 19 | loadBalancer: {} 20 | -------------------------------------------------------------------------------- /scripts/deploy.sh: -------------------------------------------------------------------------------- 1 | oc create configmap grafana-dashboards-custom --from-file=../dashboards --dry-run -o yaml | oc create -n openshift-monitoring -f - 2 | oc create -n openshift-monitoring -f grafana-sa.yml 3 | oc create -n openshift-monitoring -f grafana-clusterrolebinding.yml 4 | oc create -n openshift-monitoring -f grafana-custom-config-secret.yml 5 | oc create -n openshift-monitoring -f grafana-service.yml 6 | oc create -n openshift-monitoring -f grafana-route.yml 7 | oc create -n openshift-monitoring -f grafana-deployment-custom.yml 8 | -------------------------------------------------------------------------------- /scripts/grafana-custom-config-secret.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | stringData: 3 | grafana.ini: |- 4 | [users] 5 | allow_sign_up = true 6 | auto_assign_org = true 7 | auto_assign_org_role = Admin 8 | [auth] 9 | disable_login_form = true 10 | disable_signout_menu = true 11 | [auth.basic] 12 | enabled = false 13 | [auth.proxy] 14 | auto_sign_up = true 15 | enabled = true 16 | header_name = X-Forwarded-User 17 | [paths] 18 | data = /var/lib/grafana 19 | logs = /var/lib/grafana/logs 20 | plugins = /var/lib/grafana/plugins 21 | provisioning = /etc/grafana/provisioning 22 | [server] 23 | http_addr = 127.0.0.1 24 | http_port = 3001 25 | kind: Secret 26 | metadata: 27 | name: grafana-custom-config 28 | type: Opaque 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Custom Grafana dashboards for OpenShift v3.11 2 | 3 | ## Summary by nodetype 4 | Shows summary metrics for all three nodetypes (master, infra, compute). Different type of nodes run different type of workloads, so it’s useful to monitor resource utilization grouped this way (e.g. How much memory do I have to run application pods?). 5 | 6 | Top panels: 7 | * Nodes 8 | * Node health 9 | * Node issues 10 | 11 | Repeated panels: 12 | * CPU node % 13 | * CPU usage/allocatable % 14 | * CPU usage/request % 15 | * CPU request/allocatable % 16 | * CPU limits/allocatable % 17 | * CPU graph: Total, Allocatable, Node usage, Usage, Request, Limits 18 | * Memory node % 19 | * Memory usage/allocatable % 20 | * Memory usage/request % 21 | * Memory request/allocatable % 22 | * Memory limits/allocatable % 23 | * Memory graph: Total, Allocatable, Node usage, Usage, Request, Limits 24 | * Network Total: receive+transmit 25 | * Network Receive 26 | * Network Transmit 27 | * Disk bytes read 28 | * Disk bytes write 29 | * Disk IO Utilization 30 | * Filesystem % 31 | * Pods per node 32 | * Pod phase 33 | 34 | This panel only works if the standard OpenShift labels are used on the nodes (e.g. _node-role.kubernetes.io/compute=true_). By default it shows _master_, _infra_ and _compute_ node groups, but if additional node roles exist, you simply have to add them to the list in _$nodetype_ dasboard variable. 35 | 36 | ![Summary by nodetype](images/summary-by-node-1.png "Summary by node") 37 | ![Summary by nodetype](images/summary-by-node-2.png "Summary by node") 38 | 39 | ## Summary by node 40 | 41 | The dashboard have two sections: 42 | * Summary resource utilization including all selected nodes 43 | * Resource utilization for each selected node on-by-one (repeated row) 44 | 45 | The panels are more or less the same as on _Summary by nodetype_. 46 | 47 | ![Summary by node](images/summary-by-node.png "Summary by node") 48 | 49 | ## Namespaces in cluster 50 | 51 | One or multiple projects within the cluster can be selected. Values are calculated for the selected projects. This dashboard is a customized version of the default _Kubernetes / Compute Resources / Cluster_ dashboard in OpenShift v3.11. 52 | 53 | Panels: 54 | * Pod phase 55 | * Pod restarts 56 | * CPU Usage 57 | * CPU Quota: Clinking on namespace name opens the _Pods in Namespace_ dashboard 58 | * Memory Usage 59 | * Memory Quota: Clinking on namespace name opens the _Pods in Namespace_ dashboard 60 | 61 | ![Namespaces in cluster](images/namespaces-in-cluster.png "Namespaces in cluster") 62 | 63 | ## Pods in namespace 64 | One namespace and one or multiple pods within the namespace can be selected. Values are calculated for the selected pods. This dashboard is a customized version of the default _Kubernetes / Compute Resources / Namespace (Pods)_ dashboard in OpenShift v3.11. 65 | 66 | Panels: 67 | * Pod Phase 68 | * Pod Restarts 69 | * CPU Usage 70 | * CPU Quota (Pods) 71 | * CPU Quota (Container) 72 | * Memory Usage 73 | * Memory Quota (Pods) 74 | * Memory Quota (containers) 75 | 76 | Limits and requests are set per container, the pod level metrics are simply the summary of container metrics belonging to the pod. When one container in a pod has limits set, but the other does not, the pod level _usage_ can be more than the _limits_ which looks a bit strange first. Taking a look at the the container level table clarifies what we see on the pod level. 77 | 78 | ![Pods in namespace](images/pods-in-namespace.png "Pods in namespace") 79 | 80 | # Directory structure 81 | 82 | * **dashboards**: Grafana dashboard that can be manually imported or provisioned from file. They require a Prometheus datasource which should be selected as the _$datasource_ dasboard variable. Tested with Grafana v5.4.3 and v6.3.3. 83 | * **dashboards-with-cluster-select**: The same dashboards with an extra _$cluster_ variable. It's useful if Prometheus is collecting matrrics from more than one cluster. See [Prometheus Federation](https://prometheus.io/docs/prometheus/latest/federation/). 84 | * **dashboards-cluster-overview**: Cluster overview page showing overall health of multiple clusters. 85 | * **scripts**: simply run _deploy.sh_ to install a Grafana in the existing _openshift-monitoring_ namespace with the custom dasboards provisioned from a ConfigMap. 86 | * **images**: Screenshots for README 87 | -------------------------------------------------------------------------------- /scripts/grafana-deployment-custom.yml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | annotations: 5 | deployment.kubernetes.io/revision: "1" 6 | creationTimestamp: null 7 | generation: 1 8 | labels: 9 | app: grafana-custom 10 | name: grafana-custom 11 | spec: 12 | progressDeadlineSeconds: 600 13 | replicas: 1 14 | revisionHistoryLimit: 10 15 | selector: 16 | matchLabels: 17 | app: grafana-custom 18 | strategy: 19 | rollingUpdate: 20 | maxSurge: 25% 21 | maxUnavailable: 25% 22 | type: RollingUpdate 23 | template: 24 | metadata: 25 | creationTimestamp: null 26 | labels: 27 | app: grafana-custom 28 | spec: 29 | containers: 30 | - args: 31 | - -config=/etc/grafana/grafana.ini 32 | image: registry.access.redhat.com/openshift3/grafana:v3.11 33 | imagePullPolicy: IfNotPresent 34 | name: grafana 35 | resources: 36 | limits: 37 | cpu: 200m 38 | memory: 200Mi 39 | requests: 40 | cpu: 100m 41 | memory: 100Mi 42 | terminationMessagePath: /dev/termination-log 43 | terminationMessagePolicy: File 44 | volumeMounts: 45 | - mountPath: /var/lib/grafana 46 | name: grafana-storage 47 | - mountPath: /etc/grafana/provisioning/datasources 48 | name: grafana-datasources 49 | - mountPath: /etc/grafana/provisioning/dashboards 50 | name: grafana-dashboards 51 | - mountPath: /etc/grafana 52 | name: grafana-config 53 | - mountPath: /grafana-dashboard-definitions/0 54 | name: grafana-dashboards-custom 55 | - args: 56 | - -provider=openshift 57 | - -https-address=:3000 58 | - -http-address= 59 | - -email-domain=* 60 | - -upstream=http://localhost:3001 61 | - '-openshift-sar={"resource": "namespaces", "verb": "get"}' 62 | - '-openshift-delegate-urls={"/": {"resource": "namespaces", "verb": "get"}}' 63 | - -tls-cert=/etc/tls/private/tls.crt 64 | - -tls-key=/etc/tls/private/tls.key 65 | - -client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token 66 | - -cookie-secret-file=/etc/proxy/secrets/session_secret 67 | - -openshift-service-account=grafana-custom 68 | - -openshift-ca=/etc/pki/tls/cert.pem 69 | - -openshift-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt 70 | - -skip-auth-regex=^/metrics 71 | image: registry.access.redhat.com/openshift3/oauth-proxy:v3.11 72 | imagePullPolicy: IfNotPresent 73 | name: grafana-proxy 74 | ports: 75 | - containerPort: 3000 76 | name: https 77 | protocol: TCP 78 | resources: {} 79 | terminationMessagePath: /dev/termination-log 80 | terminationMessagePolicy: File 81 | volumeMounts: 82 | - mountPath: /etc/tls/private 83 | name: secret-grafana-tls 84 | - mountPath: /etc/proxy/secrets 85 | name: secret-grafana-proxy 86 | dnsPolicy: ClusterFirst 87 | restartPolicy: Always 88 | schedulerName: default-scheduler 89 | securityContext: {} 90 | serviceAccount: grafana-custom 91 | serviceAccountName: grafana-custom 92 | terminationGracePeriodSeconds: 30 93 | volumes: 94 | - emptyDir: {} 95 | name: grafana-storage 96 | - name: grafana-datasources 97 | secret: 98 | defaultMode: 420 99 | secretName: grafana-datasources 100 | - configMap: 101 | defaultMode: 420 102 | name: grafana-dashboards 103 | name: grafana-dashboards 104 | - name: grafana-config 105 | secret: 106 | defaultMode: 420 107 | secretName: grafana-custom-config 108 | - name: secret-grafana-tls 109 | secret: 110 | defaultMode: 420 111 | secretName: grafana-custom-tls 112 | - name: secret-grafana-proxy 113 | secret: 114 | defaultMode: 420 115 | secretName: grafana-proxy 116 | - name: grafana-dashboards-custom 117 | configMap: 118 | defaultMode: 420 119 | name: grafana-dashboards-custom 120 | -------------------------------------------------------------------------------- /dashboards/namespaces-in-cluster.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [], 3 | "__requires": [ 4 | { 5 | "type": "grafana", 6 | "id": "grafana", 7 | "name": "Grafana", 8 | "version": "5.4.3" 9 | }, 10 | { 11 | "type": "panel", 12 | "id": "graph", 13 | "name": "Graph", 14 | "version": "5.0.0" 15 | }, 16 | { 17 | "type": "datasource", 18 | "id": "prometheus", 19 | "name": "Prometheus", 20 | "version": "5.0.0" 21 | }, 22 | { 23 | "type": "panel", 24 | "id": "table", 25 | "name": "Table", 26 | "version": "5.0.0" 27 | } 28 | ], 29 | "annotations": { 30 | "list": [ 31 | { 32 | "builtIn": 1, 33 | "datasource": "-- Grafana --", 34 | "enable": true, 35 | "hide": true, 36 | "iconColor": "rgba(0, 211, 255, 1)", 37 | "name": "Annotations & Alerts", 38 | "type": "dashboard" 39 | } 40 | ] 41 | }, 42 | "editable": true, 43 | "gnetId": null, 44 | "graphTooltip": 0, 45 | "id": null, 46 | "iteration": 1570200640181, 47 | "links": [], 48 | "panels": [ 49 | { 50 | "aliasColors": {}, 51 | "bars": false, 52 | "dashLength": 10, 53 | "dashes": false, 54 | "datasource": "$datasource", 55 | "fill": 1, 56 | "gridPos": { 57 | "h": 5, 58 | "w": 12, 59 | "x": 0, 60 | "y": 0 61 | }, 62 | "id": 15, 63 | "legend": { 64 | "avg": false, 65 | "current": false, 66 | "max": false, 67 | "min": false, 68 | "show": true, 69 | "total": false, 70 | "values": false 71 | }, 72 | "lines": true, 73 | "linewidth": 1, 74 | "links": [], 75 | "nullPointMode": "null", 76 | "percentage": false, 77 | "pointradius": 5, 78 | "points": false, 79 | "renderer": "flot", 80 | "seriesOverrides": [], 81 | "spaceLength": 10, 82 | "stack": false, 83 | "steppedLine": false, 84 | "targets": [ 85 | { 86 | "expr": "sum by (phase) ( \n ( kube_pod_status_phase{namespace=~\"$Namespace\"}\n or\n label_replace ( kube_pod_status_ready{namespace=~\"$Namespace\",condition=\"true\"}, \"phase\",\"Ready\",\"\",\"\" )\n )\n) ", 87 | "format": "time_series", 88 | "intervalFactor": 1, 89 | "legendFormat": "{{phase}}", 90 | "refId": "A" 91 | } 92 | ], 93 | "thresholds": [], 94 | "timeFrom": null, 95 | "timeRegions": [], 96 | "timeShift": null, 97 | "title": "Pod Phase", 98 | "tooltip": { 99 | "shared": true, 100 | "sort": 0, 101 | "value_type": "individual" 102 | }, 103 | "type": "graph", 104 | "xaxis": { 105 | "buckets": null, 106 | "mode": "time", 107 | "name": null, 108 | "show": true, 109 | "values": [] 110 | }, 111 | "yaxes": [ 112 | { 113 | "decimals": null, 114 | "format": "locale", 115 | "label": null, 116 | "logBase": 1, 117 | "max": null, 118 | "min": null, 119 | "show": true 120 | }, 121 | { 122 | "format": "short", 123 | "label": null, 124 | "logBase": 1, 125 | "max": null, 126 | "min": null, 127 | "show": true 128 | } 129 | ], 130 | "yaxis": { 131 | "align": false, 132 | "alignLevel": null 133 | } 134 | }, 135 | { 136 | "aliasColors": {}, 137 | "bars": false, 138 | "dashLength": 10, 139 | "dashes": false, 140 | "datasource": "$datasource", 141 | "fill": 1, 142 | "gridPos": { 143 | "h": 5, 144 | "w": 12, 145 | "x": 12, 146 | "y": 0 147 | }, 148 | "id": 17, 149 | "legend": { 150 | "avg": false, 151 | "current": false, 152 | "max": false, 153 | "min": false, 154 | "show": true, 155 | "total": false, 156 | "values": false 157 | }, 158 | "lines": true, 159 | "linewidth": 1, 160 | "links": [], 161 | "nullPointMode": "null", 162 | "percentage": false, 163 | "pointradius": 5, 164 | "points": false, 165 | "renderer": "flot", 166 | "seriesOverrides": [], 167 | "spaceLength": 10, 168 | "stack": false, 169 | "steppedLine": false, 170 | "targets": [ 171 | { 172 | "expr": "sum (increase(kube_pod_container_status_restarts_total{namespace=~\"$Namespace\"}[1h])) by (namespace) ", 173 | "format": "time_series", 174 | "intervalFactor": 1, 175 | "legendFormat": "{{namespace}}", 176 | "refId": "A" 177 | } 178 | ], 179 | "thresholds": [], 180 | "timeFrom": null, 181 | "timeRegions": [], 182 | "timeShift": null, 183 | "title": "Pod Restarts", 184 | "tooltip": { 185 | "shared": true, 186 | "sort": 0, 187 | "value_type": "individual" 188 | }, 189 | "type": "graph", 190 | "xaxis": { 191 | "buckets": null, 192 | "mode": "time", 193 | "name": null, 194 | "show": true, 195 | "values": [] 196 | }, 197 | "yaxes": [ 198 | { 199 | "decimals": null, 200 | "format": "locale", 201 | "label": null, 202 | "logBase": 1, 203 | "max": null, 204 | "min": null, 205 | "show": true 206 | }, 207 | { 208 | "format": "short", 209 | "label": null, 210 | "logBase": 1, 211 | "max": null, 212 | "min": null, 213 | "show": true 214 | } 215 | ], 216 | "yaxis": { 217 | "align": false, 218 | "alignLevel": null 219 | } 220 | }, 221 | { 222 | "collapsed": false, 223 | "gridPos": { 224 | "h": 1, 225 | "w": 24, 226 | "x": 0, 227 | "y": 5 228 | }, 229 | "id": 11, 230 | "panels": [], 231 | "repeat": null, 232 | "title": "CPU", 233 | "type": "row" 234 | }, 235 | { 236 | "aliasColors": {}, 237 | "bars": false, 238 | "dashLength": 10, 239 | "dashes": false, 240 | "datasource": "$datasource", 241 | "fill": 1, 242 | "gridPos": { 243 | "h": 6, 244 | "w": 12, 245 | "x": 0, 246 | "y": 6 247 | }, 248 | "id": 6, 249 | "legend": { 250 | "avg": false, 251 | "current": false, 252 | "max": false, 253 | "min": false, 254 | "show": true, 255 | "total": false, 256 | "values": false 257 | }, 258 | "lines": true, 259 | "linewidth": 1, 260 | "links": [], 261 | "nullPointMode": "null as zero", 262 | "percentage": false, 263 | "pointradius": 5, 264 | "points": false, 265 | "renderer": "flot", 266 | "seriesOverrides": [], 267 | "spaceLength": 10, 268 | "stack": false, 269 | "steppedLine": false, 270 | "targets": [ 271 | { 272 | "expr": "sum by (namespace) (\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=~\"$Namespace\"}\n ) ", 273 | "format": "time_series", 274 | "intervalFactor": 2, 275 | "legendFormat": "{{namespace}}", 276 | "legendLink": null, 277 | "refId": "A", 278 | "step": 10 279 | } 280 | ], 281 | "thresholds": [], 282 | "timeFrom": null, 283 | "timeRegions": [], 284 | "timeShift": null, 285 | "title": "CPU Usage", 286 | "tooltip": { 287 | "shared": true, 288 | "sort": 0, 289 | "value_type": "individual" 290 | }, 291 | "type": "graph", 292 | "xaxis": { 293 | "buckets": null, 294 | "mode": "time", 295 | "name": null, 296 | "show": true, 297 | "values": [] 298 | }, 299 | "yaxes": [ 300 | { 301 | "format": "short", 302 | "label": null, 303 | "logBase": 1, 304 | "max": null, 305 | "min": 0, 306 | "show": true 307 | }, 308 | { 309 | "format": "short", 310 | "label": null, 311 | "logBase": 1, 312 | "max": null, 313 | "min": null, 314 | "show": false 315 | } 316 | ], 317 | "yaxis": { 318 | "align": false, 319 | "alignLevel": null 320 | } 321 | }, 322 | { 323 | "aliasColors": {}, 324 | "bars": false, 325 | "columns": [], 326 | "dashLength": 10, 327 | "dashes": false, 328 | "datasource": "$datasource", 329 | "fill": 1, 330 | "fontSize": "100%", 331 | "gridPos": { 332 | "h": 6, 333 | "w": 12, 334 | "x": 12, 335 | "y": 6 336 | }, 337 | "id": 7, 338 | "legend": { 339 | "avg": false, 340 | "current": false, 341 | "max": false, 342 | "min": false, 343 | "show": true, 344 | "total": false, 345 | "values": false 346 | }, 347 | "lines": true, 348 | "linewidth": 1, 349 | "links": [ 350 | { 351 | "type": "dashboard" 352 | } 353 | ], 354 | "nullPointMode": "null as zero", 355 | "pageSize": null, 356 | "percentage": false, 357 | "pointradius": 5, 358 | "points": false, 359 | "renderer": "flot", 360 | "scroll": true, 361 | "seriesOverrides": [], 362 | "showHeader": true, 363 | "sort": { 364 | "col": 3, 365 | "desc": false 366 | }, 367 | "spaceLength": 10, 368 | "stack": false, 369 | "steppedLine": false, 370 | "styles": [ 371 | { 372 | "alias": "Time", 373 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 374 | "pattern": "Time", 375 | "type": "hidden" 376 | }, 377 | { 378 | "alias": "CPU Usage", 379 | "colorMode": null, 380 | "colors": [], 381 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 382 | "decimals": 2, 383 | "link": false, 384 | "linkTooltip": "Drill down", 385 | "linkUrl": "", 386 | "pattern": "Value #A", 387 | "thresholds": [], 388 | "type": "number", 389 | "unit": "short" 390 | }, 391 | { 392 | "alias": "CPU Requests", 393 | "colorMode": null, 394 | "colors": [], 395 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 396 | "decimals": 2, 397 | "link": false, 398 | "linkTooltip": "Drill down", 399 | "linkUrl": "", 400 | "pattern": "Value #B", 401 | "thresholds": [], 402 | "type": "number", 403 | "unit": "short" 404 | }, 405 | { 406 | "alias": "CPU Requests %", 407 | "colorMode": null, 408 | "colors": [], 409 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 410 | "decimals": 2, 411 | "link": false, 412 | "linkTooltip": "Drill down", 413 | "linkUrl": "", 414 | "pattern": "Value #C", 415 | "thresholds": [], 416 | "type": "number", 417 | "unit": "percentunit" 418 | }, 419 | { 420 | "alias": "CPU Limits", 421 | "colorMode": null, 422 | "colors": [], 423 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 424 | "decimals": 2, 425 | "link": false, 426 | "linkTooltip": "Drill down", 427 | "linkUrl": "", 428 | "pattern": "Value #D", 429 | "thresholds": [], 430 | "type": "number", 431 | "unit": "short" 432 | }, 433 | { 434 | "alias": "CPU Limits %", 435 | "colorMode": null, 436 | "colors": [], 437 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 438 | "decimals": 2, 439 | "link": false, 440 | "linkTooltip": "Drill down", 441 | "linkUrl": "", 442 | "pattern": "Value #E", 443 | "thresholds": [], 444 | "type": "number", 445 | "unit": "percentunit" 446 | }, 447 | { 448 | "alias": "Namespace", 449 | "colorMode": null, 450 | "colors": [], 451 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 452 | "decimals": 2, 453 | "link": true, 454 | "linkTooltip": "Drill down", 455 | "linkUrl": "/d/pods-in-namespaces/pods-in-namespace?var-datasource=$datasource&var-Namespace=$__cell", 456 | "pattern": "namespace", 457 | "thresholds": [], 458 | "type": "number", 459 | "unit": "short" 460 | }, 461 | { 462 | "alias": "", 463 | "colorMode": null, 464 | "colors": [], 465 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 466 | "decimals": 2, 467 | "pattern": "/.*/", 468 | "thresholds": [], 469 | "type": "string", 470 | "unit": "short" 471 | } 472 | ], 473 | "targets": [ 474 | { 475 | "expr": "sum by (namespace) (\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=~\"$Namespace\"}\n ) ", 476 | "format": "table", 477 | "instant": true, 478 | "intervalFactor": 2, 479 | "legendFormat": "", 480 | "refId": "A", 481 | "step": 10 482 | }, 483 | { 484 | "expr": "sum by (namespace) (kube_pod_container_resource_requests_cpu_cores{namespace=~\"$Namespace\"}) ", 485 | "format": "table", 486 | "instant": true, 487 | "intervalFactor": 2, 488 | "legendFormat": "", 489 | "refId": "B", 490 | "step": 10 491 | }, 492 | { 493 | "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=~\"$Namespace\"}) by (namespace) / sum(kube_pod_container_resource_requests_cpu_cores{namespace=~\"$Namespace\"}) by (namespace)\n", 494 | "format": "table", 495 | "instant": true, 496 | "intervalFactor": 2, 497 | "legendFormat": "", 498 | "refId": "C", 499 | "step": 10 500 | }, 501 | { 502 | "expr": "sum(kube_pod_container_resource_limits_cpu_cores{namespace=~\"$Namespace\"}) by (namespace)", 503 | "format": "table", 504 | "instant": true, 505 | "intervalFactor": 2, 506 | "legendFormat": "", 507 | "refId": "D", 508 | "step": 10 509 | }, 510 | { 511 | "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=~\"$Namespace\"}) by (namespace) / sum(kube_pod_container_resource_limits_cpu_cores{namespace=~\"$Namespace\"}) by (namespace)", 512 | "format": "table", 513 | "instant": true, 514 | "intervalFactor": 2, 515 | "legendFormat": "", 516 | "refId": "E", 517 | "step": 10 518 | } 519 | ], 520 | "thresholds": [], 521 | "timeFrom": null, 522 | "timeShift": null, 523 | "title": "CPU Quota", 524 | "tooltip": { 525 | "shared": true, 526 | "sort": 0, 527 | "value_type": "individual" 528 | }, 529 | "transform": "table", 530 | "type": "table", 531 | "xaxis": { 532 | "buckets": null, 533 | "mode": "time", 534 | "name": null, 535 | "show": true, 536 | "values": [] 537 | }, 538 | "yaxes": [ 539 | { 540 | "format": "short", 541 | "label": null, 542 | "logBase": 1, 543 | "max": null, 544 | "min": 0, 545 | "show": true 546 | }, 547 | { 548 | "format": "short", 549 | "label": null, 550 | "logBase": 1, 551 | "max": null, 552 | "min": null, 553 | "show": false 554 | } 555 | ] 556 | }, 557 | { 558 | "collapsed": false, 559 | "gridPos": { 560 | "h": 1, 561 | "w": 24, 562 | "x": 0, 563 | "y": 12 564 | }, 565 | "id": 13, 566 | "panels": [], 567 | "repeat": null, 568 | "title": "Memory", 569 | "type": "row" 570 | }, 571 | { 572 | "aliasColors": {}, 573 | "bars": false, 574 | "dashLength": 10, 575 | "dashes": false, 576 | "datasource": "$datasource", 577 | "fill": 1, 578 | "gridPos": { 579 | "h": 6, 580 | "w": 12, 581 | "x": 0, 582 | "y": 13 583 | }, 584 | "id": 8, 585 | "legend": { 586 | "avg": false, 587 | "current": false, 588 | "max": false, 589 | "min": false, 590 | "show": true, 591 | "total": false, 592 | "values": false 593 | }, 594 | "lines": true, 595 | "linewidth": 1, 596 | "links": [], 597 | "nullPointMode": "null as zero", 598 | "percentage": false, 599 | "pointradius": 5, 600 | "points": false, 601 | "renderer": "flot", 602 | "seriesOverrides": [], 603 | "spaceLength": 10, 604 | "stack": false, 605 | "steppedLine": false, 606 | "targets": [ 607 | { 608 | "expr": "sum(container_memory_rss{container_name!=\"\",namespace=~\"$Namespace\"}) by (namespace)", 609 | "format": "time_series", 610 | "intervalFactor": 2, 611 | "legendFormat": "{{namespace}}", 612 | "legendLink": null, 613 | "refId": "A", 614 | "step": 10 615 | } 616 | ], 617 | "thresholds": [], 618 | "timeFrom": null, 619 | "timeRegions": [], 620 | "timeShift": null, 621 | "title": "Memory Usage (w/o cache)", 622 | "tooltip": { 623 | "shared": true, 624 | "sort": 0, 625 | "value_type": "individual" 626 | }, 627 | "type": "graph", 628 | "xaxis": { 629 | "buckets": null, 630 | "mode": "time", 631 | "name": null, 632 | "show": true, 633 | "values": [] 634 | }, 635 | "yaxes": [ 636 | { 637 | "format": "bytes", 638 | "label": null, 639 | "logBase": 1, 640 | "max": null, 641 | "min": 0, 642 | "show": true 643 | }, 644 | { 645 | "format": "short", 646 | "label": null, 647 | "logBase": 1, 648 | "max": null, 649 | "min": null, 650 | "show": false 651 | } 652 | ], 653 | "yaxis": { 654 | "align": false, 655 | "alignLevel": null 656 | } 657 | }, 658 | { 659 | "aliasColors": {}, 660 | "bars": false, 661 | "columns": [], 662 | "dashLength": 10, 663 | "dashes": false, 664 | "datasource": "$datasource", 665 | "fill": 1, 666 | "fontSize": "100%", 667 | "gridPos": { 668 | "h": 6, 669 | "w": 12, 670 | "x": 12, 671 | "y": 13 672 | }, 673 | "id": 9, 674 | "legend": { 675 | "avg": false, 676 | "current": false, 677 | "max": false, 678 | "min": false, 679 | "show": true, 680 | "total": false, 681 | "values": false 682 | }, 683 | "lines": true, 684 | "linewidth": 1, 685 | "links": [], 686 | "nullPointMode": "null as zero", 687 | "pageSize": null, 688 | "percentage": false, 689 | "pointradius": 5, 690 | "points": false, 691 | "renderer": "flot", 692 | "scroll": true, 693 | "seriesOverrides": [], 694 | "showHeader": true, 695 | "sort": { 696 | "col": 0, 697 | "desc": true 698 | }, 699 | "spaceLength": 10, 700 | "stack": false, 701 | "steppedLine": false, 702 | "styles": [ 703 | { 704 | "alias": "Time", 705 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 706 | "pattern": "Time", 707 | "type": "hidden" 708 | }, 709 | { 710 | "alias": "Memory Usage", 711 | "colorMode": null, 712 | "colors": [], 713 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 714 | "decimals": null, 715 | "link": false, 716 | "linkTooltip": "Drill down", 717 | "linkUrl": "", 718 | "pattern": "Value #A", 719 | "thresholds": [], 720 | "type": "number", 721 | "unit": "bytes" 722 | }, 723 | { 724 | "alias": "Memory Requests", 725 | "colorMode": null, 726 | "colors": [], 727 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 728 | "decimals": null, 729 | "link": false, 730 | "linkTooltip": "Drill down", 731 | "linkUrl": "", 732 | "pattern": "Value #B", 733 | "thresholds": [], 734 | "type": "number", 735 | "unit": "bytes" 736 | }, 737 | { 738 | "alias": "Memory Requests %", 739 | "colorMode": null, 740 | "colors": [], 741 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 742 | "decimals": 2, 743 | "link": false, 744 | "linkTooltip": "Drill down", 745 | "linkUrl": "", 746 | "pattern": "Value #C", 747 | "thresholds": [], 748 | "type": "number", 749 | "unit": "percentunit" 750 | }, 751 | { 752 | "alias": "Memory Limits", 753 | "colorMode": null, 754 | "colors": [], 755 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 756 | "decimals": 2, 757 | "link": false, 758 | "linkTooltip": "Drill down", 759 | "linkUrl": "", 760 | "pattern": "Value #D", 761 | "thresholds": [], 762 | "type": "number", 763 | "unit": "bytes" 764 | }, 765 | { 766 | "alias": "Memory Limits %", 767 | "colorMode": null, 768 | "colors": [], 769 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 770 | "decimals": 2, 771 | "link": false, 772 | "linkTooltip": "Drill down", 773 | "linkUrl": "", 774 | "pattern": "Value #E", 775 | "thresholds": [], 776 | "type": "number", 777 | "unit": "percentunit" 778 | }, 779 | { 780 | "alias": "Namespace", 781 | "colorMode": null, 782 | "colors": [], 783 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 784 | "decimals": 2, 785 | "link": true, 786 | "linkTooltip": "Drill down", 787 | "linkUrl": "/d/pods-in-namespaces/pods-in-namespace?var-datasource=$datasource&var-Namespace=$__cell", 788 | "pattern": "namespace", 789 | "thresholds": [], 790 | "type": "string", 791 | "unit": "short" 792 | }, 793 | { 794 | "alias": "", 795 | "colorMode": null, 796 | "colors": [], 797 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 798 | "decimals": 2, 799 | "pattern": "/.*/", 800 | "thresholds": [], 801 | "type": "string", 802 | "unit": "short" 803 | } 804 | ], 805 | "targets": [ 806 | { 807 | "expr": "sum(container_memory_rss{container_name!=\"\",namespace=~\"$Namespace\"}) by (namespace)", 808 | "format": "table", 809 | "instant": true, 810 | "intervalFactor": 2, 811 | "legendFormat": "", 812 | "refId": "A", 813 | "step": 10 814 | }, 815 | { 816 | "expr": "sum(kube_pod_container_resource_requests_memory_bytes{namespace=~\"$Namespace\"}) by (namespace)", 817 | "format": "table", 818 | "instant": true, 819 | "intervalFactor": 2, 820 | "legendFormat": "", 821 | "refId": "B", 822 | "step": 10 823 | }, 824 | { 825 | "expr": "sum(container_memory_rss{container_name!=\"\",namespace=~\"$Namespace\"}) by (namespace) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=~\"$Namespace\"}) by (namespace)", 826 | "format": "table", 827 | "instant": true, 828 | "intervalFactor": 2, 829 | "legendFormat": "", 830 | "refId": "C", 831 | "step": 10 832 | }, 833 | { 834 | "expr": "sum(kube_pod_container_resource_limits_memory_bytes{namespace=~\"$Namespace\"}) by (namespace)", 835 | "format": "table", 836 | "instant": true, 837 | "intervalFactor": 2, 838 | "legendFormat": "", 839 | "refId": "D", 840 | "step": 10 841 | }, 842 | { 843 | "expr": "sum(container_memory_rss{container_name!=\"\",namespace=~\"$Namespace\"}) by (namespace) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=~\"$Namespace\"}) by (namespace)", 844 | "format": "table", 845 | "instant": true, 846 | "intervalFactor": 2, 847 | "legendFormat": "", 848 | "refId": "E", 849 | "step": 10 850 | } 851 | ], 852 | "thresholds": [], 853 | "timeFrom": null, 854 | "timeShift": null, 855 | "title": "Requests by Namespace", 856 | "tooltip": { 857 | "shared": true, 858 | "sort": 0, 859 | "value_type": "individual" 860 | }, 861 | "transform": "table", 862 | "type": "table", 863 | "xaxis": { 864 | "buckets": null, 865 | "mode": "time", 866 | "name": null, 867 | "show": true, 868 | "values": [] 869 | }, 870 | "yaxes": [ 871 | { 872 | "format": "short", 873 | "label": null, 874 | "logBase": 1, 875 | "max": null, 876 | "min": 0, 877 | "show": true 878 | }, 879 | { 880 | "format": "short", 881 | "label": null, 882 | "logBase": 1, 883 | "max": null, 884 | "min": null, 885 | "show": false 886 | } 887 | ] 888 | } 889 | ], 890 | "refresh": "10s", 891 | "schemaVersion": 16, 892 | "style": "dark", 893 | "tags": [], 894 | "templating": { 895 | "list": [ 896 | { 897 | "allValue": "", 898 | "current": {}, 899 | "datasource": "$datasource", 900 | "definition": "label_values(kube_namespace_labels{},namespace)", 901 | "hide": 0, 902 | "includeAll": true, 903 | "label": "Project", 904 | "multi": true, 905 | "name": "Namespace", 906 | "options": [], 907 | "query": "label_values(kube_namespace_labels{},namespace)", 908 | "refresh": 1, 909 | "regex": "", 910 | "skipUrlSync": false, 911 | "sort": 1, 912 | "tagValuesQuery": "", 913 | "tags": [], 914 | "tagsQuery": "", 915 | "type": "query", 916 | "useTags": false 917 | }, 918 | { 919 | "current": { 920 | "text": "prometheus", 921 | "value": "prometheus" 922 | }, 923 | "hide": 0, 924 | "label": null, 925 | "name": "datasource", 926 | "options": [], 927 | "query": "prometheus", 928 | "refresh": 1, 929 | "regex": "", 930 | "skipUrlSync": false, 931 | "type": "datasource" 932 | } 933 | ] 934 | }, 935 | "time": { 936 | "from": "now-1h", 937 | "to": "now" 938 | }, 939 | "timepicker": { 940 | "refresh_intervals": [ 941 | "5s", 942 | "10s", 943 | "30s", 944 | "1m", 945 | "5m", 946 | "15m", 947 | "30m", 948 | "1h", 949 | "2h", 950 | "1d" 951 | ], 952 | "time_options": [ 953 | "5m", 954 | "15m", 955 | "1h", 956 | "6h", 957 | "12h", 958 | "24h", 959 | "2d", 960 | "7d", 961 | "30d" 962 | ] 963 | }, 964 | "timezone": "", 965 | "title": "Namespaces in cluster", 966 | "uid": "namespaces-in-cluster", 967 | "version": 17 968 | } 969 | -------------------------------------------------------------------------------- /dashboards-cluster-overview/all-clusters-ops-cluster-overview.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [], 3 | "__requires": [ 4 | { 5 | "type": "grafana", 6 | "id": "grafana", 7 | "name": "Grafana", 8 | "version": "6.3.3" 9 | }, 10 | { 11 | "type": "datasource", 12 | "id": "prometheus", 13 | "name": "Prometheus", 14 | "version": "1.0.0" 15 | }, 16 | { 17 | "type": "panel", 18 | "id": "singlestat", 19 | "name": "Singlestat", 20 | "version": "" 21 | } 22 | ], 23 | "annotations": { 24 | "list": [ 25 | { 26 | "builtIn": 1, 27 | "datasource": "-- Grafana --", 28 | "enable": true, 29 | "hide": true, 30 | "iconColor": "rgba(0, 211, 255, 1)", 31 | "name": "Annotations & Alerts", 32 | "type": "dashboard" 33 | } 34 | ] 35 | }, 36 | "editable": true, 37 | "gnetId": null, 38 | "graphTooltip": 0, 39 | "id": null, 40 | "iteration": 1571325057614, 41 | "links": [], 42 | "panels": [ 43 | { 44 | "cacheTimeout": null, 45 | "colorBackground": false, 46 | "colorValue": false, 47 | "colors": [ 48 | "#d44a3a", 49 | "rgba(237, 129, 40, 0.89)", 50 | "rgba(138, 184, 255, 0.41)" 51 | ], 52 | "datasource": "$datasource", 53 | "format": "dateTimeAsIso", 54 | "gauge": { 55 | "maxValue": 100, 56 | "minValue": 0, 57 | "show": false, 58 | "thresholdLabels": false, 59 | "thresholdMarkers": true 60 | }, 61 | "gridPos": { 62 | "h": 1, 63 | "w": 5, 64 | "x": 19, 65 | "y": 0 66 | }, 67 | "id": 55, 68 | "interval": null, 69 | "links": [], 70 | "mappingType": 1, 71 | "mappingTypes": [ 72 | { 73 | "name": "value to text", 74 | "value": 1 75 | }, 76 | { 77 | "name": "range to text", 78 | "value": 2 79 | } 80 | ], 81 | "maxDataPoints": 100, 82 | "nullPointMode": "connected", 83 | "nullText": null, 84 | "options": {}, 85 | "postfix": "", 86 | "postfixFontSize": "50%", 87 | "prefix": "Updated: ", 88 | "prefixFontSize": "50%", 89 | "rangeMaps": [ 90 | { 91 | "from": "null", 92 | "text": "N/A", 93 | "to": "null" 94 | } 95 | ], 96 | "sparkline": { 97 | "fillColor": "rgba(31, 118, 189, 0.18)", 98 | "full": false, 99 | "lineColor": "rgb(31, 120, 193)", 100 | "show": false, 101 | "ymax": null, 102 | "ymin": null 103 | }, 104 | "tableColumn": "", 105 | "targets": [ 106 | { 107 | "expr": "(sum(up{job=\"apiserver\",cluster=~\"$Cluster\"} == 1))", 108 | "refId": "A" 109 | } 110 | ], 111 | "thresholds": "0,0", 112 | "timeFrom": null, 113 | "timeShift": null, 114 | "title": "", 115 | "transparent": true, 116 | "type": "singlestat", 117 | "valueFontSize": "50%", 118 | "valueMaps": [ 119 | { 120 | "op": "=", 121 | "text": "N/A", 122 | "value": "null" 123 | } 124 | ], 125 | "valueName": "last_time" 126 | }, 127 | { 128 | "collapsed": false, 129 | "gridPos": { 130 | "h": 1, 131 | "w": 24, 132 | "x": 0, 133 | "y": 1 134 | }, 135 | "id": 8, 136 | "panels": [], 137 | "repeat": "Cluster", 138 | "title": "Cluster - $Cluster", 139 | "type": "row" 140 | }, 141 | { 142 | "cacheTimeout": null, 143 | "colorBackground": true, 144 | "colorValue": false, 145 | "colors": [ 146 | "#d44a3a", 147 | "rgba(237, 129, 40, 0.89)", 148 | "#56A64B" 149 | ], 150 | "datasource": "$datasource", 151 | "format": "percent", 152 | "gauge": { 153 | "maxValue": 100, 154 | "minValue": 0, 155 | "show": false, 156 | "thresholdLabels": false, 157 | "thresholdMarkers": true 158 | }, 159 | "gridPos": { 160 | "h": 2, 161 | "w": 2, 162 | "x": 0, 163 | "y": 2 164 | }, 165 | "id": 12, 166 | "interval": null, 167 | "links": [ 168 | { 169 | "title": "Console - $Cluster", 170 | "url": "https://$Cluster" 171 | } 172 | ], 173 | "mappingType": 2, 174 | "mappingTypes": [ 175 | { 176 | "name": "value to text", 177 | "value": 1 178 | }, 179 | { 180 | "name": "range to text", 181 | "value": 2 182 | } 183 | ], 184 | "maxDataPoints": 100, 185 | "nullPointMode": "connected", 186 | "nullText": null, 187 | "options": {}, 188 | "postfix": "", 189 | "postfixFontSize": "50%", 190 | "prefix": "", 191 | "prefixFontSize": "50%", 192 | "rangeMaps": [ 193 | { 194 | "from": "null", 195 | "text": "N/A", 196 | "to": "null" 197 | } 198 | ], 199 | "sparkline": { 200 | "fillColor": "rgba(31, 118, 189, 0.18)", 201 | "full": false, 202 | "lineColor": "rgb(31, 120, 193)", 203 | "show": true, 204 | "ymax": null, 205 | "ymin": null 206 | }, 207 | "tableColumn": "", 208 | "targets": [ 209 | { 210 | "expr": "(sum(up{job=\"apiserver\",cluster=~\"$Cluster\"} == 1) / count(up{job=\"apiserver\",cluster=~\"$Cluster\"})) * 100", 211 | "refId": "A" 212 | } 213 | ], 214 | "thresholds": "95,80", 215 | "timeFrom": null, 216 | "timeShift": null, 217 | "title": "API Up", 218 | "type": "singlestat", 219 | "valueFontSize": "80%", 220 | "valueMaps": [ 221 | { 222 | "op": "=", 223 | "text": "N/A", 224 | "value": "null" 225 | }, 226 | { 227 | "op": "=", 228 | "text": "", 229 | "value": "" 230 | } 231 | ], 232 | "valueName": "avg" 233 | }, 234 | { 235 | "cacheTimeout": null, 236 | "colorBackground": true, 237 | "colorValue": false, 238 | "colors": [ 239 | "#d44a3a", 240 | "rgba(237, 129, 40, 0.89)", 241 | "#56A64B" 242 | ], 243 | "datasource": "$datasource", 244 | "format": "percent", 245 | "gauge": { 246 | "maxValue": 100, 247 | "minValue": 0, 248 | "show": false, 249 | "thresholdLabels": false, 250 | "thresholdMarkers": true 251 | }, 252 | "gridPos": { 253 | "h": 2, 254 | "w": 3, 255 | "x": 2, 256 | "y": 2 257 | }, 258 | "id": 13, 259 | "interval": null, 260 | "links": [], 261 | "mappingType": 2, 262 | "mappingTypes": [ 263 | { 264 | "name": "value to text", 265 | "value": 1 266 | }, 267 | { 268 | "name": "range to text", 269 | "value": 2 270 | } 271 | ], 272 | "maxDataPoints": 100, 273 | "nullPointMode": "connected", 274 | "nullText": null, 275 | "options": {}, 276 | "postfix": "", 277 | "postfixFontSize": "50%", 278 | "prefix": "", 279 | "prefixFontSize": "50%", 280 | "rangeMaps": [ 281 | { 282 | "from": "null", 283 | "text": "N/A", 284 | "to": "null" 285 | } 286 | ], 287 | "sparkline": { 288 | "fillColor": "rgba(31, 118, 189, 0.18)", 289 | "full": false, 290 | "lineColor": "rgb(31, 120, 193)", 291 | "show": false, 292 | "ymax": null, 293 | "ymin": null 294 | }, 295 | "tableColumn": "", 296 | "targets": [ 297 | { 298 | "expr": "(sum(up{job=\"kube-controllers\",cluster=~\"$Cluster\"} == 1) / count(up{job=\"kube-controllers\",cluster=~\"$Cluster\"})) * 100", 299 | "refId": "A" 300 | } 301 | ], 302 | "thresholds": "95,80", 303 | "timeFrom": null, 304 | "timeShift": null, 305 | "title": "Controllers Up", 306 | "type": "singlestat", 307 | "valueFontSize": "80%", 308 | "valueMaps": [ 309 | { 310 | "op": "=", 311 | "text": "N/A", 312 | "value": "null" 313 | } 314 | ], 315 | "valueName": "avg" 316 | }, 317 | { 318 | "cacheTimeout": null, 319 | "colorBackground": true, 320 | "colorValue": false, 321 | "colors": [ 322 | "#d44a3a", 323 | "rgba(237, 129, 40, 0.89)", 324 | "#56A64B" 325 | ], 326 | "datasource": "$datasource", 327 | "format": "percentunit", 328 | "gauge": { 329 | "maxValue": 100, 330 | "minValue": 0, 331 | "show": false, 332 | "thresholdLabels": false, 333 | "thresholdMarkers": true 334 | }, 335 | "gridPos": { 336 | "h": 2, 337 | "w": 3, 338 | "x": 5, 339 | "y": 2 340 | }, 341 | "id": 17, 342 | "interval": null, 343 | "links": [], 344 | "mappingType": 1, 345 | "mappingTypes": [ 346 | { 347 | "name": "value to text", 348 | "value": 1 349 | }, 350 | { 351 | "name": "range to text", 352 | "value": 2 353 | } 354 | ], 355 | "maxDataPoints": 100, 356 | "nullPointMode": "connected", 357 | "nullText": null, 358 | "options": {}, 359 | "postfix": "", 360 | "postfixFontSize": "50%", 361 | "prefix": "", 362 | "prefixFontSize": "50%", 363 | "rangeMaps": [ 364 | { 365 | "from": "null", 366 | "text": "N/A", 367 | "to": "null" 368 | } 369 | ], 370 | "sparkline": { 371 | "fillColor": "rgba(31, 118, 189, 0.18)", 372 | "full": true, 373 | "lineColor": "rgb(31, 120, 193)", 374 | "show": true, 375 | "ymax": null, 376 | "ymin": null 377 | }, 378 | "tableColumn": "", 379 | "targets": [ 380 | { 381 | "expr": "sum(kube_node_status_condition{status=\"true\",condition=\"Ready\",cluster=~\"$Cluster\"}) / sum(kube_node_labels{cluster=~\"$Cluster\"})", 382 | "refId": "A" 383 | } 384 | ], 385 | "thresholds": ".9,.8", 386 | "timeFrom": null, 387 | "timeShift": null, 388 | "title": "Node Health", 389 | "type": "singlestat", 390 | "valueFontSize": "80%", 391 | "valueMaps": [ 392 | { 393 | "op": "=", 394 | "text": "N/A", 395 | "value": "null" 396 | } 397 | ], 398 | "valueName": "avg" 399 | }, 400 | { 401 | "cacheTimeout": null, 402 | "colorBackground": true, 403 | "colorValue": false, 404 | "colors": [ 405 | "#d44a3a", 406 | "rgba(237, 129, 40, 0.89)", 407 | "#56A64B" 408 | ], 409 | "datasource": "$datasource", 410 | "format": "percent", 411 | "gauge": { 412 | "maxValue": 100, 413 | "minValue": 0, 414 | "show": false, 415 | "thresholdLabels": false, 416 | "thresholdMarkers": true 417 | }, 418 | "gridPos": { 419 | "h": 2, 420 | "w": 3, 421 | "x": 8, 422 | "y": 2 423 | }, 424 | "id": 14, 425 | "interval": null, 426 | "links": [], 427 | "mappingType": 1, 428 | "mappingTypes": [ 429 | { 430 | "name": "value to text", 431 | "value": 1 432 | }, 433 | { 434 | "name": "range to text", 435 | "value": 2 436 | } 437 | ], 438 | "maxDataPoints": 100, 439 | "nullPointMode": "connected", 440 | "nullText": null, 441 | "options": {}, 442 | "postfix": "", 443 | "postfixFontSize": "50%", 444 | "prefix": "", 445 | "prefixFontSize": "50%", 446 | "rangeMaps": [ 447 | { 448 | "from": "null", 449 | "text": "N/A", 450 | "to": "null" 451 | } 452 | ], 453 | "sparkline": { 454 | "fillColor": "rgba(31, 118, 189, 0.18)", 455 | "full": true, 456 | "lineColor": "rgb(31, 120, 193)", 457 | "show": true, 458 | "ymax": null, 459 | "ymin": null 460 | }, 461 | "tableColumn": "", 462 | "targets": [ 463 | { 464 | "expr": "sum(rate(apiserver_request_count{code=~\"2..\",cluster=~\"$Cluster\"}[5m])) / sum(rate(apiserver_request_count{cluster=~\"$Cluster\"}[5m])) * 100", 465 | "refId": "A" 466 | } 467 | ], 468 | "thresholds": "95,80", 469 | "timeFrom": null, 470 | "timeShift": null, 471 | "title": "API Success Rate", 472 | "type": "singlestat", 473 | "valueFontSize": "80%", 474 | "valueMaps": [ 475 | { 476 | "op": "=", 477 | "text": "N/A", 478 | "value": "null" 479 | } 480 | ], 481 | "valueName": "avg" 482 | }, 483 | { 484 | "cacheTimeout": null, 485 | "colorBackground": true, 486 | "colorValue": false, 487 | "colors": [ 488 | "#56A64B", 489 | "rgba(237, 129, 40, 0.89)", 490 | "#d44a3a" 491 | ], 492 | "datasource": "$datasource", 493 | "decimals": null, 494 | "format": "percentunit", 495 | "gauge": { 496 | "maxValue": 100, 497 | "minValue": 0, 498 | "show": false, 499 | "thresholdLabels": false, 500 | "thresholdMarkers": true 501 | }, 502 | "gridPos": { 503 | "h": 2, 504 | "w": 2, 505 | "x": 11, 506 | "y": 2 507 | }, 508 | "id": 4, 509 | "interval": null, 510 | "links": [], 511 | "mappingType": 1, 512 | "mappingTypes": [ 513 | { 514 | "name": "value to text", 515 | "value": 1 516 | }, 517 | { 518 | "name": "range to text", 519 | "value": 2 520 | } 521 | ], 522 | "maxDataPoints": 100, 523 | "nullPointMode": "connected", 524 | "nullText": null, 525 | "options": {}, 526 | "postfix": "", 527 | "postfixFontSize": "50%", 528 | "prefix": "", 529 | "prefixFontSize": "50%", 530 | "rangeMaps": [ 531 | { 532 | "from": "null", 533 | "text": "N/A", 534 | "to": "null" 535 | } 536 | ], 537 | "sparkline": { 538 | "fillColor": "rgba(31, 118, 189, 0.18)", 539 | "full": true, 540 | "lineColor": "rgb(31, 120, 193)", 541 | "show": true, 542 | "ymax": null, 543 | "ymin": null 544 | }, 545 | "tableColumn": "", 546 | "targets": [ 547 | { 548 | "expr": "sum( node:node_cpu_utilisation:avg1m{cluster=~\"$Cluster\"} * on (node) group_left kube_node_status_capacity_cpu_cores{cluster=~\"$Cluster\"} ) / sum( kube_node_status_capacity_cpu_cores{cluster=~\"$Cluster\"} )", 549 | "legendFormat": "", 550 | "refId": "A" 551 | } 552 | ], 553 | "thresholds": ".8,.9", 554 | "timeFrom": null, 555 | "timeShift": null, 556 | "title": "CPU %", 557 | "type": "singlestat", 558 | "valueFontSize": "80%", 559 | "valueMaps": [ 560 | { 561 | "op": "=", 562 | "text": "N/A", 563 | "value": "null" 564 | } 565 | ], 566 | "valueName": "avg" 567 | }, 568 | { 569 | "cacheTimeout": null, 570 | "colorBackground": true, 571 | "colorValue": false, 572 | "colors": [ 573 | "#56A64B", 574 | "rgba(237, 129, 40, 0.89)", 575 | "#d44a3a" 576 | ], 577 | "datasource": "$datasource", 578 | "format": "percentunit", 579 | "gauge": { 580 | "maxValue": 100, 581 | "minValue": 0, 582 | "show": false, 583 | "thresholdLabels": false, 584 | "thresholdMarkers": true 585 | }, 586 | "gridPos": { 587 | "h": 2, 588 | "w": 2, 589 | "x": 13, 590 | "y": 2 591 | }, 592 | "id": 6, 593 | "interval": null, 594 | "links": [], 595 | "mappingType": 1, 596 | "mappingTypes": [ 597 | { 598 | "name": "value to text", 599 | "value": 1 600 | }, 601 | { 602 | "name": "range to text", 603 | "value": 2 604 | } 605 | ], 606 | "maxDataPoints": 100, 607 | "nullPointMode": "connected", 608 | "nullText": null, 609 | "options": {}, 610 | "postfix": "", 611 | "postfixFontSize": "50%", 612 | "prefix": "", 613 | "prefixFontSize": "50%", 614 | "rangeMaps": [ 615 | { 616 | "from": "null", 617 | "text": "N/A", 618 | "to": "null" 619 | } 620 | ], 621 | "sparkline": { 622 | "fillColor": "rgba(31, 118, 189, 0.18)", 623 | "full": true, 624 | "lineColor": "rgb(31, 120, 193)", 625 | "show": true, 626 | "ymax": null, 627 | "ymin": null 628 | }, 629 | "tableColumn": "", 630 | "targets": [ 631 | { 632 | "expr": "sum( (node_memory_MemTotal_bytes{cluster=~\"$Cluster\"} - node_memory_MemAvailable_bytes{cluster=~\"$Cluster\"}) * on (namespace, pod) group_left(node) node_namespace_pod:kube_pod_info:{cluster=~\"$Cluster\"} ) / sum( kube_node_status_capacity_memory_bytes{cluster=~\"$Cluster\"} )", 633 | "refId": "A" 634 | } 635 | ], 636 | "thresholds": ".8,.9", 637 | "timeFrom": null, 638 | "timeShift": null, 639 | "title": "Mem Usage", 640 | "type": "singlestat", 641 | "valueFontSize": "80%", 642 | "valueMaps": [ 643 | { 644 | "op": "=", 645 | "text": "N/A", 646 | "value": "null" 647 | } 648 | ], 649 | "valueName": "avg" 650 | }, 651 | { 652 | "cacheTimeout": null, 653 | "colorBackground": true, 654 | "colorValue": false, 655 | "colors": [ 656 | "#56A64B", 657 | "rgba(237, 129, 40, 0.89)", 658 | "#d44a3a" 659 | ], 660 | "datasource": "$datasource", 661 | "decimals": null, 662 | "format": "percentunit", 663 | "gauge": { 664 | "maxValue": 100, 665 | "minValue": 0, 666 | "show": false, 667 | "thresholdLabels": false, 668 | "thresholdMarkers": true 669 | }, 670 | "gridPos": { 671 | "h": 2, 672 | "w": 2, 673 | "x": 15, 674 | "y": 2 675 | }, 676 | "id": 2, 677 | "interval": null, 678 | "links": [], 679 | "mappingType": 1, 680 | "mappingTypes": [ 681 | { 682 | "name": "value to text", 683 | "value": 1 684 | }, 685 | { 686 | "name": "range to text", 687 | "value": 2 688 | } 689 | ], 690 | "maxDataPoints": 100, 691 | "nullPointMode": "connected", 692 | "nullText": null, 693 | "options": {}, 694 | "pluginVersion": "6.3.3", 695 | "postfix": "", 696 | "postfixFontSize": "50%", 697 | "prefix": "", 698 | "prefixFontSize": "50%", 699 | "rangeMaps": [ 700 | { 701 | "from": "null", 702 | "text": "N/A", 703 | "to": "null" 704 | } 705 | ], 706 | "sparkline": { 707 | "fillColor": "rgba(31, 118, 189, 0.18)", 708 | "full": true, 709 | "lineColor": "rgb(31, 120, 193)", 710 | "show": true, 711 | "ymax": null, 712 | "ymin": null 713 | }, 714 | "tableColumn": "", 715 | "targets": [ 716 | { 717 | "expr": "(sum(node_filesystem_size{device!=\"rootfs\",cluster=~\"$Cluster\"}) - sum(node_filesystem_free{device!=\"rootfs\",cluster=~\"$Cluster\"})) / sum(node_filesystem_size{device!=\"rootfs\",cluster=~\"$Cluster\"}) ", 718 | "refId": "A" 719 | } 720 | ], 721 | "thresholds": ".8,.9", 722 | "timeFrom": null, 723 | "timeShift": null, 724 | "title": "Disk Usage", 725 | "type": "singlestat", 726 | "valueFontSize": "80%", 727 | "valueMaps": [ 728 | { 729 | "op": "=", 730 | "text": "N/A", 731 | "value": "null" 732 | } 733 | ], 734 | "valueName": "avg" 735 | }, 736 | { 737 | "cacheTimeout": null, 738 | "colorBackground": true, 739 | "colorValue": false, 740 | "colors": [ 741 | "#56A64B", 742 | "rgba(237, 129, 40, 0.89)", 743 | "#d44a3a" 744 | ], 745 | "datasource": "$datasource", 746 | "format": "percent", 747 | "gauge": { 748 | "maxValue": 100, 749 | "minValue": 0, 750 | "show": false, 751 | "thresholdLabels": false, 752 | "thresholdMarkers": true 753 | }, 754 | "gridPos": { 755 | "h": 2, 756 | "w": 2, 757 | "x": 17, 758 | "y": 2 759 | }, 760 | "id": 15, 761 | "interval": null, 762 | "links": [], 763 | "mappingType": 1, 764 | "mappingTypes": [ 765 | { 766 | "name": "value to text", 767 | "value": 1 768 | }, 769 | { 770 | "name": "range to text", 771 | "value": 2 772 | } 773 | ], 774 | "maxDataPoints": 100, 775 | "nullPointMode": "connected", 776 | "nullText": null, 777 | "options": {}, 778 | "postfix": "", 779 | "postfixFontSize": "50%", 780 | "prefix": "", 781 | "prefixFontSize": "50%", 782 | "rangeMaps": [ 783 | { 784 | "from": "null", 785 | "text": "N/A", 786 | "to": "null" 787 | } 788 | ], 789 | "sparkline": { 790 | "fillColor": "rgba(31, 118, 189, 0.18)", 791 | "full": true, 792 | "lineColor": "rgb(31, 120, 193)", 793 | "show": true, 794 | "ymax": null, 795 | "ymin": null 796 | }, 797 | "tableColumn": "", 798 | "targets": [ 799 | { 800 | "expr": "100 - (sum(kube_node_status_capacity_pods{cluster=~\"$Cluster\"}) - sum(kube_pod_info{cluster=~\"$Cluster\"})) / sum(kube_node_status_capacity_pods{cluster=~\"$Cluster\"}) * 100", 801 | "refId": "A" 802 | } 803 | ], 804 | "thresholds": "80,90", 805 | "timeFrom": null, 806 | "timeShift": null, 807 | "title": "Pod Usage", 808 | "type": "singlestat", 809 | "valueFontSize": "80%", 810 | "valueMaps": [ 811 | { 812 | "op": "=", 813 | "text": "N/A", 814 | "value": "null" 815 | } 816 | ], 817 | "valueName": "avg" 818 | }, 819 | { 820 | "cacheTimeout": null, 821 | "colorBackground": true, 822 | "colorValue": false, 823 | "colors": [ 824 | "#d44a3a", 825 | "rgba(237, 129, 40, 0.89)", 826 | "#56A64B" 827 | ], 828 | "datasource": "$datasource", 829 | "decimals": null, 830 | "description": "", 831 | "format": "percent", 832 | "gauge": { 833 | "maxValue": 100, 834 | "minValue": 0, 835 | "show": false, 836 | "thresholdLabels": false, 837 | "thresholdMarkers": true 838 | }, 839 | "gridPos": { 840 | "h": 2, 841 | "w": 2, 842 | "x": 19, 843 | "y": 2 844 | }, 845 | "id": 19, 846 | "interval": null, 847 | "links": [], 848 | "mappingType": 1, 849 | "mappingTypes": [ 850 | { 851 | "name": "value to text", 852 | "value": 1 853 | }, 854 | { 855 | "name": "range to text", 856 | "value": 2 857 | } 858 | ], 859 | "maxDataPoints": 100, 860 | "nullPointMode": "connected", 861 | "nullText": null, 862 | "options": {}, 863 | "postfix": "", 864 | "postfixFontSize": "50%", 865 | "prefix": "", 866 | "prefixFontSize": "50%", 867 | "rangeMaps": [ 868 | { 869 | "from": "null", 870 | "text": "N/A", 871 | "to": "null" 872 | } 873 | ], 874 | "sparkline": { 875 | "fillColor": "rgba(31, 118, 189, 0.18)", 876 | "full": true, 877 | "lineColor": "rgb(31, 120, 193)", 878 | "show": true, 879 | "ymax": null, 880 | "ymin": null 881 | }, 882 | "tableColumn": "", 883 | "targets": [ 884 | { 885 | "expr": "(1 - (sum (kube_pod_status_phase{phase=\"Failed\",phase!=\"Unknown\",cluster=~\"$Cluster\"}) / sum(kube_pod_status_phase{cluster=~\"$Cluster\"})) ) * 100", 886 | "instant": true, 887 | "refId": "A" 888 | } 889 | ], 890 | "thresholds": "80,90", 891 | "timeFrom": null, 892 | "timeShift": null, 893 | "title": "Pod Health", 894 | "type": "singlestat", 895 | "valueFontSize": "80%", 896 | "valueMaps": [ 897 | { 898 | "op": "=", 899 | "text": "N/A", 900 | "value": "null" 901 | } 902 | ], 903 | "valueName": "avg" 904 | }, 905 | { 906 | "cacheTimeout": null, 907 | "colorBackground": true, 908 | "colorValue": false, 909 | "colors": [ 910 | "#56A64B", 911 | "rgba(237, 129, 40, 0.89)", 912 | "#d44a3a" 913 | ], 914 | "datasource": "$datasource", 915 | "description": "", 916 | "format": "none", 917 | "gauge": { 918 | "maxValue": 100, 919 | "minValue": 0, 920 | "show": false, 921 | "thresholdLabels": false, 922 | "thresholdMarkers": true 923 | }, 924 | "gridPos": { 925 | "h": 2, 926 | "w": 3, 927 | "x": 21, 928 | "y": 2 929 | }, 930 | "id": 20, 931 | "interval": null, 932 | "links": [], 933 | "mappingType": 1, 934 | "mappingTypes": [ 935 | { 936 | "name": "value to text", 937 | "value": 1 938 | }, 939 | { 940 | "name": "range to text", 941 | "value": 2 942 | } 943 | ], 944 | "maxDataPoints": 100, 945 | "nullPointMode": "connected", 946 | "nullText": null, 947 | "options": {}, 948 | "postfix": "", 949 | "postfixFontSize": "50%", 950 | "prefix": "", 951 | "prefixFontSize": "50%", 952 | "rangeMaps": [ 953 | { 954 | "from": "null", 955 | "text": "N/A", 956 | "to": "null" 957 | } 958 | ], 959 | "sparkline": { 960 | "fillColor": "rgba(31, 118, 189, 0.18)", 961 | "full": false, 962 | "lineColor": "rgb(31, 120, 193)", 963 | "show": true, 964 | "ymax": null, 965 | "ymin": null 966 | }, 967 | "tableColumn": "", 968 | "targets": [ 969 | { 970 | "expr": "(sum(kube_pod_status_phase{phase=\"Running\",cluster=~\"$Cluster\"} ) \r - sum(kube_pod_status_ready{condition=\"true\",cluster=~\"$Cluster\"}))", 971 | "instant": true, 972 | "refId": "A" 973 | } 974 | ], 975 | "thresholds": "1,2", 976 | "timeFrom": null, 977 | "timeShift": null, 978 | "title": "Crashlooping", 979 | "type": "singlestat", 980 | "valueFontSize": "80%", 981 | "valueMaps": [ 982 | { 983 | "op": "=", 984 | "text": "N/A", 985 | "value": "null" 986 | } 987 | ], 988 | "valueName": "avg" 989 | } 990 | ], 991 | "refresh": "1m", 992 | "schemaVersion": 19, 993 | "style": "dark", 994 | "tags": [], 995 | "templating": { 996 | "list": [ 997 | { 998 | "current": { 999 | "text": "prometheus", 1000 | "value": "prometheus" 1001 | }, 1002 | "hide": 2, 1003 | "includeAll": false, 1004 | "label": null, 1005 | "multi": false, 1006 | "name": "datasource", 1007 | "options": [], 1008 | "query": "prometheus", 1009 | "refresh": 1, 1010 | "regex": "", 1011 | "skipUrlSync": false, 1012 | "type": "datasource" 1013 | }, 1014 | { 1015 | "allValue": ".*", 1016 | "current": {}, 1017 | "datasource": "$datasource", 1018 | "definition": "label_values(kube_pod_info,cluster)", 1019 | "hide": 0, 1020 | "includeAll": true, 1021 | "label": null, 1022 | "multi": false, 1023 | "name": "Cluster", 1024 | "options": [], 1025 | "query": "label_values(kube_pod_info,cluster)", 1026 | "refresh": 1, 1027 | "regex": "", 1028 | "skipUrlSync": false, 1029 | "sort": 1, 1030 | "tagValuesQuery": "", 1031 | "tags": [], 1032 | "tagsQuery": "", 1033 | "type": "query", 1034 | "useTags": false 1035 | } 1036 | ] 1037 | }, 1038 | "time": { 1039 | "from": "now-5m", 1040 | "to": "now" 1041 | }, 1042 | "timepicker": { 1043 | "refresh_intervals": [ 1044 | "5s", 1045 | "10s", 1046 | "30s", 1047 | "1m", 1048 | "5m", 1049 | "15m", 1050 | "30m", 1051 | "1h", 1052 | "2h", 1053 | "1d" 1054 | ] 1055 | }, 1056 | "timezone": "", 1057 | "title": "Ops - Cluster Overview", 1058 | "uid": "ops-cluster-overview", 1059 | "version": 3 1060 | } -------------------------------------------------------------------------------- /dashboards-cluster-overview/all-clusters-ops-cluster-overview-by-datasource.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [], 3 | "__requires": [ 4 | { 5 | "type": "grafana", 6 | "id": "grafana", 7 | "name": "Grafana", 8 | "version": "6.3.3" 9 | }, 10 | { 11 | "type": "datasource", 12 | "id": "prometheus", 13 | "name": "Prometheus", 14 | "version": "1.0.0" 15 | }, 16 | { 17 | "type": "panel", 18 | "id": "singlestat", 19 | "name": "Singlestat", 20 | "version": "" 21 | } 22 | ], 23 | "annotations": { 24 | "list": [ 25 | { 26 | "builtIn": 1, 27 | "datasource": "-- Grafana --", 28 | "enable": true, 29 | "hide": true, 30 | "iconColor": "rgba(0, 211, 255, 1)", 31 | "name": "Annotations & Alerts", 32 | "type": "dashboard" 33 | } 34 | ] 35 | }, 36 | "editable": true, 37 | "gnetId": null, 38 | "graphTooltip": 0, 39 | "id": null, 40 | "iteration": 1571325057614, 41 | "links": [], 42 | "panels": [ 43 | { 44 | "cacheTimeout": null, 45 | "colorBackground": false, 46 | "colorValue": false, 47 | "colors": [ 48 | "#d44a3a", 49 | "rgba(237, 129, 40, 0.89)", 50 | "rgba(138, 184, 255, 0.41)" 51 | ], 52 | "datasource": "$datasource", 53 | "format": "dateTimeAsIso", 54 | "gauge": { 55 | "maxValue": 100, 56 | "minValue": 0, 57 | "show": false, 58 | "thresholdLabels": false, 59 | "thresholdMarkers": true 60 | }, 61 | "gridPos": { 62 | "h": 1, 63 | "w": 5, 64 | "x": 19, 65 | "y": 0 66 | }, 67 | "id": 55, 68 | "interval": null, 69 | "links": [], 70 | "mappingType": 1, 71 | "mappingTypes": [ 72 | { 73 | "name": "value to text", 74 | "value": 1 75 | }, 76 | { 77 | "name": "range to text", 78 | "value": 2 79 | } 80 | ], 81 | "maxDataPoints": 100, 82 | "nullPointMode": "connected", 83 | "nullText": null, 84 | "options": {}, 85 | "postfix": "", 86 | "postfixFontSize": "50%", 87 | "prefix": "Updated: ", 88 | "prefixFontSize": "50%", 89 | "rangeMaps": [ 90 | { 91 | "from": "null", 92 | "text": "N/A", 93 | "to": "null" 94 | } 95 | ], 96 | "sparkline": { 97 | "fillColor": "rgba(31, 118, 189, 0.18)", 98 | "full": false, 99 | "lineColor": "rgb(31, 120, 193)", 100 | "show": false, 101 | "ymax": null, 102 | "ymin": null 103 | }, 104 | "tableColumn": "", 105 | "targets": [ 106 | { 107 | "expr": "(sum(up{job=\"apiserver\",cluster=~\"$Cluster\"} == 1))", 108 | "refId": "A" 109 | } 110 | ], 111 | "thresholds": "0,0", 112 | "timeFrom": null, 113 | "timeShift": null, 114 | "title": "", 115 | "transparent": true, 116 | "type": "singlestat", 117 | "valueFontSize": "50%", 118 | "valueMaps": [ 119 | { 120 | "op": "=", 121 | "text": "N/A", 122 | "value": "null" 123 | } 124 | ], 125 | "valueName": "last_time" 126 | }, 127 | { 128 | "collapsed": false, 129 | "gridPos": { 130 | "h": 1, 131 | "w": 24, 132 | "x": 0, 133 | "y": 1 134 | }, 135 | "id": 8, 136 | "panels": [], 137 | "repeat": "datasource", 138 | "title": "Cluster", 139 | "type": "row" 140 | }, 141 | { 142 | "cacheTimeout": null, 143 | "colorBackground": true, 144 | "colorValue": false, 145 | "colors": [ 146 | "#d44a3a", 147 | "rgba(237, 129, 40, 0.89)", 148 | "#56A64B" 149 | ], 150 | "datasource": "$datasource", 151 | "format": "percent", 152 | "gauge": { 153 | "maxValue": 100, 154 | "minValue": 0, 155 | "show": false, 156 | "thresholdLabels": false, 157 | "thresholdMarkers": true 158 | }, 159 | "gridPos": { 160 | "h": 2, 161 | "w": 2, 162 | "x": 0, 163 | "y": 2 164 | }, 165 | "id": 12, 166 | "interval": null, 167 | "links": [ 168 | { 169 | "title": "Console - $Cluster", 170 | "url": "https://$Cluster" 171 | } 172 | ], 173 | "mappingType": 2, 174 | "mappingTypes": [ 175 | { 176 | "name": "value to text", 177 | "value": 1 178 | }, 179 | { 180 | "name": "range to text", 181 | "value": 2 182 | } 183 | ], 184 | "maxDataPoints": 100, 185 | "nullPointMode": "connected", 186 | "nullText": null, 187 | "options": {}, 188 | "postfix": "", 189 | "postfixFontSize": "50%", 190 | "prefix": "", 191 | "prefixFontSize": "50%", 192 | "rangeMaps": [ 193 | { 194 | "from": "null", 195 | "text": "N/A", 196 | "to": "null" 197 | } 198 | ], 199 | "sparkline": { 200 | "fillColor": "rgba(31, 118, 189, 0.18)", 201 | "full": false, 202 | "lineColor": "rgb(31, 120, 193)", 203 | "show": true, 204 | "ymax": null, 205 | "ymin": null 206 | }, 207 | "tableColumn": "", 208 | "targets": [ 209 | { 210 | "expr": "(sum(up{job=\"apiserver\",cluster=~\"$Cluster\"} == 1) / count(up{job=\"apiserver\",cluster=~\"$Cluster\"})) * 100", 211 | "refId": "A" 212 | } 213 | ], 214 | "thresholds": "95,80", 215 | "timeFrom": null, 216 | "timeShift": null, 217 | "title": "API Up", 218 | "type": "singlestat", 219 | "valueFontSize": "80%", 220 | "valueMaps": [ 221 | { 222 | "op": "=", 223 | "text": "N/A", 224 | "value": "null" 225 | }, 226 | { 227 | "op": "=", 228 | "text": "", 229 | "value": "" 230 | } 231 | ], 232 | "valueName": "avg" 233 | }, 234 | { 235 | "cacheTimeout": null, 236 | "colorBackground": true, 237 | "colorValue": false, 238 | "colors": [ 239 | "#d44a3a", 240 | "rgba(237, 129, 40, 0.89)", 241 | "#56A64B" 242 | ], 243 | "datasource": "$datasource", 244 | "format": "percent", 245 | "gauge": { 246 | "maxValue": 100, 247 | "minValue": 0, 248 | "show": false, 249 | "thresholdLabels": false, 250 | "thresholdMarkers": true 251 | }, 252 | "gridPos": { 253 | "h": 2, 254 | "w": 3, 255 | "x": 2, 256 | "y": 2 257 | }, 258 | "id": 13, 259 | "interval": null, 260 | "links": [], 261 | "mappingType": 2, 262 | "mappingTypes": [ 263 | { 264 | "name": "value to text", 265 | "value": 1 266 | }, 267 | { 268 | "name": "range to text", 269 | "value": 2 270 | } 271 | ], 272 | "maxDataPoints": 100, 273 | "nullPointMode": "connected", 274 | "nullText": null, 275 | "options": {}, 276 | "postfix": "", 277 | "postfixFontSize": "50%", 278 | "prefix": "", 279 | "prefixFontSize": "50%", 280 | "rangeMaps": [ 281 | { 282 | "from": "null", 283 | "text": "N/A", 284 | "to": "null" 285 | } 286 | ], 287 | "sparkline": { 288 | "fillColor": "rgba(31, 118, 189, 0.18)", 289 | "full": false, 290 | "lineColor": "rgb(31, 120, 193)", 291 | "show": false, 292 | "ymax": null, 293 | "ymin": null 294 | }, 295 | "tableColumn": "", 296 | "targets": [ 297 | { 298 | "expr": "(sum(up{job=\"kube-controllers\",cluster=~\"$Cluster\"} == 1) / count(up{job=\"kube-controllers\",cluster=~\"$Cluster\"})) * 100", 299 | "refId": "A" 300 | } 301 | ], 302 | "thresholds": "95,80", 303 | "timeFrom": null, 304 | "timeShift": null, 305 | "title": "Controllers Up", 306 | "type": "singlestat", 307 | "valueFontSize": "80%", 308 | "valueMaps": [ 309 | { 310 | "op": "=", 311 | "text": "N/A", 312 | "value": "null" 313 | } 314 | ], 315 | "valueName": "avg" 316 | }, 317 | { 318 | "cacheTimeout": null, 319 | "colorBackground": true, 320 | "colorValue": false, 321 | "colors": [ 322 | "#d44a3a", 323 | "rgba(237, 129, 40, 0.89)", 324 | "#56A64B" 325 | ], 326 | "datasource": "$datasource", 327 | "format": "percentunit", 328 | "gauge": { 329 | "maxValue": 100, 330 | "minValue": 0, 331 | "show": false, 332 | "thresholdLabels": false, 333 | "thresholdMarkers": true 334 | }, 335 | "gridPos": { 336 | "h": 2, 337 | "w": 3, 338 | "x": 5, 339 | "y": 2 340 | }, 341 | "id": 17, 342 | "interval": null, 343 | "links": [], 344 | "mappingType": 1, 345 | "mappingTypes": [ 346 | { 347 | "name": "value to text", 348 | "value": 1 349 | }, 350 | { 351 | "name": "range to text", 352 | "value": 2 353 | } 354 | ], 355 | "maxDataPoints": 100, 356 | "nullPointMode": "connected", 357 | "nullText": null, 358 | "options": {}, 359 | "postfix": "", 360 | "postfixFontSize": "50%", 361 | "prefix": "", 362 | "prefixFontSize": "50%", 363 | "rangeMaps": [ 364 | { 365 | "from": "null", 366 | "text": "N/A", 367 | "to": "null" 368 | } 369 | ], 370 | "sparkline": { 371 | "fillColor": "rgba(31, 118, 189, 0.18)", 372 | "full": true, 373 | "lineColor": "rgb(31, 120, 193)", 374 | "show": true, 375 | "ymax": null, 376 | "ymin": null 377 | }, 378 | "tableColumn": "", 379 | "targets": [ 380 | { 381 | "expr": "sum(kube_node_status_condition{status=\"true\",condition=\"Ready\",cluster=~\"$Cluster\"}) / sum(kube_node_labels{cluster=~\"$Cluster\"})", 382 | "refId": "A" 383 | } 384 | ], 385 | "thresholds": ".9,.8", 386 | "timeFrom": null, 387 | "timeShift": null, 388 | "title": "Node Health", 389 | "type": "singlestat", 390 | "valueFontSize": "80%", 391 | "valueMaps": [ 392 | { 393 | "op": "=", 394 | "text": "N/A", 395 | "value": "null" 396 | } 397 | ], 398 | "valueName": "avg" 399 | }, 400 | { 401 | "cacheTimeout": null, 402 | "colorBackground": true, 403 | "colorValue": false, 404 | "colors": [ 405 | "#d44a3a", 406 | "rgba(237, 129, 40, 0.89)", 407 | "#56A64B" 408 | ], 409 | "datasource": "$datasource", 410 | "format": "percent", 411 | "gauge": { 412 | "maxValue": 100, 413 | "minValue": 0, 414 | "show": false, 415 | "thresholdLabels": false, 416 | "thresholdMarkers": true 417 | }, 418 | "gridPos": { 419 | "h": 2, 420 | "w": 3, 421 | "x": 8, 422 | "y": 2 423 | }, 424 | "id": 14, 425 | "interval": null, 426 | "links": [], 427 | "mappingType": 1, 428 | "mappingTypes": [ 429 | { 430 | "name": "value to text", 431 | "value": 1 432 | }, 433 | { 434 | "name": "range to text", 435 | "value": 2 436 | } 437 | ], 438 | "maxDataPoints": 100, 439 | "nullPointMode": "connected", 440 | "nullText": null, 441 | "options": {}, 442 | "postfix": "", 443 | "postfixFontSize": "50%", 444 | "prefix": "", 445 | "prefixFontSize": "50%", 446 | "rangeMaps": [ 447 | { 448 | "from": "null", 449 | "text": "N/A", 450 | "to": "null" 451 | } 452 | ], 453 | "sparkline": { 454 | "fillColor": "rgba(31, 118, 189, 0.18)", 455 | "full": true, 456 | "lineColor": "rgb(31, 120, 193)", 457 | "show": true, 458 | "ymax": null, 459 | "ymin": null 460 | }, 461 | "tableColumn": "", 462 | "targets": [ 463 | { 464 | "expr": "sum(rate(apiserver_request_count{code=~\"2..\",cluster=~\"$Cluster\"}[5m])) / sum(rate(apiserver_request_count{cluster=~\"$Cluster\"}[5m])) * 100", 465 | "refId": "A" 466 | } 467 | ], 468 | "thresholds": "95,80", 469 | "timeFrom": null, 470 | "timeShift": null, 471 | "title": "API Success Rate", 472 | "type": "singlestat", 473 | "valueFontSize": "80%", 474 | "valueMaps": [ 475 | { 476 | "op": "=", 477 | "text": "N/A", 478 | "value": "null" 479 | } 480 | ], 481 | "valueName": "avg" 482 | }, 483 | { 484 | "cacheTimeout": null, 485 | "colorBackground": true, 486 | "colorValue": false, 487 | "colors": [ 488 | "#56A64B", 489 | "rgba(237, 129, 40, 0.89)", 490 | "#d44a3a" 491 | ], 492 | "datasource": "$datasource", 493 | "decimals": null, 494 | "format": "percentunit", 495 | "gauge": { 496 | "maxValue": 100, 497 | "minValue": 0, 498 | "show": false, 499 | "thresholdLabels": false, 500 | "thresholdMarkers": true 501 | }, 502 | "gridPos": { 503 | "h": 2, 504 | "w": 2, 505 | "x": 11, 506 | "y": 2 507 | }, 508 | "id": 4, 509 | "interval": null, 510 | "links": [], 511 | "mappingType": 1, 512 | "mappingTypes": [ 513 | { 514 | "name": "value to text", 515 | "value": 1 516 | }, 517 | { 518 | "name": "range to text", 519 | "value": 2 520 | } 521 | ], 522 | "maxDataPoints": 100, 523 | "nullPointMode": "connected", 524 | "nullText": null, 525 | "options": {}, 526 | "postfix": "", 527 | "postfixFontSize": "50%", 528 | "prefix": "", 529 | "prefixFontSize": "50%", 530 | "rangeMaps": [ 531 | { 532 | "from": "null", 533 | "text": "N/A", 534 | "to": "null" 535 | } 536 | ], 537 | "sparkline": { 538 | "fillColor": "rgba(31, 118, 189, 0.18)", 539 | "full": true, 540 | "lineColor": "rgb(31, 120, 193)", 541 | "show": true, 542 | "ymax": null, 543 | "ymin": null 544 | }, 545 | "tableColumn": "", 546 | "targets": [ 547 | { 548 | "expr": "sum( node:node_cpu_utilisation:avg1m{cluster=~\"$Cluster\"} * on (node) group_left kube_node_status_capacity_cpu_cores{cluster=~\"$Cluster\"} ) / sum( kube_node_status_capacity_cpu_cores{cluster=~\"$Cluster\"} )", 549 | "legendFormat": "", 550 | "refId": "A" 551 | } 552 | ], 553 | "thresholds": ".8,.9", 554 | "timeFrom": null, 555 | "timeShift": null, 556 | "title": "CPU %", 557 | "type": "singlestat", 558 | "valueFontSize": "80%", 559 | "valueMaps": [ 560 | { 561 | "op": "=", 562 | "text": "N/A", 563 | "value": "null" 564 | } 565 | ], 566 | "valueName": "avg" 567 | }, 568 | { 569 | "cacheTimeout": null, 570 | "colorBackground": true, 571 | "colorValue": false, 572 | "colors": [ 573 | "#56A64B", 574 | "rgba(237, 129, 40, 0.89)", 575 | "#d44a3a" 576 | ], 577 | "datasource": "$datasource", 578 | "format": "percentunit", 579 | "gauge": { 580 | "maxValue": 100, 581 | "minValue": 0, 582 | "show": false, 583 | "thresholdLabels": false, 584 | "thresholdMarkers": true 585 | }, 586 | "gridPos": { 587 | "h": 2, 588 | "w": 2, 589 | "x": 13, 590 | "y": 2 591 | }, 592 | "id": 6, 593 | "interval": null, 594 | "links": [], 595 | "mappingType": 1, 596 | "mappingTypes": [ 597 | { 598 | "name": "value to text", 599 | "value": 1 600 | }, 601 | { 602 | "name": "range to text", 603 | "value": 2 604 | } 605 | ], 606 | "maxDataPoints": 100, 607 | "nullPointMode": "connected", 608 | "nullText": null, 609 | "options": {}, 610 | "postfix": "", 611 | "postfixFontSize": "50%", 612 | "prefix": "", 613 | "prefixFontSize": "50%", 614 | "rangeMaps": [ 615 | { 616 | "from": "null", 617 | "text": "N/A", 618 | "to": "null" 619 | } 620 | ], 621 | "sparkline": { 622 | "fillColor": "rgba(31, 118, 189, 0.18)", 623 | "full": true, 624 | "lineColor": "rgb(31, 120, 193)", 625 | "show": true, 626 | "ymax": null, 627 | "ymin": null 628 | }, 629 | "tableColumn": "", 630 | "targets": [ 631 | { 632 | "expr": "sum( (node_memory_MemTotal_bytes{cluster=~\"$Cluster\"} - node_memory_MemAvailable_bytes{cluster=~\"$Cluster\"}) * on (namespace, pod) group_left(node) node_namespace_pod:kube_pod_info:{cluster=~\"$Cluster\"} ) / sum( kube_node_status_capacity_memory_bytes{cluster=~\"$Cluster\"} )", 633 | "refId": "A" 634 | } 635 | ], 636 | "thresholds": ".8,.9", 637 | "timeFrom": null, 638 | "timeShift": null, 639 | "title": "Mem Usage", 640 | "type": "singlestat", 641 | "valueFontSize": "80%", 642 | "valueMaps": [ 643 | { 644 | "op": "=", 645 | "text": "N/A", 646 | "value": "null" 647 | } 648 | ], 649 | "valueName": "avg" 650 | }, 651 | { 652 | "cacheTimeout": null, 653 | "colorBackground": true, 654 | "colorValue": false, 655 | "colors": [ 656 | "#56A64B", 657 | "rgba(237, 129, 40, 0.89)", 658 | "#d44a3a" 659 | ], 660 | "datasource": "$datasource", 661 | "decimals": null, 662 | "format": "percentunit", 663 | "gauge": { 664 | "maxValue": 100, 665 | "minValue": 0, 666 | "show": false, 667 | "thresholdLabels": false, 668 | "thresholdMarkers": true 669 | }, 670 | "gridPos": { 671 | "h": 2, 672 | "w": 2, 673 | "x": 15, 674 | "y": 2 675 | }, 676 | "id": 2, 677 | "interval": null, 678 | "links": [], 679 | "mappingType": 1, 680 | "mappingTypes": [ 681 | { 682 | "name": "value to text", 683 | "value": 1 684 | }, 685 | { 686 | "name": "range to text", 687 | "value": 2 688 | } 689 | ], 690 | "maxDataPoints": 100, 691 | "nullPointMode": "connected", 692 | "nullText": null, 693 | "options": {}, 694 | "pluginVersion": "6.3.3", 695 | "postfix": "", 696 | "postfixFontSize": "50%", 697 | "prefix": "", 698 | "prefixFontSize": "50%", 699 | "rangeMaps": [ 700 | { 701 | "from": "null", 702 | "text": "N/A", 703 | "to": "null" 704 | } 705 | ], 706 | "sparkline": { 707 | "fillColor": "rgba(31, 118, 189, 0.18)", 708 | "full": true, 709 | "lineColor": "rgb(31, 120, 193)", 710 | "show": true, 711 | "ymax": null, 712 | "ymin": null 713 | }, 714 | "tableColumn": "", 715 | "targets": [ 716 | { 717 | "expr": "(sum(node_filesystem_size{device!=\"rootfs\",cluster=~\"$Cluster\"}) - sum(node_filesystem_free{device!=\"rootfs\",cluster=~\"$Cluster\"})) / sum(node_filesystem_size{device!=\"rootfs\",cluster=~\"$Cluster\"}) ", 718 | "refId": "A" 719 | } 720 | ], 721 | "thresholds": ".8,.9", 722 | "timeFrom": null, 723 | "timeShift": null, 724 | "title": "Disk Usage", 725 | "type": "singlestat", 726 | "valueFontSize": "80%", 727 | "valueMaps": [ 728 | { 729 | "op": "=", 730 | "text": "N/A", 731 | "value": "null" 732 | } 733 | ], 734 | "valueName": "avg" 735 | }, 736 | { 737 | "cacheTimeout": null, 738 | "colorBackground": true, 739 | "colorValue": false, 740 | "colors": [ 741 | "#56A64B", 742 | "rgba(237, 129, 40, 0.89)", 743 | "#d44a3a" 744 | ], 745 | "datasource": "$datasource", 746 | "format": "percent", 747 | "gauge": { 748 | "maxValue": 100, 749 | "minValue": 0, 750 | "show": false, 751 | "thresholdLabels": false, 752 | "thresholdMarkers": true 753 | }, 754 | "gridPos": { 755 | "h": 2, 756 | "w": 2, 757 | "x": 17, 758 | "y": 2 759 | }, 760 | "id": 15, 761 | "interval": null, 762 | "links": [], 763 | "mappingType": 1, 764 | "mappingTypes": [ 765 | { 766 | "name": "value to text", 767 | "value": 1 768 | }, 769 | { 770 | "name": "range to text", 771 | "value": 2 772 | } 773 | ], 774 | "maxDataPoints": 100, 775 | "nullPointMode": "connected", 776 | "nullText": null, 777 | "options": {}, 778 | "postfix": "", 779 | "postfixFontSize": "50%", 780 | "prefix": "", 781 | "prefixFontSize": "50%", 782 | "rangeMaps": [ 783 | { 784 | "from": "null", 785 | "text": "N/A", 786 | "to": "null" 787 | } 788 | ], 789 | "sparkline": { 790 | "fillColor": "rgba(31, 118, 189, 0.18)", 791 | "full": true, 792 | "lineColor": "rgb(31, 120, 193)", 793 | "show": true, 794 | "ymax": null, 795 | "ymin": null 796 | }, 797 | "tableColumn": "", 798 | "targets": [ 799 | { 800 | "expr": "100 - (sum(kube_node_status_capacity_pods{cluster=~\"$Cluster\"}) - sum(kube_pod_info{cluster=~\"$Cluster\"})) / sum(kube_node_status_capacity_pods{cluster=~\"$Cluster\"}) * 100", 801 | "refId": "A" 802 | } 803 | ], 804 | "thresholds": "80,90", 805 | "timeFrom": null, 806 | "timeShift": null, 807 | "title": "Pod Usage", 808 | "type": "singlestat", 809 | "valueFontSize": "80%", 810 | "valueMaps": [ 811 | { 812 | "op": "=", 813 | "text": "N/A", 814 | "value": "null" 815 | } 816 | ], 817 | "valueName": "avg" 818 | }, 819 | { 820 | "cacheTimeout": null, 821 | "colorBackground": true, 822 | "colorValue": false, 823 | "colors": [ 824 | "#d44a3a", 825 | "rgba(237, 129, 40, 0.89)", 826 | "#56A64B" 827 | ], 828 | "datasource": "$datasource", 829 | "decimals": null, 830 | "description": "", 831 | "format": "percent", 832 | "gauge": { 833 | "maxValue": 100, 834 | "minValue": 0, 835 | "show": false, 836 | "thresholdLabels": false, 837 | "thresholdMarkers": true 838 | }, 839 | "gridPos": { 840 | "h": 2, 841 | "w": 2, 842 | "x": 19, 843 | "y": 2 844 | }, 845 | "id": 19, 846 | "interval": null, 847 | "links": [], 848 | "mappingType": 1, 849 | "mappingTypes": [ 850 | { 851 | "name": "value to text", 852 | "value": 1 853 | }, 854 | { 855 | "name": "range to text", 856 | "value": 2 857 | } 858 | ], 859 | "maxDataPoints": 100, 860 | "nullPointMode": "connected", 861 | "nullText": null, 862 | "options": {}, 863 | "postfix": "", 864 | "postfixFontSize": "50%", 865 | "prefix": "", 866 | "prefixFontSize": "50%", 867 | "rangeMaps": [ 868 | { 869 | "from": "null", 870 | "text": "N/A", 871 | "to": "null" 872 | } 873 | ], 874 | "sparkline": { 875 | "fillColor": "rgba(31, 118, 189, 0.18)", 876 | "full": true, 877 | "lineColor": "rgb(31, 120, 193)", 878 | "show": true, 879 | "ymax": null, 880 | "ymin": null 881 | }, 882 | "tableColumn": "", 883 | "targets": [ 884 | { 885 | "expr": "(1 - (sum (kube_pod_status_phase{phase=\"Failed\",phase!=\"Unknown\",cluster=~\"$Cluster\"}) / sum(kube_pod_status_phase{cluster=~\"$Cluster\"})) ) * 100", 886 | "instant": true, 887 | "refId": "A" 888 | } 889 | ], 890 | "thresholds": "80,90", 891 | "timeFrom": null, 892 | "timeShift": null, 893 | "title": "Pod Health", 894 | "type": "singlestat", 895 | "valueFontSize": "80%", 896 | "valueMaps": [ 897 | { 898 | "op": "=", 899 | "text": "N/A", 900 | "value": "null" 901 | } 902 | ], 903 | "valueName": "avg" 904 | }, 905 | { 906 | "cacheTimeout": null, 907 | "colorBackground": true, 908 | "colorValue": false, 909 | "colors": [ 910 | "#56A64B", 911 | "rgba(237, 129, 40, 0.89)", 912 | "#d44a3a" 913 | ], 914 | "datasource": "$datasource", 915 | "description": "", 916 | "format": "none", 917 | "gauge": { 918 | "maxValue": 100, 919 | "minValue": 0, 920 | "show": false, 921 | "thresholdLabels": false, 922 | "thresholdMarkers": true 923 | }, 924 | "gridPos": { 925 | "h": 2, 926 | "w": 3, 927 | "x": 21, 928 | "y": 2 929 | }, 930 | "id": 20, 931 | "interval": null, 932 | "links": [], 933 | "mappingType": 1, 934 | "mappingTypes": [ 935 | { 936 | "name": "value to text", 937 | "value": 1 938 | }, 939 | { 940 | "name": "range to text", 941 | "value": 2 942 | } 943 | ], 944 | "maxDataPoints": 100, 945 | "nullPointMode": "connected", 946 | "nullText": null, 947 | "options": {}, 948 | "postfix": "", 949 | "postfixFontSize": "50%", 950 | "prefix": "", 951 | "prefixFontSize": "50%", 952 | "rangeMaps": [ 953 | { 954 | "from": "null", 955 | "text": "N/A", 956 | "to": "null" 957 | } 958 | ], 959 | "sparkline": { 960 | "fillColor": "rgba(31, 118, 189, 0.18)", 961 | "full": false, 962 | "lineColor": "rgb(31, 120, 193)", 963 | "show": true, 964 | "ymax": null, 965 | "ymin": null 966 | }, 967 | "tableColumn": "", 968 | "targets": [ 969 | { 970 | "expr": "(sum(kube_pod_status_phase{phase=\"Running\",cluster=~\"$Cluster\"} ) \r - sum(kube_pod_status_ready{condition=\"true\",cluster=~\"$Cluster\"}))", 971 | "instant": true, 972 | "refId": "A" 973 | } 974 | ], 975 | "thresholds": "1,2", 976 | "timeFrom": null, 977 | "timeShift": null, 978 | "title": "Crashlooping", 979 | "type": "singlestat", 980 | "valueFontSize": "80%", 981 | "valueMaps": [ 982 | { 983 | "op": "=", 984 | "text": "N/A", 985 | "value": "null" 986 | } 987 | ], 988 | "valueName": "avg" 989 | } 990 | ], 991 | "refresh": "1m", 992 | "schemaVersion": 19, 993 | "style": "dark", 994 | "tags": [], 995 | "templating": { 996 | "list": [ 997 | { 998 | "current": { 999 | "text": "prometheus", 1000 | "value": "prometheus" 1001 | }, 1002 | "hide": 0, 1003 | "includeAll": true, 1004 | "label": null, 1005 | "multi": false, 1006 | "name": "datasource", 1007 | "options": [], 1008 | "query": "prometheus", 1009 | "refresh": 1, 1010 | "regex": "", 1011 | "skipUrlSync": false, 1012 | "type": "datasource" 1013 | }, 1014 | { 1015 | "allValue": ".*", 1016 | "current": {}, 1017 | "datasource": "$datasource", 1018 | "definition": "label_values(kube_pod_info,cluster)", 1019 | "hide": 2, 1020 | "includeAll": true, 1021 | "label": null, 1022 | "multi": false, 1023 | "name": "Cluster", 1024 | "options": [], 1025 | "query": "label_values(kube_pod_info,cluster)", 1026 | "refresh": 1, 1027 | "regex": "", 1028 | "skipUrlSync": false, 1029 | "sort": 1, 1030 | "tagValuesQuery": "", 1031 | "tags": [], 1032 | "tagsQuery": "", 1033 | "type": "query", 1034 | "useTags": false 1035 | } 1036 | ] 1037 | }, 1038 | "time": { 1039 | "from": "now-5m", 1040 | "to": "now" 1041 | }, 1042 | "timepicker": { 1043 | "refresh_intervals": [ 1044 | "5s", 1045 | "10s", 1046 | "30s", 1047 | "1m", 1048 | "5m", 1049 | "15m", 1050 | "30m", 1051 | "1h", 1052 | "2h", 1053 | "1d" 1054 | ] 1055 | }, 1056 | "timezone": "", 1057 | "title": "Ops - Cluster Overview", 1058 | "uid": "ops-cluster-overview", 1059 | "version": 3 1060 | } 1061 | -------------------------------------------------------------------------------- /dashboards-with-cluster-select/namespaces-in-cluster.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [], 3 | "__requires": [ 4 | { 5 | "type": "grafana", 6 | "id": "grafana", 7 | "name": "Grafana", 8 | "version": "5.4.3" 9 | }, 10 | { 11 | "type": "panel", 12 | "id": "graph", 13 | "name": "Graph", 14 | "version": "5.0.0" 15 | }, 16 | { 17 | "type": "datasource", 18 | "id": "prometheus", 19 | "name": "Prometheus", 20 | "version": "5.0.0" 21 | }, 22 | { 23 | "type": "panel", 24 | "id": "table", 25 | "name": "Table", 26 | "version": "5.0.0" 27 | } 28 | ], 29 | "annotations": { 30 | "list": [ 31 | { 32 | "builtIn": 1, 33 | "datasource": "-- Grafana --", 34 | "enable": true, 35 | "hide": true, 36 | "iconColor": "rgba(0, 211, 255, 1)", 37 | "name": "Annotations & Alerts", 38 | "type": "dashboard" 39 | } 40 | ] 41 | }, 42 | "editable": true, 43 | "gnetId": null, 44 | "graphTooltip": 0, 45 | "id": null, 46 | "iteration": 1570200640181, 47 | "links": [], 48 | "panels": [ 49 | { 50 | "aliasColors": {}, 51 | "bars": false, 52 | "dashLength": 10, 53 | "dashes": false, 54 | "datasource": "$datasource", 55 | "fill": 1, 56 | "gridPos": { 57 | "h": 5, 58 | "w": 12, 59 | "x": 0, 60 | "y": 0 61 | }, 62 | "id": 15, 63 | "legend": { 64 | "avg": false, 65 | "current": false, 66 | "max": false, 67 | "min": false, 68 | "show": true, 69 | "total": false, 70 | "values": false 71 | }, 72 | "lines": true, 73 | "linewidth": 1, 74 | "links": [], 75 | "nullPointMode": "null", 76 | "percentage": false, 77 | "pointradius": 5, 78 | "points": false, 79 | "renderer": "flot", 80 | "seriesOverrides": [], 81 | "spaceLength": 10, 82 | "stack": false, 83 | "steppedLine": false, 84 | "targets": [ 85 | { 86 | "expr": "sum by (phase) ( \n ( kube_pod_status_phase{namespace=~\"$Namespace\",cluster=\"$cluster\"}\n or\n label_replace ( kube_pod_status_ready{namespace=~\"$Namespace\",condition=\"true\",cluster=\"$cluster\"}, \"phase\",\"Ready\",\"\",\"\" )\n )\n) ", 87 | "format": "time_series", 88 | "intervalFactor": 1, 89 | "legendFormat": "{{phase}}", 90 | "refId": "A" 91 | } 92 | ], 93 | "thresholds": [], 94 | "timeFrom": null, 95 | "timeRegions": [], 96 | "timeShift": null, 97 | "title": "Pod Phase", 98 | "tooltip": { 99 | "shared": true, 100 | "sort": 0, 101 | "value_type": "individual" 102 | }, 103 | "type": "graph", 104 | "xaxis": { 105 | "buckets": null, 106 | "mode": "time", 107 | "name": null, 108 | "show": true, 109 | "values": [] 110 | }, 111 | "yaxes": [ 112 | { 113 | "decimals": null, 114 | "format": "locale", 115 | "label": null, 116 | "logBase": 1, 117 | "max": null, 118 | "min": null, 119 | "show": true 120 | }, 121 | { 122 | "format": "short", 123 | "label": null, 124 | "logBase": 1, 125 | "max": null, 126 | "min": null, 127 | "show": true 128 | } 129 | ], 130 | "yaxis": { 131 | "align": false, 132 | "alignLevel": null 133 | } 134 | }, 135 | { 136 | "aliasColors": {}, 137 | "bars": false, 138 | "dashLength": 10, 139 | "dashes": false, 140 | "datasource": "$datasource", 141 | "fill": 1, 142 | "gridPos": { 143 | "h": 5, 144 | "w": 12, 145 | "x": 12, 146 | "y": 0 147 | }, 148 | "id": 17, 149 | "legend": { 150 | "avg": false, 151 | "current": false, 152 | "max": false, 153 | "min": false, 154 | "show": true, 155 | "total": false, 156 | "values": false 157 | }, 158 | "lines": true, 159 | "linewidth": 1, 160 | "links": [], 161 | "nullPointMode": "null", 162 | "percentage": false, 163 | "pointradius": 5, 164 | "points": false, 165 | "renderer": "flot", 166 | "seriesOverrides": [], 167 | "spaceLength": 10, 168 | "stack": false, 169 | "steppedLine": false, 170 | "targets": [ 171 | { 172 | "expr": "sum (increase(kube_pod_container_status_restarts_total{cluster=\"$cluster\",namespace=~\"$Namespace\"}[1h])) by (namespace) ", 173 | "format": "time_series", 174 | "intervalFactor": 1, 175 | "legendFormat": "{{namespace}}", 176 | "refId": "A" 177 | } 178 | ], 179 | "thresholds": [], 180 | "timeFrom": null, 181 | "timeRegions": [], 182 | "timeShift": null, 183 | "title": "Pod Restarts", 184 | "tooltip": { 185 | "shared": true, 186 | "sort": 0, 187 | "value_type": "individual" 188 | }, 189 | "type": "graph", 190 | "xaxis": { 191 | "buckets": null, 192 | "mode": "time", 193 | "name": null, 194 | "show": true, 195 | "values": [] 196 | }, 197 | "yaxes": [ 198 | { 199 | "decimals": null, 200 | "format": "locale", 201 | "label": null, 202 | "logBase": 1, 203 | "max": null, 204 | "min": null, 205 | "show": true 206 | }, 207 | { 208 | "format": "short", 209 | "label": null, 210 | "logBase": 1, 211 | "max": null, 212 | "min": null, 213 | "show": true 214 | } 215 | ], 216 | "yaxis": { 217 | "align": false, 218 | "alignLevel": null 219 | } 220 | }, 221 | { 222 | "collapsed": false, 223 | "gridPos": { 224 | "h": 1, 225 | "w": 24, 226 | "x": 0, 227 | "y": 5 228 | }, 229 | "id": 11, 230 | "panels": [], 231 | "repeat": null, 232 | "title": "CPU", 233 | "type": "row" 234 | }, 235 | { 236 | "aliasColors": {}, 237 | "bars": false, 238 | "dashLength": 10, 239 | "dashes": false, 240 | "datasource": "$datasource", 241 | "fill": 1, 242 | "gridPos": { 243 | "h": 6, 244 | "w": 12, 245 | "x": 0, 246 | "y": 6 247 | }, 248 | "id": 6, 249 | "legend": { 250 | "avg": false, 251 | "current": false, 252 | "max": false, 253 | "min": false, 254 | "show": true, 255 | "total": false, 256 | "values": false 257 | }, 258 | "lines": true, 259 | "linewidth": 1, 260 | "links": [], 261 | "nullPointMode": "null as zero", 262 | "percentage": false, 263 | "pointradius": 5, 264 | "points": false, 265 | "renderer": "flot", 266 | "seriesOverrides": [], 267 | "spaceLength": 10, 268 | "stack": false, 269 | "steppedLine": false, 270 | "targets": [ 271 | { 272 | "expr": "sum by (namespace) (\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=~\"$Namespace\", cluster=\"$cluster\"}\n ) ", 273 | "format": "time_series", 274 | "intervalFactor": 2, 275 | "legendFormat": "{{namespace}}", 276 | "legendLink": null, 277 | "refId": "A", 278 | "step": 10 279 | } 280 | ], 281 | "thresholds": [], 282 | "timeFrom": null, 283 | "timeRegions": [], 284 | "timeShift": null, 285 | "title": "CPU Usage", 286 | "tooltip": { 287 | "shared": true, 288 | "sort": 0, 289 | "value_type": "individual" 290 | }, 291 | "type": "graph", 292 | "xaxis": { 293 | "buckets": null, 294 | "mode": "time", 295 | "name": null, 296 | "show": true, 297 | "values": [] 298 | }, 299 | "yaxes": [ 300 | { 301 | "format": "short", 302 | "label": null, 303 | "logBase": 1, 304 | "max": null, 305 | "min": 0, 306 | "show": true 307 | }, 308 | { 309 | "format": "short", 310 | "label": null, 311 | "logBase": 1, 312 | "max": null, 313 | "min": null, 314 | "show": false 315 | } 316 | ], 317 | "yaxis": { 318 | "align": false, 319 | "alignLevel": null 320 | } 321 | }, 322 | { 323 | "aliasColors": {}, 324 | "bars": false, 325 | "columns": [], 326 | "dashLength": 10, 327 | "dashes": false, 328 | "datasource": "$datasource", 329 | "fill": 1, 330 | "fontSize": "100%", 331 | "gridPos": { 332 | "h": 6, 333 | "w": 12, 334 | "x": 12, 335 | "y": 6 336 | }, 337 | "id": 7, 338 | "legend": { 339 | "avg": false, 340 | "current": false, 341 | "max": false, 342 | "min": false, 343 | "show": true, 344 | "total": false, 345 | "values": false 346 | }, 347 | "lines": true, 348 | "linewidth": 1, 349 | "links": [ 350 | { 351 | "type": "dashboard" 352 | } 353 | ], 354 | "nullPointMode": "null as zero", 355 | "pageSize": null, 356 | "percentage": false, 357 | "pointradius": 5, 358 | "points": false, 359 | "renderer": "flot", 360 | "scroll": true, 361 | "seriesOverrides": [], 362 | "showHeader": true, 363 | "sort": { 364 | "col": 3, 365 | "desc": false 366 | }, 367 | "spaceLength": 10, 368 | "stack": false, 369 | "steppedLine": false, 370 | "styles": [ 371 | { 372 | "alias": "Time", 373 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 374 | "pattern": "Time", 375 | "type": "hidden" 376 | }, 377 | { 378 | "alias": "CPU Usage", 379 | "colorMode": null, 380 | "colors": [], 381 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 382 | "decimals": 2, 383 | "link": false, 384 | "linkTooltip": "Drill down", 385 | "linkUrl": "", 386 | "pattern": "Value #A", 387 | "thresholds": [], 388 | "type": "number", 389 | "unit": "short" 390 | }, 391 | { 392 | "alias": "CPU Requests", 393 | "colorMode": null, 394 | "colors": [], 395 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 396 | "decimals": 2, 397 | "link": false, 398 | "linkTooltip": "Drill down", 399 | "linkUrl": "", 400 | "pattern": "Value #B", 401 | "thresholds": [], 402 | "type": "number", 403 | "unit": "short" 404 | }, 405 | { 406 | "alias": "CPU Requests %", 407 | "colorMode": null, 408 | "colors": [], 409 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 410 | "decimals": 2, 411 | "link": false, 412 | "linkTooltip": "Drill down", 413 | "linkUrl": "", 414 | "pattern": "Value #C", 415 | "thresholds": [], 416 | "type": "number", 417 | "unit": "percentunit" 418 | }, 419 | { 420 | "alias": "CPU Limits", 421 | "colorMode": null, 422 | "colors": [], 423 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 424 | "decimals": 2, 425 | "link": false, 426 | "linkTooltip": "Drill down", 427 | "linkUrl": "", 428 | "pattern": "Value #D", 429 | "thresholds": [], 430 | "type": "number", 431 | "unit": "short" 432 | }, 433 | { 434 | "alias": "CPU Limits %", 435 | "colorMode": null, 436 | "colors": [], 437 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 438 | "decimals": 2, 439 | "link": false, 440 | "linkTooltip": "Drill down", 441 | "linkUrl": "", 442 | "pattern": "Value #E", 443 | "thresholds": [], 444 | "type": "number", 445 | "unit": "percentunit" 446 | }, 447 | { 448 | "alias": "Namespace", 449 | "colorMode": null, 450 | "colors": [], 451 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 452 | "decimals": 2, 453 | "link": true, 454 | "linkTooltip": "Drill down", 455 | "linkUrl": "/d/pods-in-namespaces/pods-in-namespace?var-datasource=$datasource&var-Namespace=$__cell", 456 | "pattern": "namespace", 457 | "thresholds": [], 458 | "type": "number", 459 | "unit": "short" 460 | }, 461 | { 462 | "alias": "", 463 | "colorMode": null, 464 | "colors": [], 465 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 466 | "decimals": 2, 467 | "pattern": "/.*/", 468 | "thresholds": [], 469 | "type": "string", 470 | "unit": "short" 471 | } 472 | ], 473 | "targets": [ 474 | { 475 | "expr": "sum by (namespace) (\n namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=~\"$Namespace\", cluster=\"$cluster\"}\n ) ", 476 | "format": "table", 477 | "instant": true, 478 | "intervalFactor": 2, 479 | "legendFormat": "", 480 | "refId": "A", 481 | "step": 10 482 | }, 483 | { 484 | "expr": "sum by (namespace) (kube_pod_container_resource_requests_cpu_cores{namespace=~\"$Namespace\", cluster=\"$cluster\"}) ", 485 | "format": "table", 486 | "instant": true, 487 | "intervalFactor": 2, 488 | "legendFormat": "", 489 | "refId": "B", 490 | "step": 10 491 | }, 492 | { 493 | "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests_cpu_cores{namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace)\n", 494 | "format": "table", 495 | "instant": true, 496 | "intervalFactor": 2, 497 | "legendFormat": "", 498 | "refId": "C", 499 | "step": 10 500 | }, 501 | { 502 | "expr": "sum(kube_pod_container_resource_limits_cpu_cores{namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace)", 503 | "format": "table", 504 | "instant": true, 505 | "intervalFactor": 2, 506 | "legendFormat": "", 507 | "refId": "D", 508 | "step": 10 509 | }, 510 | { 511 | "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_limits_cpu_cores{namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace)", 512 | "format": "table", 513 | "instant": true, 514 | "intervalFactor": 2, 515 | "legendFormat": "", 516 | "refId": "E", 517 | "step": 10 518 | } 519 | ], 520 | "thresholds": [], 521 | "timeFrom": null, 522 | "timeShift": null, 523 | "title": "CPU Quota", 524 | "tooltip": { 525 | "shared": true, 526 | "sort": 0, 527 | "value_type": "individual" 528 | }, 529 | "transform": "table", 530 | "type": "table", 531 | "xaxis": { 532 | "buckets": null, 533 | "mode": "time", 534 | "name": null, 535 | "show": true, 536 | "values": [] 537 | }, 538 | "yaxes": [ 539 | { 540 | "format": "short", 541 | "label": null, 542 | "logBase": 1, 543 | "max": null, 544 | "min": 0, 545 | "show": true 546 | }, 547 | { 548 | "format": "short", 549 | "label": null, 550 | "logBase": 1, 551 | "max": null, 552 | "min": null, 553 | "show": false 554 | } 555 | ] 556 | }, 557 | { 558 | "collapsed": false, 559 | "gridPos": { 560 | "h": 1, 561 | "w": 24, 562 | "x": 0, 563 | "y": 12 564 | }, 565 | "id": 13, 566 | "panels": [], 567 | "repeat": null, 568 | "title": "Memory", 569 | "type": "row" 570 | }, 571 | { 572 | "aliasColors": {}, 573 | "bars": false, 574 | "dashLength": 10, 575 | "dashes": false, 576 | "datasource": "$datasource", 577 | "fill": 1, 578 | "gridPos": { 579 | "h": 6, 580 | "w": 12, 581 | "x": 0, 582 | "y": 13 583 | }, 584 | "id": 8, 585 | "legend": { 586 | "avg": false, 587 | "current": false, 588 | "max": false, 589 | "min": false, 590 | "show": true, 591 | "total": false, 592 | "values": false 593 | }, 594 | "lines": true, 595 | "linewidth": 1, 596 | "links": [], 597 | "nullPointMode": "null as zero", 598 | "percentage": false, 599 | "pointradius": 5, 600 | "points": false, 601 | "renderer": "flot", 602 | "seriesOverrides": [], 603 | "spaceLength": 10, 604 | "stack": false, 605 | "steppedLine": false, 606 | "targets": [ 607 | { 608 | "expr": "sum(container_memory_rss{container_name!=\"\",namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace)", 609 | "format": "time_series", 610 | "intervalFactor": 2, 611 | "legendFormat": "{{namespace}}", 612 | "legendLink": null, 613 | "refId": "A", 614 | "step": 10 615 | } 616 | ], 617 | "thresholds": [], 618 | "timeFrom": null, 619 | "timeRegions": [], 620 | "timeShift": null, 621 | "title": "Memory Usage (w/o cache)", 622 | "tooltip": { 623 | "shared": true, 624 | "sort": 0, 625 | "value_type": "individual" 626 | }, 627 | "type": "graph", 628 | "xaxis": { 629 | "buckets": null, 630 | "mode": "time", 631 | "name": null, 632 | "show": true, 633 | "values": [] 634 | }, 635 | "yaxes": [ 636 | { 637 | "format": "bytes", 638 | "label": null, 639 | "logBase": 1, 640 | "max": null, 641 | "min": 0, 642 | "show": true 643 | }, 644 | { 645 | "format": "short", 646 | "label": null, 647 | "logBase": 1, 648 | "max": null, 649 | "min": null, 650 | "show": false 651 | } 652 | ], 653 | "yaxis": { 654 | "align": false, 655 | "alignLevel": null 656 | } 657 | }, 658 | { 659 | "aliasColors": {}, 660 | "bars": false, 661 | "columns": [], 662 | "dashLength": 10, 663 | "dashes": false, 664 | "datasource": "$datasource", 665 | "fill": 1, 666 | "fontSize": "100%", 667 | "gridPos": { 668 | "h": 6, 669 | "w": 12, 670 | "x": 12, 671 | "y": 13 672 | }, 673 | "id": 9, 674 | "legend": { 675 | "avg": false, 676 | "current": false, 677 | "max": false, 678 | "min": false, 679 | "show": true, 680 | "total": false, 681 | "values": false 682 | }, 683 | "lines": true, 684 | "linewidth": 1, 685 | "links": [], 686 | "nullPointMode": "null as zero", 687 | "pageSize": null, 688 | "percentage": false, 689 | "pointradius": 5, 690 | "points": false, 691 | "renderer": "flot", 692 | "scroll": true, 693 | "seriesOverrides": [], 694 | "showHeader": true, 695 | "sort": { 696 | "col": 0, 697 | "desc": true 698 | }, 699 | "spaceLength": 10, 700 | "stack": false, 701 | "steppedLine": false, 702 | "styles": [ 703 | { 704 | "alias": "Time", 705 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 706 | "pattern": "Time", 707 | "type": "hidden" 708 | }, 709 | { 710 | "alias": "Memory Usage", 711 | "colorMode": null, 712 | "colors": [], 713 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 714 | "decimals": null, 715 | "link": false, 716 | "linkTooltip": "Drill down", 717 | "linkUrl": "", 718 | "pattern": "Value #A", 719 | "thresholds": [], 720 | "type": "number", 721 | "unit": "bytes" 722 | }, 723 | { 724 | "alias": "Memory Requests", 725 | "colorMode": null, 726 | "colors": [], 727 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 728 | "decimals": null, 729 | "link": false, 730 | "linkTooltip": "Drill down", 731 | "linkUrl": "", 732 | "pattern": "Value #B", 733 | "thresholds": [], 734 | "type": "number", 735 | "unit": "bytes" 736 | }, 737 | { 738 | "alias": "Memory Requests %", 739 | "colorMode": null, 740 | "colors": [], 741 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 742 | "decimals": 2, 743 | "link": false, 744 | "linkTooltip": "Drill down", 745 | "linkUrl": "", 746 | "pattern": "Value #C", 747 | "thresholds": [], 748 | "type": "number", 749 | "unit": "percentunit" 750 | }, 751 | { 752 | "alias": "Memory Limits", 753 | "colorMode": null, 754 | "colors": [], 755 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 756 | "decimals": 2, 757 | "link": false, 758 | "linkTooltip": "Drill down", 759 | "linkUrl": "", 760 | "pattern": "Value #D", 761 | "thresholds": [], 762 | "type": "number", 763 | "unit": "bytes" 764 | }, 765 | { 766 | "alias": "Memory Limits %", 767 | "colorMode": null, 768 | "colors": [], 769 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 770 | "decimals": 2, 771 | "link": false, 772 | "linkTooltip": "Drill down", 773 | "linkUrl": "", 774 | "pattern": "Value #E", 775 | "thresholds": [], 776 | "type": "number", 777 | "unit": "percentunit" 778 | }, 779 | { 780 | "alias": "Namespace", 781 | "colorMode": null, 782 | "colors": [], 783 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 784 | "decimals": 2, 785 | "link": true, 786 | "linkTooltip": "Drill down", 787 | "linkUrl": "/d/pods-in-namespaces/pods-in-namespace?var-datasource=$datasource&var-Namespace=$__cell", 788 | "pattern": "namespace", 789 | "thresholds": [], 790 | "type": "string", 791 | "unit": "short" 792 | }, 793 | { 794 | "alias": "", 795 | "colorMode": null, 796 | "colors": [], 797 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 798 | "decimals": 2, 799 | "pattern": "/.*/", 800 | "thresholds": [], 801 | "type": "string", 802 | "unit": "short" 803 | } 804 | ], 805 | "targets": [ 806 | { 807 | "expr": "sum(container_memory_rss{container_name!=\"\",namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace)", 808 | "format": "table", 809 | "instant": true, 810 | "intervalFactor": 2, 811 | "legendFormat": "", 812 | "refId": "A", 813 | "step": 10 814 | }, 815 | { 816 | "expr": "sum(kube_pod_container_resource_requests_memory_bytes{namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace)", 817 | "format": "table", 818 | "instant": true, 819 | "intervalFactor": 2, 820 | "legendFormat": "", 821 | "refId": "B", 822 | "step": 10 823 | }, 824 | { 825 | "expr": "sum(container_memory_rss{container_name!=\"\",namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_requests_memory_bytes{namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace)", 826 | "format": "table", 827 | "instant": true, 828 | "intervalFactor": 2, 829 | "legendFormat": "", 830 | "refId": "C", 831 | "step": 10 832 | }, 833 | { 834 | "expr": "sum(kube_pod_container_resource_limits_memory_bytes{namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace)", 835 | "format": "table", 836 | "instant": true, 837 | "intervalFactor": 2, 838 | "legendFormat": "", 839 | "refId": "D", 840 | "step": 10 841 | }, 842 | { 843 | "expr": "sum(container_memory_rss{container_name!=\"\",namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace) / sum(kube_pod_container_resource_limits_memory_bytes{namespace=~\"$Namespace\", cluster=\"$cluster\"}) by (namespace)", 844 | "format": "table", 845 | "instant": true, 846 | "intervalFactor": 2, 847 | "legendFormat": "", 848 | "refId": "E", 849 | "step": 10 850 | } 851 | ], 852 | "thresholds": [], 853 | "timeFrom": null, 854 | "timeShift": null, 855 | "title": "Requests by Namespace", 856 | "tooltip": { 857 | "shared": true, 858 | "sort": 0, 859 | "value_type": "individual" 860 | }, 861 | "transform": "table", 862 | "type": "table", 863 | "xaxis": { 864 | "buckets": null, 865 | "mode": "time", 866 | "name": null, 867 | "show": true, 868 | "values": [] 869 | }, 870 | "yaxes": [ 871 | { 872 | "format": "short", 873 | "label": null, 874 | "logBase": 1, 875 | "max": null, 876 | "min": 0, 877 | "show": true 878 | }, 879 | { 880 | "format": "short", 881 | "label": null, 882 | "logBase": 1, 883 | "max": null, 884 | "min": null, 885 | "show": false 886 | } 887 | ] 888 | } 889 | ], 890 | "refresh": "10s", 891 | "schemaVersion": 16, 892 | "style": "dark", 893 | "tags": [], 894 | "templating": { 895 | "list": [ 896 | { 897 | "allValue": null, 898 | "current": {}, 899 | "datasource": "$datasource", 900 | "definition": "label_values(kube_pod_info,cluster)", 901 | "hide": 0, 902 | "includeAll": false, 903 | "label": null, 904 | "multi": false, 905 | "name": "cluster", 906 | "options": [], 907 | "query": "label_values(kube_pod_info,cluster)", 908 | "refresh": 1, 909 | "regex": "", 910 | "skipUrlSync": false, 911 | "sort": 0, 912 | "tagValuesQuery": "", 913 | "tags": [], 914 | "tagsQuery": "", 915 | "type": "query", 916 | "useTags": false 917 | }, 918 | { 919 | "allValue": "", 920 | "current": {}, 921 | "datasource": "$datasource", 922 | "definition": "label_values(kube_namespace_labels{cluster=\"$cluster\"},namespace)", 923 | "hide": 0, 924 | "includeAll": true, 925 | "label": "Project", 926 | "multi": true, 927 | "name": "Namespace", 928 | "options": [], 929 | "query": "label_values(kube_namespace_labels{cluster=\"$cluster\"},namespace)", 930 | "refresh": 1, 931 | "regex": "", 932 | "skipUrlSync": false, 933 | "sort": 1, 934 | "tagValuesQuery": "", 935 | "tags": [], 936 | "tagsQuery": "", 937 | "type": "query", 938 | "useTags": false 939 | }, 940 | { 941 | "current": { 942 | "text": "prometheus", 943 | "value": "prometheus" 944 | }, 945 | "hide": 0, 946 | "label": null, 947 | "name": "datasource", 948 | "options": [], 949 | "query": "prometheus", 950 | "refresh": 1, 951 | "regex": "", 952 | "skipUrlSync": false, 953 | "type": "datasource" 954 | } 955 | ] 956 | }, 957 | "time": { 958 | "from": "now-1h", 959 | "to": "now" 960 | }, 961 | "timepicker": { 962 | "refresh_intervals": [ 963 | "5s", 964 | "10s", 965 | "30s", 966 | "1m", 967 | "5m", 968 | "15m", 969 | "30m", 970 | "1h", 971 | "2h", 972 | "1d" 973 | ], 974 | "time_options": [ 975 | "5m", 976 | "15m", 977 | "1h", 978 | "6h", 979 | "12h", 980 | "24h", 981 | "2d", 982 | "7d", 983 | "30d" 984 | ] 985 | }, 986 | "timezone": "", 987 | "title": "Namespaces in cluster", 988 | "uid": "namespaces-in-cluster", 989 | "version": 17 990 | } -------------------------------------------------------------------------------- /dashboards/pods-in-namespace.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [], 3 | "__requires": [ 4 | { 5 | "type": "grafana", 6 | "id": "grafana", 7 | "name": "Grafana", 8 | "version": "5.4.3" 9 | }, 10 | { 11 | "type": "panel", 12 | "id": "graph", 13 | "name": "Graph", 14 | "version": "5.0.0" 15 | }, 16 | { 17 | "type": "datasource", 18 | "id": "prometheus", 19 | "name": "Prometheus", 20 | "version": "5.0.0" 21 | }, 22 | { 23 | "type": "panel", 24 | "id": "table", 25 | "name": "Table", 26 | "version": "5.0.0" 27 | } 28 | ], 29 | "annotations": { 30 | "list": [ 31 | { 32 | "builtIn": 1, 33 | "datasource": "-- Grafana --", 34 | "enable": true, 35 | "hide": true, 36 | "iconColor": "rgba(0, 211, 255, 1)", 37 | "name": "Annotations & Alerts", 38 | "type": "dashboard" 39 | } 40 | ] 41 | }, 42 | "editable": true, 43 | "gnetId": null, 44 | "graphTooltip": 0, 45 | "id": null, 46 | "iteration": 1570200495937, 47 | "links": [], 48 | "panels": [ 49 | { 50 | "aliasColors": {}, 51 | "bars": false, 52 | "dashLength": 10, 53 | "dashes": false, 54 | "datasource": "$datasource", 55 | "fill": 1, 56 | "gridPos": { 57 | "h": 5, 58 | "w": 12, 59 | "x": 0, 60 | "y": 0 61 | }, 62 | "id": 9, 63 | "legend": { 64 | "avg": false, 65 | "current": false, 66 | "max": false, 67 | "min": false, 68 | "show": true, 69 | "total": false, 70 | "values": false 71 | }, 72 | "lines": true, 73 | "linewidth": 1, 74 | "links": [], 75 | "nullPointMode": "null", 76 | "percentage": false, 77 | "pointradius": 5, 78 | "points": false, 79 | "renderer": "flot", 80 | "seriesOverrides": [], 81 | "spaceLength": 10, 82 | "stack": false, 83 | "steppedLine": false, 84 | "targets": [ 85 | { 86 | "expr": "sum by (phase) ( \n ( kube_pod_status_phase{namespace=\"$Namespace\",pod=~\"$Pod\"}\n or\n label_replace ( kube_pod_status_ready{namespace=\"$Namespace\",pod=~\"$Pod\",condition=\"true\"}, \"phase\",\"Ready\",\"\",\"\" )\n )\n) ", 87 | "format": "time_series", 88 | "intervalFactor": 1, 89 | "legendFormat": "{{phase}}", 90 | "refId": "A" 91 | } 92 | ], 93 | "thresholds": [], 94 | "timeFrom": null, 95 | "timeRegions": [], 96 | "timeShift": null, 97 | "title": "Pod Phase", 98 | "tooltip": { 99 | "shared": true, 100 | "sort": 0, 101 | "value_type": "individual" 102 | }, 103 | "type": "graph", 104 | "xaxis": { 105 | "buckets": null, 106 | "mode": "time", 107 | "name": null, 108 | "show": true, 109 | "values": [] 110 | }, 111 | "yaxes": [ 112 | { 113 | "decimals": null, 114 | "format": "locale", 115 | "label": null, 116 | "logBase": 1, 117 | "max": null, 118 | "min": null, 119 | "show": true 120 | }, 121 | { 122 | "format": "short", 123 | "label": null, 124 | "logBase": 1, 125 | "max": null, 126 | "min": null, 127 | "show": true 128 | } 129 | ], 130 | "yaxis": { 131 | "align": false, 132 | "alignLevel": null 133 | } 134 | }, 135 | { 136 | "aliasColors": {}, 137 | "bars": false, 138 | "dashLength": 10, 139 | "dashes": false, 140 | "datasource": "$datasource", 141 | "fill": 1, 142 | "gridPos": { 143 | "h": 5, 144 | "w": 12, 145 | "x": 12, 146 | "y": 0 147 | }, 148 | "id": 10, 149 | "legend": { 150 | "avg": false, 151 | "current": false, 152 | "max": false, 153 | "min": false, 154 | "show": true, 155 | "total": false, 156 | "values": false 157 | }, 158 | "lines": true, 159 | "linewidth": 1, 160 | "links": [], 161 | "nullPointMode": "null", 162 | "percentage": false, 163 | "pointradius": 5, 164 | "points": false, 165 | "renderer": "flot", 166 | "seriesOverrides": [], 167 | "spaceLength": 10, 168 | "stack": false, 169 | "steppedLine": false, 170 | "targets": [ 171 | { 172 | "expr": "sum (increase(kube_pod_container_status_restarts_total{namespace=~\"$Namespace\",pod=~\"$Pod\"} [1h] )) by (pod) ", 173 | "format": "time_series", 174 | "intervalFactor": 1, 175 | "legendFormat": "{{pod}}", 176 | "refId": "A" 177 | } 178 | ], 179 | "thresholds": [], 180 | "timeFrom": null, 181 | "timeRegions": [], 182 | "timeShift": null, 183 | "title": "Pod Restarts", 184 | "tooltip": { 185 | "shared": true, 186 | "sort": 0, 187 | "value_type": "individual" 188 | }, 189 | "type": "graph", 190 | "xaxis": { 191 | "buckets": null, 192 | "mode": "time", 193 | "name": null, 194 | "show": true, 195 | "values": [] 196 | }, 197 | "yaxes": [ 198 | { 199 | "decimals": null, 200 | "format": "locale", 201 | "label": null, 202 | "logBase": 1, 203 | "max": null, 204 | "min": null, 205 | "show": true 206 | }, 207 | { 208 | "format": "short", 209 | "label": null, 210 | "logBase": 1, 211 | "max": null, 212 | "min": null, 213 | "show": true 214 | } 215 | ], 216 | "yaxis": { 217 | "align": false, 218 | "alignLevel": null 219 | } 220 | }, 221 | { 222 | "collapsed": false, 223 | "gridPos": { 224 | "h": 1, 225 | "w": 24, 226 | "x": 0, 227 | "y": 5 228 | }, 229 | "id": 4, 230 | "panels": [], 231 | "repeat": null, 232 | "title": "CPU Usage", 233 | "type": "row" 234 | }, 235 | { 236 | "aliasColors": {}, 237 | "bars": false, 238 | "dashLength": 10, 239 | "dashes": false, 240 | "datasource": "$datasource", 241 | "fill": 1, 242 | "gridPos": { 243 | "h": 6, 244 | "w": 12, 245 | "x": 0, 246 | "y": 6 247 | }, 248 | "id": 0, 249 | "legend": { 250 | "avg": false, 251 | "current": false, 252 | "max": false, 253 | "min": false, 254 | "show": true, 255 | "total": false, 256 | "values": false 257 | }, 258 | "lines": true, 259 | "linewidth": 1, 260 | "links": [], 261 | "nullPointMode": "null as zero", 262 | "percentage": false, 263 | "pointradius": 5, 264 | "points": false, 265 | "renderer": "flot", 266 | "seriesOverrides": [], 267 | "spaceLength": 10, 268 | "stack": false, 269 | "steppedLine": false, 270 | "targets": [ 271 | { 272 | "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\"}) by (pod_name)", 273 | "format": "time_series", 274 | "intervalFactor": 2, 275 | "legendFormat": "{{pod_name}}", 276 | "legendLink": null, 277 | "refId": "A", 278 | "step": 10 279 | } 280 | ], 281 | "thresholds": [], 282 | "timeFrom": null, 283 | "timeRegions": [], 284 | "timeShift": null, 285 | "title": "CPU Usage", 286 | "tooltip": { 287 | "shared": true, 288 | "sort": 0, 289 | "value_type": "individual" 290 | }, 291 | "type": "graph", 292 | "xaxis": { 293 | "buckets": null, 294 | "mode": "time", 295 | "name": null, 296 | "show": true, 297 | "values": [] 298 | }, 299 | "yaxes": [ 300 | { 301 | "format": "short", 302 | "label": null, 303 | "logBase": 1, 304 | "max": null, 305 | "min": 0, 306 | "show": true 307 | }, 308 | { 309 | "format": "short", 310 | "label": null, 311 | "logBase": 1, 312 | "max": null, 313 | "min": null, 314 | "show": false 315 | } 316 | ], 317 | "yaxis": { 318 | "align": false, 319 | "alignLevel": null 320 | } 321 | }, 322 | { 323 | "aliasColors": {}, 324 | "bars": false, 325 | "columns": [], 326 | "dashLength": 10, 327 | "dashes": false, 328 | "datasource": "$datasource", 329 | "fill": 1, 330 | "fontSize": "100%", 331 | "gridPos": { 332 | "h": 6, 333 | "w": 12, 334 | "x": 12, 335 | "y": 6 336 | }, 337 | "id": 1, 338 | "legend": { 339 | "avg": false, 340 | "current": false, 341 | "max": false, 342 | "min": false, 343 | "show": true, 344 | "total": false, 345 | "values": false 346 | }, 347 | "lines": true, 348 | "linewidth": 1, 349 | "links": [], 350 | "nullPointMode": "null as zero", 351 | "pageSize": null, 352 | "percentage": false, 353 | "pointradius": 5, 354 | "points": false, 355 | "renderer": "flot", 356 | "scroll": true, 357 | "seriesOverrides": [], 358 | "showHeader": true, 359 | "sort": { 360 | "col": 0, 361 | "desc": true 362 | }, 363 | "spaceLength": 10, 364 | "stack": false, 365 | "steppedLine": false, 366 | "styles": [ 367 | { 368 | "alias": "Time", 369 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 370 | "pattern": "Time", 371 | "type": "hidden" 372 | }, 373 | { 374 | "alias": "CPU Usage", 375 | "colorMode": null, 376 | "colors": [], 377 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 378 | "decimals": 2, 379 | "link": false, 380 | "linkTooltip": "Drill down", 381 | "linkUrl": "", 382 | "pattern": "Value #A", 383 | "thresholds": [], 384 | "type": "number", 385 | "unit": "short" 386 | }, 387 | { 388 | "alias": "CPU Requests", 389 | "colorMode": null, 390 | "colors": [], 391 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 392 | "decimals": 2, 393 | "link": false, 394 | "linkTooltip": "Drill down", 395 | "linkUrl": "", 396 | "pattern": "Value #B", 397 | "thresholds": [], 398 | "type": "number", 399 | "unit": "short" 400 | }, 401 | { 402 | "alias": "CPU Requests %", 403 | "colorMode": null, 404 | "colors": [], 405 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 406 | "decimals": 2, 407 | "link": false, 408 | "linkTooltip": "Drill down", 409 | "linkUrl": "", 410 | "pattern": "Value #C", 411 | "thresholds": [], 412 | "type": "number", 413 | "unit": "percentunit" 414 | }, 415 | { 416 | "alias": "CPU Limits", 417 | "colorMode": null, 418 | "colors": [], 419 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 420 | "decimals": 2, 421 | "link": false, 422 | "linkTooltip": "Drill down", 423 | "linkUrl": "", 424 | "pattern": "Value #D", 425 | "thresholds": [], 426 | "type": "number", 427 | "unit": "short" 428 | }, 429 | { 430 | "alias": "CPU Limits %", 431 | "colorMode": null, 432 | "colors": [], 433 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 434 | "decimals": 2, 435 | "link": false, 436 | "linkTooltip": "Drill down", 437 | "linkUrl": "", 438 | "pattern": "Value #E", 439 | "thresholds": [], 440 | "type": "number", 441 | "unit": "percentunit" 442 | }, 443 | { 444 | "alias": "Pod", 445 | "colorMode": null, 446 | "colors": [], 447 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 448 | "decimals": 2, 449 | "link": false, 450 | "linkTooltip": "Drill down", 451 | "linkUrl": "", 452 | "pattern": "pod", 453 | "thresholds": [], 454 | "type": "number", 455 | "unit": "short" 456 | }, 457 | { 458 | "alias": "", 459 | "colorMode": null, 460 | "colors": [], 461 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 462 | "decimals": 2, 463 | "pattern": "/.*/", 464 | "thresholds": [], 465 | "type": "string", 466 | "unit": "short" 467 | } 468 | ], 469 | "targets": [ 470 | { 471 | "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)", 472 | "format": "table", 473 | "instant": true, 474 | "intervalFactor": 2, 475 | "legendFormat": "", 476 | "refId": "A", 477 | "step": 10 478 | }, 479 | { 480 | "expr": "sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod)", 481 | "format": "table", 482 | "instant": true, 483 | "intervalFactor": 2, 484 | "legendFormat": "", 485 | "refId": "B", 486 | "step": 10 487 | }, 488 | { 489 | "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) \n/ sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod)", 490 | "format": "table", 491 | "instant": true, 492 | "intervalFactor": 2, 493 | "legendFormat": "", 494 | "refId": "C", 495 | "step": 10 496 | }, 497 | { 498 | "expr": "sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod)", 499 | "format": "table", 500 | "instant": true, 501 | "intervalFactor": 2, 502 | "legendFormat": "", 503 | "refId": "D", 504 | "step": 10 505 | }, 506 | { 507 | "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) \n/ sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod)", 508 | "format": "table", 509 | "instant": true, 510 | "intervalFactor": 2, 511 | "legendFormat": "", 512 | "refId": "E", 513 | "step": 10 514 | } 515 | ], 516 | "thresholds": [], 517 | "timeFrom": null, 518 | "timeShift": null, 519 | "title": "CPU Quota (Pods)", 520 | "tooltip": { 521 | "shared": true, 522 | "sort": 0, 523 | "value_type": "individual" 524 | }, 525 | "transform": "table", 526 | "type": "table", 527 | "xaxis": { 528 | "buckets": null, 529 | "mode": "time", 530 | "name": null, 531 | "show": true, 532 | "values": [] 533 | }, 534 | "yaxes": [ 535 | { 536 | "format": "short", 537 | "label": null, 538 | "logBase": 1, 539 | "max": null, 540 | "min": 0, 541 | "show": true 542 | }, 543 | { 544 | "format": "short", 545 | "label": null, 546 | "logBase": 1, 547 | "max": null, 548 | "min": null, 549 | "show": false 550 | } 551 | ] 552 | }, 553 | { 554 | "aliasColors": {}, 555 | "bars": false, 556 | "columns": [], 557 | "dashLength": 10, 558 | "dashes": false, 559 | "datasource": "$datasource", 560 | "fill": 1, 561 | "fontSize": "100%", 562 | "gridPos": { 563 | "h": 6, 564 | "w": 12, 565 | "x": 12, 566 | "y": 12 567 | }, 568 | "id": 11, 569 | "legend": { 570 | "avg": false, 571 | "current": false, 572 | "max": false, 573 | "min": false, 574 | "show": true, 575 | "total": false, 576 | "values": false 577 | }, 578 | "lines": true, 579 | "linewidth": 1, 580 | "links": [], 581 | "nullPointMode": "null as zero", 582 | "pageSize": null, 583 | "percentage": false, 584 | "pointradius": 5, 585 | "points": false, 586 | "renderer": "flot", 587 | "scroll": true, 588 | "seriesOverrides": [], 589 | "showHeader": true, 590 | "sort": { 591 | "col": 5, 592 | "desc": true 593 | }, 594 | "spaceLength": 10, 595 | "stack": false, 596 | "steppedLine": false, 597 | "styles": [ 598 | { 599 | "alias": "Time", 600 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 601 | "pattern": "Time", 602 | "type": "hidden" 603 | }, 604 | { 605 | "alias": "CPU Usage", 606 | "colorMode": null, 607 | "colors": [], 608 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 609 | "decimals": 2, 610 | "link": false, 611 | "linkTooltip": "Drill down", 612 | "linkUrl": "", 613 | "pattern": "Value #A", 614 | "thresholds": [], 615 | "type": "number", 616 | "unit": "short" 617 | }, 618 | { 619 | "alias": "CPU Requests", 620 | "colorMode": null, 621 | "colors": [], 622 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 623 | "decimals": 2, 624 | "link": false, 625 | "linkTooltip": "Drill down", 626 | "linkUrl": "", 627 | "pattern": "Value #B", 628 | "thresholds": [], 629 | "type": "number", 630 | "unit": "short" 631 | }, 632 | { 633 | "alias": "CPU Requests %", 634 | "colorMode": null, 635 | "colors": [], 636 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 637 | "decimals": null, 638 | "link": false, 639 | "linkTooltip": "Drill down", 640 | "linkUrl": "", 641 | "pattern": "Value #C", 642 | "thresholds": [], 643 | "type": "number", 644 | "unit": "percentunit" 645 | }, 646 | { 647 | "alias": "CPU Limits", 648 | "colorMode": null, 649 | "colors": [], 650 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 651 | "decimals": 2, 652 | "link": false, 653 | "linkTooltip": "Drill down", 654 | "linkUrl": "", 655 | "pattern": "Value #D", 656 | "thresholds": [], 657 | "type": "number", 658 | "unit": "short" 659 | }, 660 | { 661 | "alias": "CPU Limits %", 662 | "colorMode": null, 663 | "colors": [], 664 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 665 | "decimals": null, 666 | "link": false, 667 | "linkTooltip": "Drill down", 668 | "linkUrl": "", 669 | "pattern": "Value #E", 670 | "thresholds": [], 671 | "type": "number", 672 | "unit": "percentunit" 673 | }, 674 | { 675 | "alias": "Container", 676 | "colorMode": null, 677 | "colors": [], 678 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 679 | "decimals": 2, 680 | "link": false, 681 | "linkTooltip": "Drill down", 682 | "linkUrl": "", 683 | "pattern": "container", 684 | "thresholds": [], 685 | "type": "string", 686 | "unit": "short" 687 | }, 688 | { 689 | "alias": "Pod", 690 | "colorMode": null, 691 | "colors": [ 692 | "rgba(245, 54, 54, 0.9)", 693 | "rgba(237, 129, 40, 0.89)", 694 | "rgba(50, 172, 45, 0.97)" 695 | ], 696 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 697 | "decimals": 2, 698 | "mappingType": 1, 699 | "pattern": "pod", 700 | "thresholds": [], 701 | "type": "string", 702 | "unit": "short" 703 | }, 704 | { 705 | "alias": "", 706 | "colorMode": null, 707 | "colors": [], 708 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 709 | "decimals": 2, 710 | "pattern": "/.*/", 711 | "thresholds": [], 712 | "type": "string", 713 | "unit": "short" 714 | } 715 | ], 716 | "targets": [ 717 | { 718 | "expr": "sum(label_replace(\n label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\",container_name!=\"POD\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n , \"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container)", 719 | "format": "table", 720 | "instant": true, 721 | "intervalFactor": 2, 722 | "legendFormat": "", 723 | "refId": "A", 724 | "step": 10 725 | }, 726 | { 727 | "expr": "sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod,container)", 728 | "format": "table", 729 | "instant": true, 730 | "intervalFactor": 2, 731 | "legendFormat": "", 732 | "refId": "B", 733 | "step": 10 734 | }, 735 | { 736 | "expr": "sum(label_replace(\n label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\",container_name!=\"POD\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n ,\"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container) \n/ sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod,container)", 737 | "format": "table", 738 | "instant": true, 739 | "intervalFactor": 2, 740 | "legendFormat": "", 741 | "refId": "C", 742 | "step": 10 743 | }, 744 | { 745 | "expr": "sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod,container)", 746 | "format": "table", 747 | "instant": true, 748 | "intervalFactor": 2, 749 | "legendFormat": "", 750 | "refId": "D", 751 | "step": 10 752 | }, 753 | { 754 | "expr": "sum(label_replace(\n label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\",container_name!=\"POD\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n ,\"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container) \n/ sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod,container)", 755 | "format": "table", 756 | "instant": true, 757 | "intervalFactor": 2, 758 | "legendFormat": "", 759 | "refId": "E", 760 | "step": 10 761 | } 762 | ], 763 | "thresholds": [], 764 | "timeFrom": null, 765 | "timeShift": null, 766 | "title": "CPU Quota (Containers)", 767 | "tooltip": { 768 | "shared": true, 769 | "sort": 0, 770 | "value_type": "individual" 771 | }, 772 | "transform": "table", 773 | "type": "table", 774 | "xaxis": { 775 | "buckets": null, 776 | "mode": "time", 777 | "name": null, 778 | "show": true, 779 | "values": [] 780 | }, 781 | "yaxes": [ 782 | { 783 | "format": "short", 784 | "label": null, 785 | "logBase": 1, 786 | "max": null, 787 | "min": 0, 788 | "show": true 789 | }, 790 | { 791 | "format": "short", 792 | "label": null, 793 | "logBase": 1, 794 | "max": null, 795 | "min": null, 796 | "show": false 797 | } 798 | ] 799 | }, 800 | { 801 | "collapsed": false, 802 | "gridPos": { 803 | "h": 1, 804 | "w": 24, 805 | "x": 0, 806 | "y": 18 807 | }, 808 | "id": 6, 809 | "panels": [], 810 | "repeat": null, 811 | "title": "Memory Usage", 812 | "type": "row" 813 | }, 814 | { 815 | "aliasColors": {}, 816 | "bars": false, 817 | "dashLength": 10, 818 | "dashes": false, 819 | "datasource": "$datasource", 820 | "fill": 1, 821 | "gridPos": { 822 | "h": 7, 823 | "w": 12, 824 | "x": 0, 825 | "y": 19 826 | }, 827 | "id": 2, 828 | "legend": { 829 | "avg": false, 830 | "current": false, 831 | "max": false, 832 | "min": false, 833 | "show": true, 834 | "total": false, 835 | "values": false 836 | }, 837 | "lines": true, 838 | "linewidth": 1, 839 | "links": [], 840 | "nullPointMode": "null as zero", 841 | "percentage": false, 842 | "pointradius": 5, 843 | "points": false, 844 | "renderer": "flot", 845 | "seriesOverrides": [], 846 | "spaceLength": 10, 847 | "stack": false, 848 | "steppedLine": false, 849 | "targets": [ 850 | { 851 | "expr": "sum(container_memory_usage_bytes{namespace=\"$Namespace\", container_name!=\"\",pod_name=~\"$Pod\"}) by (pod_name)", 852 | "format": "time_series", 853 | "intervalFactor": 2, 854 | "legendFormat": "{{pod_name}}", 855 | "legendLink": null, 856 | "refId": "A", 857 | "step": 10 858 | } 859 | ], 860 | "thresholds": [], 861 | "timeFrom": null, 862 | "timeRegions": [], 863 | "timeShift": null, 864 | "title": "Memory Usage", 865 | "tooltip": { 866 | "shared": true, 867 | "sort": 0, 868 | "value_type": "individual" 869 | }, 870 | "type": "graph", 871 | "xaxis": { 872 | "buckets": null, 873 | "mode": "time", 874 | "name": null, 875 | "show": true, 876 | "values": [] 877 | }, 878 | "yaxes": [ 879 | { 880 | "format": "decbytes", 881 | "label": null, 882 | "logBase": 1, 883 | "max": null, 884 | "min": 0, 885 | "show": true 886 | }, 887 | { 888 | "format": "short", 889 | "label": null, 890 | "logBase": 1, 891 | "max": null, 892 | "min": null, 893 | "show": false 894 | } 895 | ], 896 | "yaxis": { 897 | "align": false, 898 | "alignLevel": null 899 | } 900 | }, 901 | { 902 | "aliasColors": {}, 903 | "bars": false, 904 | "columns": [], 905 | "dashLength": 10, 906 | "dashes": false, 907 | "datasource": "$datasource", 908 | "fill": 1, 909 | "fontSize": "100%", 910 | "gridPos": { 911 | "h": 7, 912 | "w": 12, 913 | "x": 12, 914 | "y": 19 915 | }, 916 | "id": 3, 917 | "legend": { 918 | "avg": false, 919 | "current": false, 920 | "max": false, 921 | "min": false, 922 | "show": true, 923 | "total": false, 924 | "values": false 925 | }, 926 | "lines": true, 927 | "linewidth": 1, 928 | "links": [], 929 | "nullPointMode": "null as zero", 930 | "pageSize": null, 931 | "percentage": false, 932 | "pointradius": 5, 933 | "points": false, 934 | "renderer": "flot", 935 | "scroll": true, 936 | "seriesOverrides": [], 937 | "showHeader": true, 938 | "sort": { 939 | "col": 0, 940 | "desc": true 941 | }, 942 | "spaceLength": 10, 943 | "stack": false, 944 | "steppedLine": false, 945 | "styles": [ 946 | { 947 | "alias": "Time", 948 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 949 | "pattern": "Time", 950 | "type": "hidden" 951 | }, 952 | { 953 | "alias": "Memory Usage", 954 | "colorMode": null, 955 | "colors": [], 956 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 957 | "decimals": null, 958 | "link": false, 959 | "linkTooltip": "Drill down", 960 | "linkUrl": "", 961 | "pattern": "Value #A", 962 | "thresholds": [], 963 | "type": "number", 964 | "unit": "bytes" 965 | }, 966 | { 967 | "alias": "Memory Requests", 968 | "colorMode": null, 969 | "colors": [], 970 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 971 | "decimals": null, 972 | "link": false, 973 | "linkTooltip": "Drill down", 974 | "linkUrl": "", 975 | "pattern": "Value #B", 976 | "thresholds": [], 977 | "type": "number", 978 | "unit": "bytes" 979 | }, 980 | { 981 | "alias": "Memory Requests %", 982 | "colorMode": null, 983 | "colors": [], 984 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 985 | "decimals": null, 986 | "link": false, 987 | "linkTooltip": "Drill down", 988 | "linkUrl": "", 989 | "pattern": "Value #C", 990 | "thresholds": [], 991 | "type": "number", 992 | "unit": "percentunit" 993 | }, 994 | { 995 | "alias": "Memory Limits", 996 | "colorMode": null, 997 | "colors": [], 998 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 999 | "decimals": 2, 1000 | "link": false, 1001 | "linkTooltip": "Drill down", 1002 | "linkUrl": "", 1003 | "pattern": "Value #D", 1004 | "thresholds": [], 1005 | "type": "number", 1006 | "unit": "bytes" 1007 | }, 1008 | { 1009 | "alias": "Memory Limits %", 1010 | "colorMode": null, 1011 | "colors": [], 1012 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1013 | "decimals": null, 1014 | "link": false, 1015 | "linkTooltip": "Drill down", 1016 | "linkUrl": "", 1017 | "pattern": "Value #E", 1018 | "thresholds": [], 1019 | "type": "number", 1020 | "unit": "percentunit" 1021 | }, 1022 | { 1023 | "alias": "Pod", 1024 | "colorMode": null, 1025 | "colors": [], 1026 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1027 | "decimals": 2, 1028 | "link": false, 1029 | "linkTooltip": "Drill down", 1030 | "linkUrl": "", 1031 | "pattern": "pod", 1032 | "thresholds": [], 1033 | "type": "number", 1034 | "unit": "short" 1035 | }, 1036 | { 1037 | "alias": "", 1038 | "colorMode": null, 1039 | "colors": [], 1040 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1041 | "decimals": 2, 1042 | "pattern": "/.*/", 1043 | "thresholds": [], 1044 | "type": "string", 1045 | "unit": "short" 1046 | } 1047 | ], 1048 | "targets": [ 1049 | { 1050 | "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!=\"\",pod_name=~\"$Pod\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)", 1051 | "format": "table", 1052 | "instant": true, 1053 | "intervalFactor": 2, 1054 | "legendFormat": "", 1055 | "refId": "A", 1056 | "step": 10 1057 | }, 1058 | { 1059 | "expr": "sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod)", 1060 | "format": "table", 1061 | "instant": true, 1062 | "intervalFactor": 2, 1063 | "legendFormat": "", 1064 | "refId": "B", 1065 | "step": 10 1066 | }, 1067 | { 1068 | "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!=\"\",pod_name=~\"$Pod\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) \n/ sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod) ", 1069 | "format": "table", 1070 | "instant": true, 1071 | "intervalFactor": 2, 1072 | "legendFormat": "", 1073 | "refId": "C", 1074 | "step": 10 1075 | }, 1076 | { 1077 | "expr": "sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod)", 1078 | "format": "table", 1079 | "instant": true, 1080 | "intervalFactor": 2, 1081 | "legendFormat": "", 1082 | "refId": "D", 1083 | "step": 10 1084 | }, 1085 | { 1086 | "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!=\"\",pod_name=~\"$Pod\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) \n/ sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod) ", 1087 | "format": "table", 1088 | "instant": true, 1089 | "intervalFactor": 2, 1090 | "legendFormat": "", 1091 | "refId": "E", 1092 | "step": 10 1093 | } 1094 | ], 1095 | "thresholds": [], 1096 | "timeFrom": null, 1097 | "timeShift": null, 1098 | "title": "Memory Quota (Pods)", 1099 | "tooltip": { 1100 | "shared": true, 1101 | "sort": 0, 1102 | "value_type": "individual" 1103 | }, 1104 | "transform": "table", 1105 | "type": "table", 1106 | "xaxis": { 1107 | "buckets": null, 1108 | "mode": "time", 1109 | "name": null, 1110 | "show": true, 1111 | "values": [] 1112 | }, 1113 | "yaxes": [ 1114 | { 1115 | "format": "short", 1116 | "label": null, 1117 | "logBase": 1, 1118 | "max": null, 1119 | "min": 0, 1120 | "show": true 1121 | }, 1122 | { 1123 | "format": "short", 1124 | "label": null, 1125 | "logBase": 1, 1126 | "max": null, 1127 | "min": null, 1128 | "show": false 1129 | } 1130 | ] 1131 | }, 1132 | { 1133 | "aliasColors": {}, 1134 | "bars": false, 1135 | "columns": [], 1136 | "dashLength": 10, 1137 | "dashes": false, 1138 | "datasource": "$datasource", 1139 | "fill": 1, 1140 | "fontSize": "100%", 1141 | "gridPos": { 1142 | "h": 7, 1143 | "w": 12, 1144 | "x": 12, 1145 | "y": 26 1146 | }, 1147 | "id": 12, 1148 | "legend": { 1149 | "avg": false, 1150 | "current": false, 1151 | "max": false, 1152 | "min": false, 1153 | "show": true, 1154 | "total": false, 1155 | "values": false 1156 | }, 1157 | "lines": true, 1158 | "linewidth": 1, 1159 | "links": [], 1160 | "nullPointMode": "null as zero", 1161 | "pageSize": null, 1162 | "percentage": false, 1163 | "pointradius": 5, 1164 | "points": false, 1165 | "renderer": "flot", 1166 | "scroll": true, 1167 | "seriesOverrides": [], 1168 | "showHeader": true, 1169 | "sort": { 1170 | "col": 2, 1171 | "desc": true 1172 | }, 1173 | "spaceLength": 10, 1174 | "stack": false, 1175 | "steppedLine": false, 1176 | "styles": [ 1177 | { 1178 | "alias": "Time", 1179 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1180 | "pattern": "Time", 1181 | "type": "hidden" 1182 | }, 1183 | { 1184 | "alias": "Memory Usage", 1185 | "colorMode": null, 1186 | "colors": [], 1187 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1188 | "decimals": null, 1189 | "link": false, 1190 | "linkTooltip": "Drill down", 1191 | "linkUrl": "", 1192 | "pattern": "Value #A", 1193 | "thresholds": [], 1194 | "type": "number", 1195 | "unit": "bytes" 1196 | }, 1197 | { 1198 | "alias": "Memory Requests", 1199 | "colorMode": null, 1200 | "colors": [], 1201 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1202 | "decimals": null, 1203 | "link": false, 1204 | "linkTooltip": "Drill down", 1205 | "linkUrl": "", 1206 | "pattern": "Value #B", 1207 | "thresholds": [], 1208 | "type": "number", 1209 | "unit": "bytes" 1210 | }, 1211 | { 1212 | "alias": "Memory Requests %", 1213 | "colorMode": null, 1214 | "colors": [], 1215 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1216 | "decimals": 2, 1217 | "link": false, 1218 | "linkTooltip": "Drill down", 1219 | "linkUrl": "", 1220 | "pattern": "Value #C", 1221 | "thresholds": [], 1222 | "type": "number", 1223 | "unit": "percentunit" 1224 | }, 1225 | { 1226 | "alias": "Memory Limits", 1227 | "colorMode": null, 1228 | "colors": [], 1229 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1230 | "decimals": null, 1231 | "link": false, 1232 | "linkTooltip": "Drill down", 1233 | "linkUrl": "", 1234 | "pattern": "Value #D", 1235 | "thresholds": [], 1236 | "type": "number", 1237 | "unit": "bytes" 1238 | }, 1239 | { 1240 | "alias": "Memory Limits %", 1241 | "colorMode": null, 1242 | "colors": [], 1243 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1244 | "decimals": 2, 1245 | "link": false, 1246 | "linkTooltip": "Drill down", 1247 | "linkUrl": "", 1248 | "pattern": "Value #E", 1249 | "thresholds": [], 1250 | "type": "number", 1251 | "unit": "percentunit" 1252 | }, 1253 | { 1254 | "alias": "Pod", 1255 | "colorMode": null, 1256 | "colors": [], 1257 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1258 | "decimals": 2, 1259 | "link": false, 1260 | "linkTooltip": "Drill down", 1261 | "linkUrl": "", 1262 | "pattern": "pod", 1263 | "thresholds": [], 1264 | "type": "string", 1265 | "unit": "short" 1266 | }, 1267 | { 1268 | "alias": "Container", 1269 | "colorMode": null, 1270 | "colors": [ 1271 | "rgba(245, 54, 54, 0.9)", 1272 | "rgba(237, 129, 40, 0.89)", 1273 | "rgba(50, 172, 45, 0.97)" 1274 | ], 1275 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1276 | "decimals": 2, 1277 | "mappingType": 1, 1278 | "pattern": "container", 1279 | "thresholds": [], 1280 | "type": "string", 1281 | "unit": "short" 1282 | }, 1283 | { 1284 | "alias": "", 1285 | "colorMode": null, 1286 | "colors": [], 1287 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1288 | "decimals": 2, 1289 | "pattern": "/.*/", 1290 | "thresholds": [], 1291 | "type": "string", 1292 | "unit": "short" 1293 | } 1294 | ], 1295 | "targets": [ 1296 | { 1297 | "expr": "sum(label_replace(\n label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!=\"\",pod_name=~\"$Pod\",container_name!=\"POD\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n ,\"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container) ", 1298 | "format": "table", 1299 | "instant": true, 1300 | "intervalFactor": 2, 1301 | "legendFormat": "", 1302 | "refId": "A", 1303 | "step": 10 1304 | }, 1305 | { 1306 | "expr": "sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod,container)", 1307 | "format": "table", 1308 | "instant": true, 1309 | "intervalFactor": 2, 1310 | "legendFormat": "", 1311 | "refId": "B", 1312 | "step": 10 1313 | }, 1314 | { 1315 | "expr": "sum(label_replace(\n label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!~\"POD|\",pod_name=~\"$Pod\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n ,\"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container) \n/ sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod,container)", 1316 | "format": "table", 1317 | "instant": true, 1318 | "intervalFactor": 2, 1319 | "legendFormat": "", 1320 | "refId": "C", 1321 | "step": 10 1322 | }, 1323 | { 1324 | "expr": "sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod,container)", 1325 | "format": "table", 1326 | "instant": true, 1327 | "intervalFactor": 2, 1328 | "legendFormat": "", 1329 | "refId": "D", 1330 | "step": 10 1331 | }, 1332 | { 1333 | "expr": "sum(label_replace(\n label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!~\"POD|\",pod_name=~\"$Pod\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n ,\"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container) \n/ sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\"}) by (pod,container)", 1334 | "format": "table", 1335 | "instant": true, 1336 | "intervalFactor": 2, 1337 | "legendFormat": "", 1338 | "refId": "E", 1339 | "step": 10 1340 | } 1341 | ], 1342 | "thresholds": [], 1343 | "timeFrom": null, 1344 | "timeShift": null, 1345 | "title": "Memory Quota (Containers)", 1346 | "tooltip": { 1347 | "shared": true, 1348 | "sort": 0, 1349 | "value_type": "individual" 1350 | }, 1351 | "transform": "table", 1352 | "type": "table", 1353 | "xaxis": { 1354 | "buckets": null, 1355 | "mode": "time", 1356 | "name": null, 1357 | "show": true, 1358 | "values": [] 1359 | }, 1360 | "yaxes": [ 1361 | { 1362 | "format": "short", 1363 | "label": null, 1364 | "logBase": 1, 1365 | "max": null, 1366 | "min": 0, 1367 | "show": true 1368 | }, 1369 | { 1370 | "format": "short", 1371 | "label": null, 1372 | "logBase": 1, 1373 | "max": null, 1374 | "min": null, 1375 | "show": false 1376 | } 1377 | ] 1378 | } 1379 | ], 1380 | "refresh": "10s", 1381 | "schemaVersion": 16, 1382 | "style": "dark", 1383 | "tags": [], 1384 | "templating": { 1385 | "list": [ 1386 | { 1387 | "allValue": null, 1388 | "current": {}, 1389 | "datasource": "$datasource", 1390 | "definition": "", 1391 | "hide": 0, 1392 | "includeAll": false, 1393 | "label": "Project", 1394 | "multi": false, 1395 | "name": "Namespace", 1396 | "options": [], 1397 | "query": "label_values(kube_pod_info, namespace)", 1398 | "refresh": 1, 1399 | "regex": "", 1400 | "skipUrlSync": false, 1401 | "sort": 2, 1402 | "tagValuesQuery": "", 1403 | "tags": [], 1404 | "tagsQuery": "", 1405 | "type": "query", 1406 | "useTags": false 1407 | }, 1408 | { 1409 | "allValue": null, 1410 | "current": {}, 1411 | "datasource": "$datasource", 1412 | "definition": "label_values(kube_pod_info{namespace=\"$Namespace\"}, pod) ", 1413 | "hide": 0, 1414 | "includeAll": true, 1415 | "label": null, 1416 | "multi": true, 1417 | "name": "Pod", 1418 | "options": [], 1419 | "query": "label_values(kube_pod_info{namespace=\"$Namespace\"}, pod) ", 1420 | "refresh": 2, 1421 | "regex": "", 1422 | "skipUrlSync": false, 1423 | "sort": 0, 1424 | "tagValuesQuery": "", 1425 | "tags": [], 1426 | "tagsQuery": "", 1427 | "type": "query", 1428 | "useTags": false 1429 | }, 1430 | { 1431 | "current": { 1432 | "selected": true, 1433 | "text": "prometheus", 1434 | "value": "prometheus" 1435 | }, 1436 | "hide": 0, 1437 | "label": null, 1438 | "name": "datasource", 1439 | "options": [], 1440 | "query": "prometheus", 1441 | "refresh": 1, 1442 | "regex": "", 1443 | "skipUrlSync": false, 1444 | "type": "datasource" 1445 | } 1446 | ] 1447 | }, 1448 | "time": { 1449 | "from": "now-1h", 1450 | "to": "now" 1451 | }, 1452 | "timepicker": { 1453 | "refresh_intervals": [ 1454 | "5s", 1455 | "10s", 1456 | "30s", 1457 | "1m", 1458 | "5m", 1459 | "15m", 1460 | "30m", 1461 | "1h", 1462 | "2h", 1463 | "1d" 1464 | ], 1465 | "time_options": [ 1466 | "5m", 1467 | "15m", 1468 | "1h", 1469 | "6h", 1470 | "12h", 1471 | "24h", 1472 | "2d", 1473 | "7d", 1474 | "30d" 1475 | ] 1476 | }, 1477 | "timezone": "", 1478 | "title": "Pods in Namespace", 1479 | "uid": "pods-in-namespaces", 1480 | "version": 33 1481 | } 1482 | -------------------------------------------------------------------------------- /dashboards-with-cluster-select/pods-in-namespace.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [], 3 | "__requires": [ 4 | { 5 | "type": "grafana", 6 | "id": "grafana", 7 | "name": "Grafana", 8 | "version": "5.4.3" 9 | }, 10 | { 11 | "type": "panel", 12 | "id": "graph", 13 | "name": "Graph", 14 | "version": "5.0.0" 15 | }, 16 | { 17 | "type": "datasource", 18 | "id": "prometheus", 19 | "name": "Prometheus", 20 | "version": "5.0.0" 21 | }, 22 | { 23 | "type": "panel", 24 | "id": "table", 25 | "name": "Table", 26 | "version": "5.0.0" 27 | } 28 | ], 29 | "annotations": { 30 | "list": [ 31 | { 32 | "builtIn": 1, 33 | "datasource": "-- Grafana --", 34 | "enable": true, 35 | "hide": true, 36 | "iconColor": "rgba(0, 211, 255, 1)", 37 | "name": "Annotations & Alerts", 38 | "type": "dashboard" 39 | } 40 | ] 41 | }, 42 | "editable": true, 43 | "gnetId": null, 44 | "graphTooltip": 0, 45 | "id": null, 46 | "iteration": 1570200495937, 47 | "links": [], 48 | "panels": [ 49 | { 50 | "aliasColors": {}, 51 | "bars": false, 52 | "dashLength": 10, 53 | "dashes": false, 54 | "datasource": "$datasource", 55 | "fill": 1, 56 | "gridPos": { 57 | "h": 5, 58 | "w": 12, 59 | "x": 0, 60 | "y": 0 61 | }, 62 | "id": 9, 63 | "legend": { 64 | "avg": false, 65 | "current": false, 66 | "max": false, 67 | "min": false, 68 | "show": true, 69 | "total": false, 70 | "values": false 71 | }, 72 | "lines": true, 73 | "linewidth": 1, 74 | "links": [], 75 | "nullPointMode": "null", 76 | "percentage": false, 77 | "pointradius": 5, 78 | "points": false, 79 | "renderer": "flot", 80 | "seriesOverrides": [], 81 | "spaceLength": 10, 82 | "stack": false, 83 | "steppedLine": false, 84 | "targets": [ 85 | { 86 | "expr": "sum by (phase) ( \n ( kube_pod_status_phase{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}\n or\n label_replace ( kube_pod_status_ready{namespace=\"$Namespace\",pod=~\"$Pod\",condition=\"true\",cluster=\"$cluster\"}, \"phase\",\"Ready\",\"\",\"\" )\n )\n) ", 87 | "format": "time_series", 88 | "intervalFactor": 1, 89 | "legendFormat": "{{phase}}", 90 | "refId": "A" 91 | } 92 | ], 93 | "thresholds": [], 94 | "timeFrom": null, 95 | "timeRegions": [], 96 | "timeShift": null, 97 | "title": "Pod Phase", 98 | "tooltip": { 99 | "shared": true, 100 | "sort": 0, 101 | "value_type": "individual" 102 | }, 103 | "type": "graph", 104 | "xaxis": { 105 | "buckets": null, 106 | "mode": "time", 107 | "name": null, 108 | "show": true, 109 | "values": [] 110 | }, 111 | "yaxes": [ 112 | { 113 | "decimals": null, 114 | "format": "locale", 115 | "label": null, 116 | "logBase": 1, 117 | "max": null, 118 | "min": null, 119 | "show": true 120 | }, 121 | { 122 | "format": "short", 123 | "label": null, 124 | "logBase": 1, 125 | "max": null, 126 | "min": null, 127 | "show": true 128 | } 129 | ], 130 | "yaxis": { 131 | "align": false, 132 | "alignLevel": null 133 | } 134 | }, 135 | { 136 | "aliasColors": {}, 137 | "bars": false, 138 | "dashLength": 10, 139 | "dashes": false, 140 | "datasource": "$datasource", 141 | "fill": 1, 142 | "gridPos": { 143 | "h": 5, 144 | "w": 12, 145 | "x": 12, 146 | "y": 0 147 | }, 148 | "id": 10, 149 | "legend": { 150 | "avg": false, 151 | "current": false, 152 | "max": false, 153 | "min": false, 154 | "show": true, 155 | "total": false, 156 | "values": false 157 | }, 158 | "lines": true, 159 | "linewidth": 1, 160 | "links": [], 161 | "nullPointMode": "null", 162 | "percentage": false, 163 | "pointradius": 5, 164 | "points": false, 165 | "renderer": "flot", 166 | "seriesOverrides": [], 167 | "spaceLength": 10, 168 | "stack": false, 169 | "steppedLine": false, 170 | "targets": [ 171 | { 172 | "expr": "sum (increase(kube_pod_container_status_restarts_total{namespace=~\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"} [1h] )) by (pod) ", 173 | "format": "time_series", 174 | "intervalFactor": 1, 175 | "legendFormat": "{{pod}}", 176 | "refId": "A" 177 | } 178 | ], 179 | "thresholds": [], 180 | "timeFrom": null, 181 | "timeRegions": [], 182 | "timeShift": null, 183 | "title": "Pod Restarts", 184 | "tooltip": { 185 | "shared": true, 186 | "sort": 0, 187 | "value_type": "individual" 188 | }, 189 | "type": "graph", 190 | "xaxis": { 191 | "buckets": null, 192 | "mode": "time", 193 | "name": null, 194 | "show": true, 195 | "values": [] 196 | }, 197 | "yaxes": [ 198 | { 199 | "decimals": null, 200 | "format": "locale", 201 | "label": null, 202 | "logBase": 1, 203 | "max": null, 204 | "min": null, 205 | "show": true 206 | }, 207 | { 208 | "format": "short", 209 | "label": null, 210 | "logBase": 1, 211 | "max": null, 212 | "min": null, 213 | "show": true 214 | } 215 | ], 216 | "yaxis": { 217 | "align": false, 218 | "alignLevel": null 219 | } 220 | }, 221 | { 222 | "collapsed": false, 223 | "gridPos": { 224 | "h": 1, 225 | "w": 24, 226 | "x": 0, 227 | "y": 5 228 | }, 229 | "id": 4, 230 | "panels": [], 231 | "repeat": null, 232 | "title": "CPU Usage", 233 | "type": "row" 234 | }, 235 | { 236 | "aliasColors": {}, 237 | "bars": false, 238 | "dashLength": 10, 239 | "dashes": false, 240 | "datasource": "$datasource", 241 | "fill": 1, 242 | "gridPos": { 243 | "h": 6, 244 | "w": 12, 245 | "x": 0, 246 | "y": 6 247 | }, 248 | "id": 0, 249 | "legend": { 250 | "avg": false, 251 | "current": false, 252 | "max": false, 253 | "min": false, 254 | "show": true, 255 | "total": false, 256 | "values": false 257 | }, 258 | "lines": true, 259 | "linewidth": 1, 260 | "links": [], 261 | "nullPointMode": "null as zero", 262 | "percentage": false, 263 | "pointradius": 5, 264 | "points": false, 265 | "renderer": "flot", 266 | "seriesOverrides": [], 267 | "spaceLength": 10, 268 | "stack": false, 269 | "steppedLine": false, 270 | "targets": [ 271 | { 272 | "expr": "sum(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\",cluster=\"$cluster\"}) by (pod_name)", 273 | "format": "time_series", 274 | "intervalFactor": 2, 275 | "legendFormat": "{{pod_name}}", 276 | "legendLink": null, 277 | "refId": "A", 278 | "step": 10 279 | } 280 | ], 281 | "thresholds": [], 282 | "timeFrom": null, 283 | "timeRegions": [], 284 | "timeShift": null, 285 | "title": "CPU Usage", 286 | "tooltip": { 287 | "shared": true, 288 | "sort": 0, 289 | "value_type": "individual" 290 | }, 291 | "type": "graph", 292 | "xaxis": { 293 | "buckets": null, 294 | "mode": "time", 295 | "name": null, 296 | "show": true, 297 | "values": [] 298 | }, 299 | "yaxes": [ 300 | { 301 | "format": "short", 302 | "label": null, 303 | "logBase": 1, 304 | "max": null, 305 | "min": 0, 306 | "show": true 307 | }, 308 | { 309 | "format": "short", 310 | "label": null, 311 | "logBase": 1, 312 | "max": null, 313 | "min": null, 314 | "show": false 315 | } 316 | ], 317 | "yaxis": { 318 | "align": false, 319 | "alignLevel": null 320 | } 321 | }, 322 | { 323 | "aliasColors": {}, 324 | "bars": false, 325 | "columns": [], 326 | "dashLength": 10, 327 | "dashes": false, 328 | "datasource": "$datasource", 329 | "fill": 1, 330 | "fontSize": "100%", 331 | "gridPos": { 332 | "h": 6, 333 | "w": 12, 334 | "x": 12, 335 | "y": 6 336 | }, 337 | "id": 1, 338 | "legend": { 339 | "avg": false, 340 | "current": false, 341 | "max": false, 342 | "min": false, 343 | "show": true, 344 | "total": false, 345 | "values": false 346 | }, 347 | "lines": true, 348 | "linewidth": 1, 349 | "links": [], 350 | "nullPointMode": "null as zero", 351 | "pageSize": null, 352 | "percentage": false, 353 | "pointradius": 5, 354 | "points": false, 355 | "renderer": "flot", 356 | "scroll": true, 357 | "seriesOverrides": [], 358 | "showHeader": true, 359 | "sort": { 360 | "col": 0, 361 | "desc": true 362 | }, 363 | "spaceLength": 10, 364 | "stack": false, 365 | "steppedLine": false, 366 | "styles": [ 367 | { 368 | "alias": "Time", 369 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 370 | "pattern": "Time", 371 | "type": "hidden" 372 | }, 373 | { 374 | "alias": "CPU Usage", 375 | "colorMode": null, 376 | "colors": [], 377 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 378 | "decimals": 2, 379 | "link": false, 380 | "linkTooltip": "Drill down", 381 | "linkUrl": "", 382 | "pattern": "Value #A", 383 | "thresholds": [], 384 | "type": "number", 385 | "unit": "short" 386 | }, 387 | { 388 | "alias": "CPU Requests", 389 | "colorMode": null, 390 | "colors": [], 391 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 392 | "decimals": 2, 393 | "link": false, 394 | "linkTooltip": "Drill down", 395 | "linkUrl": "", 396 | "pattern": "Value #B", 397 | "thresholds": [], 398 | "type": "number", 399 | "unit": "short" 400 | }, 401 | { 402 | "alias": "CPU Requests %", 403 | "colorMode": null, 404 | "colors": [], 405 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 406 | "decimals": 2, 407 | "link": false, 408 | "linkTooltip": "Drill down", 409 | "linkUrl": "", 410 | "pattern": "Value #C", 411 | "thresholds": [], 412 | "type": "number", 413 | "unit": "percentunit" 414 | }, 415 | { 416 | "alias": "CPU Limits", 417 | "colorMode": null, 418 | "colors": [], 419 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 420 | "decimals": 2, 421 | "link": false, 422 | "linkTooltip": "Drill down", 423 | "linkUrl": "", 424 | "pattern": "Value #D", 425 | "thresholds": [], 426 | "type": "number", 427 | "unit": "short" 428 | }, 429 | { 430 | "alias": "CPU Limits %", 431 | "colorMode": null, 432 | "colors": [], 433 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 434 | "decimals": 2, 435 | "link": false, 436 | "linkTooltip": "Drill down", 437 | "linkUrl": "", 438 | "pattern": "Value #E", 439 | "thresholds": [], 440 | "type": "number", 441 | "unit": "percentunit" 442 | }, 443 | { 444 | "alias": "Pod", 445 | "colorMode": null, 446 | "colors": [], 447 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 448 | "decimals": 2, 449 | "link": false, 450 | "linkTooltip": "Drill down", 451 | "linkUrl": "", 452 | "pattern": "pod", 453 | "thresholds": [], 454 | "type": "number", 455 | "unit": "short" 456 | }, 457 | { 458 | "alias": "", 459 | "colorMode": null, 460 | "colors": [], 461 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 462 | "decimals": 2, 463 | "pattern": "/.*/", 464 | "thresholds": [], 465 | "type": "string", 466 | "unit": "short" 467 | } 468 | ], 469 | "targets": [ 470 | { 471 | "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)", 472 | "format": "table", 473 | "instant": true, 474 | "intervalFactor": 2, 475 | "legendFormat": "", 476 | "refId": "A", 477 | "step": 10 478 | }, 479 | { 480 | "expr": "sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod)", 481 | "format": "table", 482 | "instant": true, 483 | "intervalFactor": 2, 484 | "legendFormat": "", 485 | "refId": "B", 486 | "step": 10 487 | }, 488 | { 489 | "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) \n/ sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod)", 490 | "format": "table", 491 | "instant": true, 492 | "intervalFactor": 2, 493 | "legendFormat": "", 494 | "refId": "C", 495 | "step": 10 496 | }, 497 | { 498 | "expr": "sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod)", 499 | "format": "table", 500 | "instant": true, 501 | "intervalFactor": 2, 502 | "legendFormat": "", 503 | "refId": "D", 504 | "step": 10 505 | }, 506 | { 507 | "expr": "sum(label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) \n/ sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod)", 508 | "format": "table", 509 | "instant": true, 510 | "intervalFactor": 2, 511 | "legendFormat": "", 512 | "refId": "E", 513 | "step": 10 514 | } 515 | ], 516 | "thresholds": [], 517 | "timeFrom": null, 518 | "timeShift": null, 519 | "title": "CPU Quota (Pods)", 520 | "tooltip": { 521 | "shared": true, 522 | "sort": 0, 523 | "value_type": "individual" 524 | }, 525 | "transform": "table", 526 | "type": "table", 527 | "xaxis": { 528 | "buckets": null, 529 | "mode": "time", 530 | "name": null, 531 | "show": true, 532 | "values": [] 533 | }, 534 | "yaxes": [ 535 | { 536 | "format": "short", 537 | "label": null, 538 | "logBase": 1, 539 | "max": null, 540 | "min": 0, 541 | "show": true 542 | }, 543 | { 544 | "format": "short", 545 | "label": null, 546 | "logBase": 1, 547 | "max": null, 548 | "min": null, 549 | "show": false 550 | } 551 | ] 552 | }, 553 | { 554 | "aliasColors": {}, 555 | "bars": false, 556 | "columns": [], 557 | "dashLength": 10, 558 | "dashes": false, 559 | "datasource": "$datasource", 560 | "fill": 1, 561 | "fontSize": "100%", 562 | "gridPos": { 563 | "h": 6, 564 | "w": 12, 565 | "x": 12, 566 | "y": 12 567 | }, 568 | "id": 11, 569 | "legend": { 570 | "avg": false, 571 | "current": false, 572 | "max": false, 573 | "min": false, 574 | "show": true, 575 | "total": false, 576 | "values": false 577 | }, 578 | "lines": true, 579 | "linewidth": 1, 580 | "links": [], 581 | "nullPointMode": "null as zero", 582 | "pageSize": null, 583 | "percentage": false, 584 | "pointradius": 5, 585 | "points": false, 586 | "renderer": "flot", 587 | "scroll": true, 588 | "seriesOverrides": [], 589 | "showHeader": true, 590 | "sort": { 591 | "col": 5, 592 | "desc": true 593 | }, 594 | "spaceLength": 10, 595 | "stack": false, 596 | "steppedLine": false, 597 | "styles": [ 598 | { 599 | "alias": "Time", 600 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 601 | "pattern": "Time", 602 | "type": "hidden" 603 | }, 604 | { 605 | "alias": "CPU Usage", 606 | "colorMode": null, 607 | "colors": [], 608 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 609 | "decimals": 2, 610 | "link": false, 611 | "linkTooltip": "Drill down", 612 | "linkUrl": "", 613 | "pattern": "Value #A", 614 | "thresholds": [], 615 | "type": "number", 616 | "unit": "short" 617 | }, 618 | { 619 | "alias": "CPU Requests", 620 | "colorMode": null, 621 | "colors": [], 622 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 623 | "decimals": 2, 624 | "link": false, 625 | "linkTooltip": "Drill down", 626 | "linkUrl": "", 627 | "pattern": "Value #B", 628 | "thresholds": [], 629 | "type": "number", 630 | "unit": "short" 631 | }, 632 | { 633 | "alias": "CPU Requests %", 634 | "colorMode": null, 635 | "colors": [], 636 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 637 | "decimals": null, 638 | "link": false, 639 | "linkTooltip": "Drill down", 640 | "linkUrl": "", 641 | "pattern": "Value #C", 642 | "thresholds": [], 643 | "type": "number", 644 | "unit": "percentunit" 645 | }, 646 | { 647 | "alias": "CPU Limits", 648 | "colorMode": null, 649 | "colors": [], 650 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 651 | "decimals": 2, 652 | "link": false, 653 | "linkTooltip": "Drill down", 654 | "linkUrl": "", 655 | "pattern": "Value #D", 656 | "thresholds": [], 657 | "type": "number", 658 | "unit": "short" 659 | }, 660 | { 661 | "alias": "CPU Limits %", 662 | "colorMode": null, 663 | "colors": [], 664 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 665 | "decimals": null, 666 | "link": false, 667 | "linkTooltip": "Drill down", 668 | "linkUrl": "", 669 | "pattern": "Value #E", 670 | "thresholds": [], 671 | "type": "number", 672 | "unit": "percentunit" 673 | }, 674 | { 675 | "alias": "Container", 676 | "colorMode": null, 677 | "colors": [], 678 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 679 | "decimals": 2, 680 | "link": false, 681 | "linkTooltip": "Drill down", 682 | "linkUrl": "", 683 | "pattern": "container", 684 | "thresholds": [], 685 | "type": "string", 686 | "unit": "short" 687 | }, 688 | { 689 | "alias": "Pod", 690 | "colorMode": null, 691 | "colors": [ 692 | "rgba(245, 54, 54, 0.9)", 693 | "rgba(237, 129, 40, 0.89)", 694 | "rgba(50, 172, 45, 0.97)" 695 | ], 696 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 697 | "decimals": 2, 698 | "mappingType": 1, 699 | "pattern": "pod", 700 | "thresholds": [], 701 | "type": "string", 702 | "unit": "short" 703 | }, 704 | { 705 | "alias": "", 706 | "colorMode": null, 707 | "colors": [], 708 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 709 | "decimals": 2, 710 | "pattern": "/.*/", 711 | "thresholds": [], 712 | "type": "string", 713 | "unit": "short" 714 | } 715 | ], 716 | "targets": [ 717 | { 718 | "expr": "sum(label_replace(\n label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\",container_name!=\"POD\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n , \"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container)", 719 | "format": "table", 720 | "instant": true, 721 | "intervalFactor": 2, 722 | "legendFormat": "", 723 | "refId": "A", 724 | "step": 10 725 | }, 726 | { 727 | "expr": "sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod,container)", 728 | "format": "table", 729 | "instant": true, 730 | "intervalFactor": 2, 731 | "legendFormat": "", 732 | "refId": "B", 733 | "step": 10 734 | }, 735 | { 736 | "expr": "sum(label_replace(\n label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\",container_name!=\"POD\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n ,\"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container) \n/ sum(kube_pod_container_resource_requests_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod,container)", 737 | "format": "table", 738 | "instant": true, 739 | "intervalFactor": 2, 740 | "legendFormat": "", 741 | "refId": "C", 742 | "step": 10 743 | }, 744 | { 745 | "expr": "sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod,container)", 746 | "format": "table", 747 | "instant": true, 748 | "intervalFactor": 2, 749 | "legendFormat": "", 750 | "refId": "D", 751 | "step": 10 752 | }, 753 | { 754 | "expr": "sum(label_replace(\n label_replace(namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate{namespace=\"$Namespace\",pod_name=~\"$Pod\",container_name!=\"POD\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n ,\"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container) \n/ sum(kube_pod_container_resource_limits_cpu_cores{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod,container)", 755 | "format": "table", 756 | "instant": true, 757 | "intervalFactor": 2, 758 | "legendFormat": "", 759 | "refId": "E", 760 | "step": 10 761 | } 762 | ], 763 | "thresholds": [], 764 | "timeFrom": null, 765 | "timeShift": null, 766 | "title": "CPU Quota (Containers)", 767 | "tooltip": { 768 | "shared": true, 769 | "sort": 0, 770 | "value_type": "individual" 771 | }, 772 | "transform": "table", 773 | "type": "table", 774 | "xaxis": { 775 | "buckets": null, 776 | "mode": "time", 777 | "name": null, 778 | "show": true, 779 | "values": [] 780 | }, 781 | "yaxes": [ 782 | { 783 | "format": "short", 784 | "label": null, 785 | "logBase": 1, 786 | "max": null, 787 | "min": 0, 788 | "show": true 789 | }, 790 | { 791 | "format": "short", 792 | "label": null, 793 | "logBase": 1, 794 | "max": null, 795 | "min": null, 796 | "show": false 797 | } 798 | ] 799 | }, 800 | { 801 | "collapsed": false, 802 | "gridPos": { 803 | "h": 1, 804 | "w": 24, 805 | "x": 0, 806 | "y": 18 807 | }, 808 | "id": 6, 809 | "panels": [], 810 | "repeat": null, 811 | "title": "Memory Usage", 812 | "type": "row" 813 | }, 814 | { 815 | "aliasColors": {}, 816 | "bars": false, 817 | "dashLength": 10, 818 | "dashes": false, 819 | "datasource": "$datasource", 820 | "fill": 1, 821 | "gridPos": { 822 | "h": 7, 823 | "w": 12, 824 | "x": 0, 825 | "y": 19 826 | }, 827 | "id": 2, 828 | "legend": { 829 | "avg": false, 830 | "current": false, 831 | "max": false, 832 | "min": false, 833 | "show": true, 834 | "total": false, 835 | "values": false 836 | }, 837 | "lines": true, 838 | "linewidth": 1, 839 | "links": [], 840 | "nullPointMode": "null as zero", 841 | "percentage": false, 842 | "pointradius": 5, 843 | "points": false, 844 | "renderer": "flot", 845 | "seriesOverrides": [], 846 | "spaceLength": 10, 847 | "stack": false, 848 | "steppedLine": false, 849 | "targets": [ 850 | { 851 | "expr": "sum(container_memory_usage_bytes{namespace=\"$Namespace\", container_name!=\"\",pod_name=~\"$Pod\",cluster=\"$cluster\"}) by (pod_name)", 852 | "format": "time_series", 853 | "intervalFactor": 2, 854 | "legendFormat": "{{pod_name}}", 855 | "legendLink": null, 856 | "refId": "A", 857 | "step": 10 858 | } 859 | ], 860 | "thresholds": [], 861 | "timeFrom": null, 862 | "timeRegions": [], 863 | "timeShift": null, 864 | "title": "Memory Usage", 865 | "tooltip": { 866 | "shared": true, 867 | "sort": 0, 868 | "value_type": "individual" 869 | }, 870 | "type": "graph", 871 | "xaxis": { 872 | "buckets": null, 873 | "mode": "time", 874 | "name": null, 875 | "show": true, 876 | "values": [] 877 | }, 878 | "yaxes": [ 879 | { 880 | "format": "decbytes", 881 | "label": null, 882 | "logBase": 1, 883 | "max": null, 884 | "min": 0, 885 | "show": true 886 | }, 887 | { 888 | "format": "short", 889 | "label": null, 890 | "logBase": 1, 891 | "max": null, 892 | "min": null, 893 | "show": false 894 | } 895 | ], 896 | "yaxis": { 897 | "align": false, 898 | "alignLevel": null 899 | } 900 | }, 901 | { 902 | "aliasColors": {}, 903 | "bars": false, 904 | "columns": [], 905 | "dashLength": 10, 906 | "dashes": false, 907 | "datasource": "$datasource", 908 | "fill": 1, 909 | "fontSize": "100%", 910 | "gridPos": { 911 | "h": 7, 912 | "w": 12, 913 | "x": 12, 914 | "y": 19 915 | }, 916 | "id": 3, 917 | "legend": { 918 | "avg": false, 919 | "current": false, 920 | "max": false, 921 | "min": false, 922 | "show": true, 923 | "total": false, 924 | "values": false 925 | }, 926 | "lines": true, 927 | "linewidth": 1, 928 | "links": [], 929 | "nullPointMode": "null as zero", 930 | "pageSize": null, 931 | "percentage": false, 932 | "pointradius": 5, 933 | "points": false, 934 | "renderer": "flot", 935 | "scroll": true, 936 | "seriesOverrides": [], 937 | "showHeader": true, 938 | "sort": { 939 | "col": 0, 940 | "desc": true 941 | }, 942 | "spaceLength": 10, 943 | "stack": false, 944 | "steppedLine": false, 945 | "styles": [ 946 | { 947 | "alias": "Time", 948 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 949 | "pattern": "Time", 950 | "type": "hidden" 951 | }, 952 | { 953 | "alias": "Memory Usage", 954 | "colorMode": null, 955 | "colors": [], 956 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 957 | "decimals": null, 958 | "link": false, 959 | "linkTooltip": "Drill down", 960 | "linkUrl": "", 961 | "pattern": "Value #A", 962 | "thresholds": [], 963 | "type": "number", 964 | "unit": "bytes" 965 | }, 966 | { 967 | "alias": "Memory Requests", 968 | "colorMode": null, 969 | "colors": [], 970 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 971 | "decimals": null, 972 | "link": false, 973 | "linkTooltip": "Drill down", 974 | "linkUrl": "", 975 | "pattern": "Value #B", 976 | "thresholds": [], 977 | "type": "number", 978 | "unit": "bytes" 979 | }, 980 | { 981 | "alias": "Memory Requests %", 982 | "colorMode": null, 983 | "colors": [], 984 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 985 | "decimals": null, 986 | "link": false, 987 | "linkTooltip": "Drill down", 988 | "linkUrl": "", 989 | "pattern": "Value #C", 990 | "thresholds": [], 991 | "type": "number", 992 | "unit": "percentunit" 993 | }, 994 | { 995 | "alias": "Memory Limits", 996 | "colorMode": null, 997 | "colors": [], 998 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 999 | "decimals": 2, 1000 | "link": false, 1001 | "linkTooltip": "Drill down", 1002 | "linkUrl": "", 1003 | "pattern": "Value #D", 1004 | "thresholds": [], 1005 | "type": "number", 1006 | "unit": "bytes" 1007 | }, 1008 | { 1009 | "alias": "Memory Limits %", 1010 | "colorMode": null, 1011 | "colors": [], 1012 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1013 | "decimals": null, 1014 | "link": false, 1015 | "linkTooltip": "Drill down", 1016 | "linkUrl": "", 1017 | "pattern": "Value #E", 1018 | "thresholds": [], 1019 | "type": "number", 1020 | "unit": "percentunit" 1021 | }, 1022 | { 1023 | "alias": "Pod", 1024 | "colorMode": null, 1025 | "colors": [], 1026 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1027 | "decimals": 2, 1028 | "link": false, 1029 | "linkTooltip": "Drill down", 1030 | "linkUrl": "", 1031 | "pattern": "pod", 1032 | "thresholds": [], 1033 | "type": "number", 1034 | "unit": "short" 1035 | }, 1036 | { 1037 | "alias": "", 1038 | "colorMode": null, 1039 | "colors": [], 1040 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1041 | "decimals": 2, 1042 | "pattern": "/.*/", 1043 | "thresholds": [], 1044 | "type": "string", 1045 | "unit": "short" 1046 | } 1047 | ], 1048 | "targets": [ 1049 | { 1050 | "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!=\"\",pod_name=~\"$Pod\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod)", 1051 | "format": "table", 1052 | "instant": true, 1053 | "intervalFactor": 2, 1054 | "legendFormat": "", 1055 | "refId": "A", 1056 | "step": 10 1057 | }, 1058 | { 1059 | "expr": "sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod)", 1060 | "format": "table", 1061 | "instant": true, 1062 | "intervalFactor": 2, 1063 | "legendFormat": "", 1064 | "refId": "B", 1065 | "step": 10 1066 | }, 1067 | { 1068 | "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!=\"\",pod_name=~\"$Pod\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) \n/ sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod) ", 1069 | "format": "table", 1070 | "instant": true, 1071 | "intervalFactor": 2, 1072 | "legendFormat": "", 1073 | "refId": "C", 1074 | "step": 10 1075 | }, 1076 | { 1077 | "expr": "sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod)", 1078 | "format": "table", 1079 | "instant": true, 1080 | "intervalFactor": 2, 1081 | "legendFormat": "", 1082 | "refId": "D", 1083 | "step": 10 1084 | }, 1085 | { 1086 | "expr": "sum(label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!=\"\",pod_name=~\"$Pod\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")) by (pod) \n/ sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod) ", 1087 | "format": "table", 1088 | "instant": true, 1089 | "intervalFactor": 2, 1090 | "legendFormat": "", 1091 | "refId": "E", 1092 | "step": 10 1093 | } 1094 | ], 1095 | "thresholds": [], 1096 | "timeFrom": null, 1097 | "timeShift": null, 1098 | "title": "Memory Quota (Pods)", 1099 | "tooltip": { 1100 | "shared": true, 1101 | "sort": 0, 1102 | "value_type": "individual" 1103 | }, 1104 | "transform": "table", 1105 | "type": "table", 1106 | "xaxis": { 1107 | "buckets": null, 1108 | "mode": "time", 1109 | "name": null, 1110 | "show": true, 1111 | "values": [] 1112 | }, 1113 | "yaxes": [ 1114 | { 1115 | "format": "short", 1116 | "label": null, 1117 | "logBase": 1, 1118 | "max": null, 1119 | "min": 0, 1120 | "show": true 1121 | }, 1122 | { 1123 | "format": "short", 1124 | "label": null, 1125 | "logBase": 1, 1126 | "max": null, 1127 | "min": null, 1128 | "show": false 1129 | } 1130 | ] 1131 | }, 1132 | { 1133 | "aliasColors": {}, 1134 | "bars": false, 1135 | "columns": [], 1136 | "dashLength": 10, 1137 | "dashes": false, 1138 | "datasource": "$datasource", 1139 | "fill": 1, 1140 | "fontSize": "100%", 1141 | "gridPos": { 1142 | "h": 7, 1143 | "w": 12, 1144 | "x": 12, 1145 | "y": 26 1146 | }, 1147 | "id": 12, 1148 | "legend": { 1149 | "avg": false, 1150 | "current": false, 1151 | "max": false, 1152 | "min": false, 1153 | "show": true, 1154 | "total": false, 1155 | "values": false 1156 | }, 1157 | "lines": true, 1158 | "linewidth": 1, 1159 | "links": [], 1160 | "nullPointMode": "null as zero", 1161 | "pageSize": null, 1162 | "percentage": false, 1163 | "pointradius": 5, 1164 | "points": false, 1165 | "renderer": "flot", 1166 | "scroll": true, 1167 | "seriesOverrides": [], 1168 | "showHeader": true, 1169 | "sort": { 1170 | "col": 2, 1171 | "desc": true 1172 | }, 1173 | "spaceLength": 10, 1174 | "stack": false, 1175 | "steppedLine": false, 1176 | "styles": [ 1177 | { 1178 | "alias": "Time", 1179 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1180 | "pattern": "Time", 1181 | "type": "hidden" 1182 | }, 1183 | { 1184 | "alias": "Memory Usage", 1185 | "colorMode": null, 1186 | "colors": [], 1187 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1188 | "decimals": null, 1189 | "link": false, 1190 | "linkTooltip": "Drill down", 1191 | "linkUrl": "", 1192 | "pattern": "Value #A", 1193 | "thresholds": [], 1194 | "type": "number", 1195 | "unit": "bytes" 1196 | }, 1197 | { 1198 | "alias": "Memory Requests", 1199 | "colorMode": null, 1200 | "colors": [], 1201 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1202 | "decimals": null, 1203 | "link": false, 1204 | "linkTooltip": "Drill down", 1205 | "linkUrl": "", 1206 | "pattern": "Value #B", 1207 | "thresholds": [], 1208 | "type": "number", 1209 | "unit": "bytes" 1210 | }, 1211 | { 1212 | "alias": "Memory Requests %", 1213 | "colorMode": null, 1214 | "colors": [], 1215 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1216 | "decimals": 2, 1217 | "link": false, 1218 | "linkTooltip": "Drill down", 1219 | "linkUrl": "", 1220 | "pattern": "Value #C", 1221 | "thresholds": [], 1222 | "type": "number", 1223 | "unit": "percentunit" 1224 | }, 1225 | { 1226 | "alias": "Memory Limits", 1227 | "colorMode": null, 1228 | "colors": [], 1229 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1230 | "decimals": null, 1231 | "link": false, 1232 | "linkTooltip": "Drill down", 1233 | "linkUrl": "", 1234 | "pattern": "Value #D", 1235 | "thresholds": [], 1236 | "type": "number", 1237 | "unit": "bytes" 1238 | }, 1239 | { 1240 | "alias": "Memory Limits %", 1241 | "colorMode": null, 1242 | "colors": [], 1243 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1244 | "decimals": 2, 1245 | "link": false, 1246 | "linkTooltip": "Drill down", 1247 | "linkUrl": "", 1248 | "pattern": "Value #E", 1249 | "thresholds": [], 1250 | "type": "number", 1251 | "unit": "percentunit" 1252 | }, 1253 | { 1254 | "alias": "Pod", 1255 | "colorMode": null, 1256 | "colors": [], 1257 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1258 | "decimals": 2, 1259 | "link": false, 1260 | "linkTooltip": "Drill down", 1261 | "linkUrl": "", 1262 | "pattern": "pod", 1263 | "thresholds": [], 1264 | "type": "string", 1265 | "unit": "short" 1266 | }, 1267 | { 1268 | "alias": "Container", 1269 | "colorMode": null, 1270 | "colors": [ 1271 | "rgba(245, 54, 54, 0.9)", 1272 | "rgba(237, 129, 40, 0.89)", 1273 | "rgba(50, 172, 45, 0.97)" 1274 | ], 1275 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1276 | "decimals": 2, 1277 | "mappingType": 1, 1278 | "pattern": "container", 1279 | "thresholds": [], 1280 | "type": "string", 1281 | "unit": "short" 1282 | }, 1283 | { 1284 | "alias": "", 1285 | "colorMode": null, 1286 | "colors": [], 1287 | "dateFormat": "YYYY-MM-DD HH:mm:ss", 1288 | "decimals": 2, 1289 | "pattern": "/.*/", 1290 | "thresholds": [], 1291 | "type": "string", 1292 | "unit": "short" 1293 | } 1294 | ], 1295 | "targets": [ 1296 | { 1297 | "expr": "sum(label_replace(\n label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!=\"\",pod_name=~\"$Pod\",container_name!=\"POD\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n ,\"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container) ", 1298 | "format": "table", 1299 | "instant": true, 1300 | "intervalFactor": 2, 1301 | "legendFormat": "", 1302 | "refId": "A", 1303 | "step": 10 1304 | }, 1305 | { 1306 | "expr": "sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod,container)", 1307 | "format": "table", 1308 | "instant": true, 1309 | "intervalFactor": 2, 1310 | "legendFormat": "", 1311 | "refId": "B", 1312 | "step": 10 1313 | }, 1314 | { 1315 | "expr": "sum(label_replace(\n label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!~\"POD|\",pod_name=~\"$Pod\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n ,\"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container) \n/ sum(kube_pod_container_resource_requests_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod,container)", 1316 | "format": "table", 1317 | "instant": true, 1318 | "intervalFactor": 2, 1319 | "legendFormat": "", 1320 | "refId": "C", 1321 | "step": 10 1322 | }, 1323 | { 1324 | "expr": "sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod,container)", 1325 | "format": "table", 1326 | "instant": true, 1327 | "intervalFactor": 2, 1328 | "legendFormat": "", 1329 | "refId": "D", 1330 | "step": 10 1331 | }, 1332 | { 1333 | "expr": "sum(label_replace(\n label_replace(container_memory_usage_bytes{namespace=\"$Namespace\",container_name!~\"POD|\",pod_name=~\"$Pod\",cluster=\"$cluster\"}, \"pod\", \"$1\", \"pod_name\", \"(.*)\")\n ,\"container\", \"$1\", \"container_name\", \"(.*)\")\n ) by (pod,container) \n/ sum(kube_pod_container_resource_limits_memory_bytes{namespace=\"$Namespace\",pod=~\"$Pod\",cluster=\"$cluster\"}) by (pod,container)", 1334 | "format": "table", 1335 | "instant": true, 1336 | "intervalFactor": 2, 1337 | "legendFormat": "", 1338 | "refId": "E", 1339 | "step": 10 1340 | } 1341 | ], 1342 | "thresholds": [], 1343 | "timeFrom": null, 1344 | "timeShift": null, 1345 | "title": "Memory Quota (Containers)", 1346 | "tooltip": { 1347 | "shared": true, 1348 | "sort": 0, 1349 | "value_type": "individual" 1350 | }, 1351 | "transform": "table", 1352 | "type": "table", 1353 | "xaxis": { 1354 | "buckets": null, 1355 | "mode": "time", 1356 | "name": null, 1357 | "show": true, 1358 | "values": [] 1359 | }, 1360 | "yaxes": [ 1361 | { 1362 | "format": "short", 1363 | "label": null, 1364 | "logBase": 1, 1365 | "max": null, 1366 | "min": 0, 1367 | "show": true 1368 | }, 1369 | { 1370 | "format": "short", 1371 | "label": null, 1372 | "logBase": 1, 1373 | "max": null, 1374 | "min": null, 1375 | "show": false 1376 | } 1377 | ] 1378 | } 1379 | ], 1380 | "refresh": "10s", 1381 | "schemaVersion": 16, 1382 | "style": "dark", 1383 | "tags": [], 1384 | "templating": { 1385 | "list": [ 1386 | { 1387 | "allValue": null, 1388 | "current": {}, 1389 | "datasource": "$datasource", 1390 | "definition": "label_values(kube_pod_info,cluster)", 1391 | "hide": 0, 1392 | "includeAll": false, 1393 | "label": null, 1394 | "multi": false, 1395 | "name": "cluster", 1396 | "options": [], 1397 | "query": "label_values(kube_pod_info,cluster)", 1398 | "refresh": 1, 1399 | "regex": "", 1400 | "skipUrlSync": false, 1401 | "sort": 0, 1402 | "tagValuesQuery": "", 1403 | "tags": [], 1404 | "tagsQuery": "", 1405 | "type": "query", 1406 | "useTags": false 1407 | }, 1408 | { 1409 | "allValue": null, 1410 | "current": {}, 1411 | "datasource": "$datasource", 1412 | "definition": "", 1413 | "hide": 0, 1414 | "includeAll": false, 1415 | "label": "Project", 1416 | "multi": false, 1417 | "name": "Namespace", 1418 | "options": [], 1419 | "query": "label_values(kube_pod_info, namespace)", 1420 | "refresh": 1, 1421 | "regex": "", 1422 | "skipUrlSync": false, 1423 | "sort": 2, 1424 | "tagValuesQuery": "", 1425 | "tags": [], 1426 | "tagsQuery": "", 1427 | "type": "query", 1428 | "useTags": false 1429 | }, 1430 | { 1431 | "allValue": null, 1432 | "current": {}, 1433 | "datasource": "$datasource", 1434 | "definition": "label_values(kube_pod_info{cluster=\"$cluster\",namespace=\"$Namespace\"}, pod) ", 1435 | "hide": 0, 1436 | "includeAll": true, 1437 | "label": null, 1438 | "multi": true, 1439 | "name": "Pod", 1440 | "options": [], 1441 | "query": "label_values(kube_pod_info{cluster=\"$cluster\",namespace=\"$Namespace\"}, pod) ", 1442 | "refresh": 2, 1443 | "regex": "", 1444 | "skipUrlSync": false, 1445 | "sort": 0, 1446 | "tagValuesQuery": "", 1447 | "tags": [], 1448 | "tagsQuery": "", 1449 | "type": "query", 1450 | "useTags": false 1451 | }, 1452 | { 1453 | "current": { 1454 | "selected": true, 1455 | "text": "prometheus", 1456 | "value": "prometheus" 1457 | }, 1458 | "hide": 0, 1459 | "label": null, 1460 | "name": "datasource", 1461 | "options": [], 1462 | "query": "prometheus", 1463 | "refresh": 1, 1464 | "regex": "", 1465 | "skipUrlSync": false, 1466 | "type": "datasource" 1467 | } 1468 | ] 1469 | }, 1470 | "time": { 1471 | "from": "now-1h", 1472 | "to": "now" 1473 | }, 1474 | "timepicker": { 1475 | "refresh_intervals": [ 1476 | "5s", 1477 | "10s", 1478 | "30s", 1479 | "1m", 1480 | "5m", 1481 | "15m", 1482 | "30m", 1483 | "1h", 1484 | "2h", 1485 | "1d" 1486 | ], 1487 | "time_options": [ 1488 | "5m", 1489 | "15m", 1490 | "1h", 1491 | "6h", 1492 | "12h", 1493 | "24h", 1494 | "2d", 1495 | "7d", 1496 | "30d" 1497 | ] 1498 | }, 1499 | "timezone": "", 1500 | "title": "Pods in Namespace", 1501 | "uid": "pods-in-namespaces", 1502 | "version": 33 1503 | } --------------------------------------------------------------------------------