diff --git a/charts/cloudnative-pg/monitoring/grafana-dashboard.json b/charts/cloudnative-pg/monitoring/grafana-dashboard.json index 2a26f46db..40318cb1c 100644 --- a/charts/cloudnative-pg/monitoring/grafana-dashboard.json +++ b/charts/cloudnative-pg/monitoring/grafana-dashboard.json @@ -147,7 +147,7 @@ }, "id": 676, "options": { - "alertInstanceLabelFilter": "{namespace=~\"$namespace\",pod=~\"$cluster-[0-9]+$\"}", + "alertInstanceLabelFilter": "{namespace=~\"$namespace\",pod=~\"$instances\"}", "alertName": "", "dashboardAlerts": false, "folder": "", @@ -351,7 +351,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "max(cnpg_pg_replication_streaming_replicas{namespace=~\"$namespace\"} - cnpg_pg_replication_is_wal_receiver_up{namespace=~\"$namespace\"})", + "expr": "max(cnpg_pg_replication_streaming_replicas{namespace=~\"$namespace\", pod=~\"$instances\"} - cnpg_pg_replication_is_wal_receiver_up{namespace=~\"$namespace\", pod=~\"$instances\"})", "legendFormat": "Replication", "range": true, "refId": "A" @@ -364,7 +364,7 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "Low disk space or low inode count will result in data loss.", + "description": "High lag indicates issue with replication. Network or storage interfaces may not have enough bandwidth to handle incoming traffic and replication at the same time.", "fieldConfig": { "defaults": { "color": { @@ -481,6 +481,17 @@ "legendFormat": "Lag", "range": true, "refId": "LAG" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "expr": "", + "hide": false, + "instant": false, + "range": true, + "refId": "A" } ], "type": "stat" @@ -773,7 +784,19 @@ "color": { "mode": "thresholds" }, - "mappings": [], + "mappings": [ + { + "options": { + "match": "null", + "result": { + "color": "text", + "index": 0, + "text": "No requests" + } + }, + "type": "special" + } + ], "max": 1, "min": 0, "thresholds": { @@ -830,7 +853,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{ namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", namespace=\"$namespace\", resource=\"cpu\"})", + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$instances\"}) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", namespace=\"$namespace\", resource=\"cpu\", pod=~\"$instances\"})", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -851,7 +874,19 @@ "color": { "mode": "thresholds" }, - "mappings": [], + "mappings": [ + { + "options": { + "match": "null", + "result": { + "color": "text", + "index": 0, + "text": "No requests" + } + }, + "type": "special" + } + ], "max": 1, "min": 0, "thresholds": { @@ -908,7 +943,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "sum(container_memory_working_set_bytes{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(max by(pod) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", namespace=\"$namespace\", resource=\"memory\"}))", + "expr": "sum(container_memory_working_set_bytes{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", namespace=\"$namespace\",container!=\"\", image!=\"\", pod=~\"$instances\"}) / sum(max by(pod) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", namespace=\"$namespace\", resource=\"memory\", pod=~\"$instances\"}))", "format": "time_series", "instant": true, "intervalFactor": 2, @@ -1399,7 +1434,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "(sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{ namespace=\"$namespace\"}) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", namespace=\"$namespace\", resource=\"cpu\"}))", + "expr": "(sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{ namespace=\"$namespace\", pod=~\"$instances\"}) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\", namespace=\"$namespace\", resource=\"cpu\", pod=~\"$instances\"}))", "hide": false, "legendFormat": "CPU", "range": true, @@ -1411,7 +1446,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "(sum(container_memory_working_set_bytes{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", namespace=\"$namespace\",container!=\"\", image!=\"\"}) / sum(max by(pod) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", namespace=\"$namespace\", resource=\"memory\"})))", + "expr": "(sum(container_memory_working_set_bytes{job=\"kubelet\", metrics_path=\"/metrics/cadvisor\", namespace=\"$namespace\",container!=\"\", image!=\"\", pod=~\"$instances\"}) / sum(max by(pod) (kube_pod_container_resource_requests{job=\"kube-state-metrics\", namespace=\"$namespace\", resource=\"memory\", pod=~\"$instances\"})))", "hide": false, "instant": false, "legendFormat": "Memory", @@ -1424,25 +1459,12 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": " (max(sum by (pod) (cnpg_backends_total{namespace=~\"$namespace\",pod=~\"$instances\"}) / sum by (pod) (cnpg_pg_settings_setting{name=\"max_connections\",namespace=~\"$namespace\",pod=~\"$instances\"})))", + "expr": " (max(sum by (pod) (cnpg_backends_total{namespace=~\"$namespace\", pod=~\"$instances\"}) / sum by (pod) (cnpg_pg_settings_setting{name=\"max_connections\", namespace=~\"$namespace\", pod=~\"$instances\"})))", "hide": false, "instant": false, "legendFormat": "Connections", "range": true, "refId": "CONNS" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "max( CPU or MEM or CONNS )", - "hide": true, - "instant": false, - "legendFormat": "Resources", - "range": true, - "refId": "RESOURCES" } ], "type": "stat" @@ -1683,7 +1705,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "max(cnpg_pg_stat_replication_flush_lag_seconds{namespace=~\"$namespace\",pod=~\"$cluster-[0-9]+$\"})", + "expr": "max(cnpg_pg_stat_replication_flush_lag_seconds{namespace=~\"$namespace\",pod=~\"$instances\"})", "legendFormat": "__auto", "range": true, "refId": "A" @@ -1760,7 +1782,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "max(cnpg_pg_stat_replication_replay_lag_seconds{namespace=~\"$namespace\",pod=~\"$cluster-[0-9]+$\"})", + "expr": "max(cnpg_pg_stat_replication_replay_lag_seconds{namespace=~\"$namespace\",pod=~\"$instances\"})", "legendFormat": "__auto", "range": true, "refId": "A" @@ -1934,7 +1956,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "time() - max(cnpg_collector_last_available_backup_timestamp{namespace=\"$namespace\"})", + "expr": "time() - max(cnpg_collector_last_available_backup_timestamp{namespace=\"$namespace\", pod=~\"$instances\"})", "legendFormat": "Backups", "range": true, "refId": "BACKUPS" @@ -2107,7 +2129,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "max((1 - cnpg_pg_replication_in_recovery{namespace=~\"$namespace\",pod=~\"$instances\"}) * (time() - timestamp(cnpg_pg_stat_archiver_seconds_since_last_archival{namespace=~\"$namespace\",pod=~\"$instances\"}) +\ncnpg_pg_stat_archiver_seconds_since_last_archival{namespace=~\"$namespace\",pod=~\"$instances\"}))", + "expr": "max((1 - cnpg_pg_replication_in_recovery{namespace=~\"$namespace\", pod=~\"$instances\"}) * (time() - timestamp(cnpg_pg_stat_archiver_seconds_since_last_archival{namespace=~\"$namespace\", pod=~\"$instances\"}) +\ncnpg_pg_stat_archiver_seconds_since_last_archival{namespace=~\"$namespace\", pod=~\"$instances\"}))", "hide": false, "instant": false, "legendFormat": "WAL", @@ -2122,7 +2144,7 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "The operator reconcile errors are for all database cluster or namespaces", + "description": "Online if there is at least one ready operator pod", "fieldConfig": { "defaults": { "color": { @@ -2224,7 +2246,7 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "The operator reconcile errors are for all database cluster or namespaces", + "description": "The operator reconcile errors don't distinguish between database cluster or namespaces.", "fieldConfig": { "defaults": { "color": { @@ -2249,7 +2271,7 @@ "index": 1, "text": "Backup" }, - "to": 10 + "to": 9 }, "type": "range" }, @@ -2261,7 +2283,7 @@ "index": 2, "text": "Cluster" }, - "to": 100 + "to": 99 }, "type": "range" }, @@ -2273,7 +2295,7 @@ "index": 3, "text": "Pooler" }, - "to": 1000 + "to": 999 }, "type": "range" }, @@ -2285,7 +2307,7 @@ "index": 4, "text": "Scheduled Backup" }, - "to": 10000 + "to": 9999 }, "type": "range" } @@ -2470,7 +2492,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{ namespace=\"$namespace\"})", + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{namespace=\"$namespace\", pod=~\"$instances\"})", "hide": false, "interval": "", "legendFormat": "Total", @@ -3410,8 +3432,9 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "editorMode": "code", "exemplar": true, - "expr": "cnpg_pg_replication_streaming_replicas{namespace=~\"$namespace\",pod=~\"$instances\"}", + "expr": "cnpg_pg_replication_streaming_replicas{namespace=~\"$namespace\", pod=~\"$instances\"}", "instant": true, "interval": "", "legendFormat": "{{pod}}", @@ -3483,7 +3506,7 @@ }, "editorMode": "code", "exemplar": true, - "expr": "kube_pod_info{namespace=~\"$namespace\",pod=~\"$instances\"} * on(node,instance) group_left(label_topology_kubernetes_io_zone) kube_node_labels", + "expr": "kube_pod_info{namespace=~\"$namespace\", pod=~\"$instances\"} * on(node,instance) group_left(label_topology_kubernetes_io_zone) kube_node_labels", "format": "table", "instant": true, "interval": "", @@ -3582,8 +3605,9 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "editorMode": "code", "exemplar": true, - "expr": "sum by (pod) (cnpg_backends_total{namespace=~\"$namespace\",pod=~\"$instances\"})", + "expr": "sum by (pod) (cnpg_backends_total{namespace=~\"$namespace\", pod=~\"$instances\"})", "instant": false, "interval": "", "legendFormat": "-", @@ -3662,8 +3686,9 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "editorMode": "code", "exemplar": true, - "expr": "100 * sum by (pod) (cnpg_backends_total{namespace=~\"$namespace\",pod=~\"$instances\"}) / sum by (pod) (cnpg_pg_settings_setting{name=\"max_connections\",namespace=~\"$namespace\",pod=~\"$instances\"})", + "expr": "100 * sum by (pod) (cnpg_backends_total{namespace=~\"$namespace\", pod=~\"$instances\"}) / sum by (pod) (cnpg_pg_settings_setting{name=\"max_connections\", namespace=~\"$namespace\", pod=~\"$instances\"})", "instant": true, "interval": "", "legendFormat": "{{pod}}", @@ -3742,8 +3767,9 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "editorMode": "code", "exemplar": true, - "expr": "max by (pod) (cnpg_pg_database_xid_age{namespace=~\"$namespace\",pod=~\"$instances\"})", + "expr": "max by (pod) (cnpg_pg_database_xid_age{namespace=~\"$namespace\", pod=~\"$instances\"})", "instant": true, "interval": "", "legendFormat": "{{pod}}", @@ -3811,8 +3837,9 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "editorMode": "code", "exemplar": false, - "expr": "cnpg_pg_postmaster_start_time{namespace=~\"$namespace\",pod=~\"$instances\"}*1000", + "expr": "cnpg_pg_postmaster_start_time{namespace=~\"$namespace\", pod=~\"$instances\"}*1000", "format": "time_series", "hide": false, "instant": true, @@ -3886,7 +3913,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "cnpg_collector_postgres_version{namespace=~\"$namespace\",pod=~\"$instances\"}", + "expr": "cnpg_collector_postgres_version{namespace=~\"$namespace\", pod=~\"$instances\"}", "format": "table", "hide": false, "instant": true, @@ -3900,7 +3927,7 @@ "type": "stat" }, { - "collapsed": false, + "collapsed": true, "datasource": { "uid": "${DS_PROMETHEUS}" }, @@ -3908,1047 +3935,1416 @@ "h": 1, "w": 24, "x": 0, - "y": 18 + "y": 15 }, "id": 41, - "panels": [], - "targets": [ - { - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, - "refId": "A" - } - ], - "title": "Configuration", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 3, - "x": 0, - "y": 19 - }, - "id": 187, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "", - "mode": "html" - }, - "pluginVersion": "10.3.1", - "repeatDirection": "v", - "targets": [ + "panels": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "Instance", - "transparent": true, - "type": "text" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 3, - "x": 3, - "y": 19 - }, - "id": 183, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false + "gridPos": { + "h": 1, + "w": 3, + "x": 0, + "y": 17 + }, + "id": 187, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "html" + }, + "pluginVersion": "10.3.1", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "Instance", + "transparent": true, + "type": "text" }, - "content": "", - "mode": "html" - }, - "pluginVersion": "10.3.1", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "Max Connections", - "type": "text" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 3, - "x": 6, - "y": 19 - }, - "id": 184, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false + "gridPos": { + "h": 1, + "w": 3, + "x": 3, + "y": 17 + }, + "id": 183, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "html" + }, + "pluginVersion": "10.3.1", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "Max Connections", + "type": "text" }, - "content": "", - "mode": "html" - }, - "pluginVersion": "10.3.1", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "Shared Buffers", - "type": "text" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 3, - "x": 9, - "y": 19 - }, - "id": 185, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false + "gridPos": { + "h": 1, + "w": 3, + "x": 6, + "y": 17 + }, + "id": 184, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "html" + }, + "pluginVersion": "10.3.1", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "Shared Buffers", + "type": "text" }, - "content": "", - "mode": "html" - }, - "pluginVersion": "10.3.1", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "Effective Cache Size", - "type": "text" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 3, - "x": 12, - "y": 19 - }, - "id": 186, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false + "gridPos": { + "h": 1, + "w": 3, + "x": 9, + "y": 17 + }, + "id": 185, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "html" + }, + "pluginVersion": "10.3.1", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "Effective Cache Size", + "type": "text" }, - "content": "", - "mode": "html" - }, - "pluginVersion": "10.3.1", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "Work Mem", - "type": "text" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 3, - "x": 15, - "y": 19 - }, - "id": 188, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false + "gridPos": { + "h": 1, + "w": 3, + "x": 12, + "y": 17 + }, + "id": 186, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "html" + }, + "pluginVersion": "10.3.1", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "Work Mem", + "type": "text" }, - "content": "", - "mode": "html" - }, - "pluginVersion": "10.3.1", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "Maintenance Work Mem", - "type": "text" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 3, - "x": 18, - "y": 19 - }, - "id": 189, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false + "gridPos": { + "h": 1, + "w": 3, + "x": 15, + "y": 17 + }, + "id": 188, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "html" + }, + "pluginVersion": "10.3.1", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "Maintenance Work Mem", + "type": "text" }, - "content": "", - "mode": "html" - }, - "pluginVersion": "10.3.1", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "Random Page Cost", - "type": "text" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 3, - "x": 21, - "y": 19 - }, - "id": 190, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false + "gridPos": { + "h": 1, + "w": 3, + "x": 18, + "y": 17 + }, + "id": 189, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "html" + }, + "pluginVersion": "10.3.1", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "Random Page Cost", + "type": "text" }, - "content": "", - "mode": "html" - }, - "pluginVersion": "10.3.1", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "Sequential Page Cost", - "type": "text" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 20 - }, - "id": 86, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false + "gridPos": { + "h": 1, + "w": 3, + "x": 21, + "y": 17 + }, + "id": 190, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "html" + }, + "pluginVersion": "10.3.1", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "Sequential Page Cost", + "type": "text" }, - "content": "\n \n

$instances

\n
", - "mode": "html" - }, - "pluginVersion": "10.3.1", - "repeat": "instances", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "type": "text" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 18 }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-purple", - "value": null - } - ] + "id": 86, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "\n \n

$instances

\n
", + "mode": "html" }, - "unitScale": true - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 20 - }, - "id": 30, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" + "pluginVersion": "10.3.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } ], - "fields": "", - "values": false + "type": "text" }, - "showPercentChange": false, - "text": {}, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.3.1", - "repeat": "instances", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "cnpg_pg_settings_setting{name=\"max_connections\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple" + } + ] + }, + "unitScale": true + }, + "overrides": [] }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-purple", - "value": null - } - ] + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 18 }, - "unit": "bytes", - "unitScale": true - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 20 - }, - "id": 24, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" + "id": 30, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "cnpg_pg_settings_setting{name=\"max_connections\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } ], - "fields": "", - "values": false + "type": "stat" }, - "showPercentChange": false, - "text": {}, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.3.1", - "repeat": "instances", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "max by (pod) (cnpg_pg_settings_setting{name=\"shared_buffers\",namespace=~\"$namespace\",pod=~\"$instances\"}) * max by (pod) (cnpg_pg_settings_setting{name=\"block_size\",namespace=~\"$namespace\",pod=~\"$instances\"})", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple" + } + ] + }, + "unit": "bytes", + "unitScale": true + }, + "overrides": [] }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-purple", - "value": null - } - ] + "gridPos": { + "h": 3, + "w": 3, + "x": 6, + "y": 18 }, - "unit": "bytes", - "unitScale": true - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 20 - }, - "id": 57, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" + "id": 24, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "max by (pod) (cnpg_pg_settings_setting{name=\"shared_buffers\",namespace=~\"$namespace\",pod=~\"$instances\"}) * max by (pod) (cnpg_pg_settings_setting{name=\"block_size\",namespace=~\"$namespace\",pod=~\"$instances\"})", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } ], - "fields": "", - "values": false + "type": "stat" }, - "showPercentChange": false, - "text": {}, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.3.1", - "repeat": "instances", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "max by (pod) (cnpg_pg_settings_setting{name=\"effective_cache_size\",namespace=~\"$namespace\",pod=~\"$instances\"}) * max by (pod) (cnpg_pg_settings_setting{name=\"block_size\",namespace=~\"$namespace\",pod=~\"$instances\"})", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple" + } + ] + }, + "unit": "bytes", + "unitScale": true + }, + "overrides": [] }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-purple", - "value": null - } - ] + "gridPos": { + "h": 3, + "w": 3, + "x": 9, + "y": 18 }, - "unit": "bytes", - "unitScale": true - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 20 - }, - "id": 26, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" + "id": 57, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "max by (pod) (cnpg_pg_settings_setting{name=\"effective_cache_size\",namespace=~\"$namespace\",pod=~\"$instances\"}) * max by (pod) (cnpg_pg_settings_setting{name=\"block_size\",namespace=~\"$namespace\",pod=~\"$instances\"})", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } ], - "fields": "", - "values": false + "type": "stat" }, - "showPercentChange": false, - "text": {}, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.3.1", - "repeat": "instances", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "cnpg_pg_settings_setting{name=\"work_mem\",namespace=~\"$namespace\",pod=~\"$instances\"} * 1024", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple" + } + ] + }, + "unit": "bytes", + "unitScale": true + }, + "overrides": [] }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-purple", - "value": null - } - ] + "gridPos": { + "h": 3, + "w": 3, + "x": 12, + "y": 18 }, - "unit": "bytes", - "unitScale": true - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 20 - }, - "id": 47, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" + "id": 26, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "cnpg_pg_settings_setting{name=\"work_mem\",namespace=~\"$namespace\",pod=~\"$instances\"} * 1024", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } ], - "fields": "", - "values": false + "type": "stat" }, - "showPercentChange": false, - "text": {}, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.3.1", - "repeat": "instances", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "cnpg_pg_settings_setting{name=\"maintenance_work_mem\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple" + } + ] + }, + "unit": "bytes", + "unitScale": true + }, + "overrides": [] }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-purple", - "value": null - } - ] + "gridPos": { + "h": 3, + "w": 3, + "x": 15, + "y": 18 }, - "unit": "none", - "unitScale": true + "id": 47, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "cnpg_pg_settings_setting{name=\"maintenance_work_mem\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "type": "stat" }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 20 - }, - "id": 48, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple" + } + ] + }, + "unit": "none", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 18, + "y": 18 + }, + "id": 48, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "cnpg_pg_settings_setting{name=\"random_page_cost\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } ], - "fields": "", - "values": false + "type": "stat" }, - "showPercentChange": false, - "text": {}, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.3.1", - "repeat": "instances", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "cnpg_pg_settings_setting{name=\"random_page_cost\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple" + } + ] + }, + "unit": "none", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 21, + "y": 18 + }, + "id": 56, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "cnpg_pg_settings_setting{name=\"seq_page_cost\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple" + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 150, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "10.3.1", + "repeatDirection": "v", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "cnpg_pg_settings_setting{namespace=~\"$namespace\",pod=~\"$instances\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "Configurations", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "__name__": true, + "container": true, + "endpoint": true, + "instance": true, + "job": true, + "name": false, + "namespace": true, + "pod": false + }, + "indexByName": { + "Time": 0, + "Value": 9, + "__name__": 1, + "container": 2, + "endpoint": 3, + "instance": 4, + "job": 5, + "name": 7, + "namespace": 8, + "pod": 6 + }, + "renameByName": { + "__name__": "", + "name": "parameter" + } + } + }, + { + "id": "groupingToMatrix", + "options": { + "columnField": "pod", + "rowField": "parameter", + "valueField": "Value" + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "parameter\\pod": "parameter" + } + } + } + ], + "type": "table" + } + ], + "targets": [ + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, "refId": "A" } ], - "type": "stat" + "title": "Configuration", + "type": "row" }, { + "collapsed": true, "datasource": { - "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 16 + }, + "id": 10, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-purple", - "value": null - } - ] + "fieldConfig": { + "defaults": { + "unitScale": true + }, + "overrides": [] }, - "unit": "none", - "unitScale": true + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 47 + }, + "hiddenSeries": false, + "id": 273, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.3.1", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{pod=~\"$instances\", namespace=~\"$namespace\"}) by (pod)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{pod=~\"$instances\", namespace=~\"$namespace\"})", + "hide": false, + "interval": "", + "legendFormat": "total", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "CPU Usage", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:189", + "format": "short", + "logBase": 1, + "min": 0, + "show": true + }, + { + "$$hashKey": "object:190", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 21, - "y": 20 - }, - "id": 56, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "unitScale": true + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 47 + }, + "hiddenSeries": false, + "id": 275, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.3.1", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "quota - requests", + "color": "#F2495C", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + }, + { + "alias": "quota - limits", + "color": "#FF9830", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{pod=~\"$instances\", namespace=\"$namespace\", container!=\"\", image!=\"\"}) by (pod)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 10 + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{pod=~\"$instances\", namespace=\"$namespace\", container!=\"\", image!=\"\"})", + "hide": false, + "interval": "", + "legendFormat": "total", + "refId": "B" + } ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": {}, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.3.1", - "repeat": "instances", - "repeatDirection": "v", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "thresholds": [], + "timeRegions": [], + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" }, - "exemplar": true, - "expr": "cnpg_pg_settings_setting{name=\"seq_page_cost\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" + "yaxes": [ + { + "$$hashKey": "object:246", + "format": "bytes", + "logBase": 1, + "min": 0, + "show": true }, - "filterable": true, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-purple", - "value": null - } - ] - }, - "unitScale": true - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 29 - }, - "id": 150, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" + { + "$$hashKey": "object:247", + "format": "short", + "logBase": 1, + "show": false + } ], - "show": false + "yaxis": { + "align": false + } }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.3.1", - "repeatDirection": "v", - "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "cnpg_pg_settings_setting{namespace=~\"$namespace\",pod=~\"$instances\"}", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "Configurations", - "transformations": [ - { - "id": "organize", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 54 + }, + "id": 39, "options": { - "excludeByName": { - "Time": true, - "__name__": true, - "container": true, - "endpoint": true, - "instance": true, - "job": true, - "name": false, - "namespace": true, - "pod": false - }, - "indexByName": { - "Time": 0, - "Value": 9, - "__name__": 1, - "container": 2, - "endpoint": 3, - "instance": 4, - "job": 5, - "name": 7, - "namespace": 8, - "pod": 6 - }, - "renameByName": { - "__name__": "", - "name": "parameter" + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - } - }, - { - "id": "groupingToMatrix", - "options": { - "columnField": "pod", - "rowField": "parameter", - "valueField": "Value" - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": {}, - "renameByName": { - "parameter\\pod": "parameter" + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "sum(cnpg_backends_total{namespace=~\"$namespace\",pod=~\"$instances\"}) by (pod)", + "hide": false, + "interval": "", + "legendFormat": "total ({{pod}})", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "sum(cnpg_backends_total{namespace=~\"$namespace\",pod=~\"$instances\"}) by (state, pod)", + "interval": "", + "legendFormat": "{{state}} ({{pod}})", + "refId": "A" } - } - } - ], - "type": "table" - }, - { - "collapsed": true, - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 38 - }, - "id": 10, - "panels": [ + ], + "title": "Session States", + "type": "timeseries" + }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, "unitScale": true }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 0, - "y": 39 - }, - "hiddenSeries": false, - "id": 273, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false + "y": 62 }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null as zero", + "id": 50, "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "10.3.1", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { "datasource": { @@ -4956,13 +5352,10 @@ "uid": "${DS_PROMETHEUS}" }, "exemplar": true, - "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{pod=~\"$instances\", namespace=~\"$namespace\"}) by (pod)", - "format": "time_series", + "expr": "sum(rate(cnpg_pg_stat_database_xact_commit{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])) by (pod)", "interval": "", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "refId": "A", - "step": 10 + "legendFormat": "committed ({{pod}})", + "refId": "A" }, { "datasource": { @@ -4970,119 +5363,188 @@ "uid": "${DS_PROMETHEUS}" }, "exemplar": true, - "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{pod=~\"$instances\", namespace=~\"$namespace\"})", + "expr": "sum(rate(cnpg_pg_stat_database_xact_rollback{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])) by (pod)", "hide": false, "interval": "", - "legendFormat": "total", + "legendFormat": "rolled back ({{pod}})", "refId": "B" } ], - "thresholds": [], - "timeRegions": [], - "title": "CPU Usage", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:189", - "format": "short", - "logBase": 1, - "min": 0, - "show": true - }, - { - "$$hashKey": "object:190", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "title": "Transactions [5m]", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "description": "", "fieldConfig": { "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s", "unitScale": true }, "overrides": [] }, - "fill": 2, - "fillGradient": 0, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 12, - "y": 39 + "y": 62 }, - "hiddenSeries": false, - "id": 275, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "max by (pod) (cnpg_backends_max_tx_duration_seconds{namespace=~\"$namespace\",pod=~\"$instances\"})", + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "Longest Transaction", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null as zero", - "options": { - "alertThreshold": true + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 70 }, - "percentage": false, - "pluginVersion": "10.3.1", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "quota - requests", - "color": "#F2495C", - "dashes": true, - "fill": 0, - "hiddenSeries": true, - "hideTooltip": true, - "legend": true, - "linewidth": 2, - "stack": false + "id": 55, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - { - "alias": "quota - limits", - "color": "#FF9830", - "dashes": true, - "fill": 0, - "hiddenSeries": true, - "hideTooltip": true, - "legend": true, - "linewidth": 2, - "stack": false + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, "targets": [ { "datasource": { @@ -5090,59 +5552,16 @@ "uid": "${DS_PROMETHEUS}" }, "exemplar": true, - "expr": "sum(container_memory_working_set_bytes{pod=~\"$instances\", namespace=\"$namespace\", container!=\"\", image!=\"\"}) by (pod)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{pod}}", - "refId": "A", - "step": 10 - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "exemplar": true, - "expr": "sum(container_memory_working_set_bytes{pod=~\"$instances\", namespace=\"$namespace\", container!=\"\", image!=\"\"})", + "expr": "rate(cnpg_pg_stat_database_deadlocks{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", "hide": false, + "instant": false, "interval": "", - "legendFormat": "total", + "legendFormat": "count ({{pod}})", "refId": "B" } ], - "thresholds": [], - "timeRegions": [], - "title": "Memory Usage (w/o cache)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:246", - "format": "bytes", - "logBase": 1, - "min": 0, - "show": true - }, - { - "$$hashKey": "object:247", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "title": "Deadlocks [5m]", + "type": "timeseries" }, { "datasource": { @@ -5156,7 +5575,6 @@ "mode": "palette-classic" }, "custom": { - "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -5164,13 +5582,12 @@ "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, - "gradientMode": "opacity", + "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, - "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -5193,59 +5610,251 @@ "steps": [ { "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 70 + }, + "id": 54, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "cnpg_backends_waiting_total{namespace=~\"$namespace\",pod=~\"$instances\"}", + "interval": "", + "legendFormat": "{{pod}}", + "refId": "A" + } + ], + "title": "Blocked Queries", + "type": "timeseries" + } + ], + "targets": [ + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "refId": "A" + } + ], + "title": "Operational Stats", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 35, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "#EAB839", + "value": 0.7 + }, + { + "color": "red", + "value": 0.8 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 92 + }, + "id": 424, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "10.1.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "max by(persistentvolumeclaim) (1 - kubelet_volume_stats_available_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"$instances\"} / kubelet_volume_stats_capacity_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"$instances\"})", + "format": "time_series", + "interval": "", + "legendFormat": "{{persistentvolumeclaim}}", + "range": true, + "refId": "FREE_SPACE" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "max by(persistentvolumeclaim) (1 - kubelet_volume_stats_available_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-wal\"} / kubelet_volume_stats_capacity_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-wal\"})", + "format": "time_series", + "interval": "", + "legendFormat": "{{persistentvolumeclaim}}", + "range": true, + "refId": "FREE_SPACE_WAL" + } + ], + "title": "Volume Space Usage: PGDATA and WAL", + "transformations": [], + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "#EAB839", + "value": 0.8 + }, + { + "color": "red", + "value": 0.9 } ] }, - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, "gridPos": { "h": 8, - "w": 24, - "x": 0, - "y": 46 + "w": 12, + "x": 12, + "y": 92 }, - "id": 39, + "id": 426, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "showThresholdLabels": false, + "showThresholdMarkers": true }, + "pluginVersion": "10.1.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "sum(cnpg_backends_total{namespace=~\"$namespace\",pod=~\"$instances\"}) by (pod)", - "hide": false, + "editorMode": "code", + "expr": "max by(persistentvolumeclaim) (kubelet_volume_stats_inodes_used{namespace=\"$namespace\", persistentvolumeclaim=~\"$instances\"} / kubelet_volume_stats_inodes{namespace=\"$namespace\", persistentvolumeclaim=~\"$instances\"})", + "format": "time_series", "interval": "", - "legendFormat": "total ({{pod}})", - "refId": "B" + "legendFormat": "{{persistentvolumeclaim}}", + "range": true, + "refId": "FREE_INODES" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "sum(cnpg_backends_total{namespace=~\"$namespace\",pod=~\"$instances\"}) by (state, pod)", + "editorMode": "code", + "expr": "max by(persistentvolumeclaim) (kubelet_volume_stats_inodes_used{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-wal\"} / kubelet_volume_stats_inodes{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-wal\"})", + "format": "time_series", "interval": "", - "legendFormat": "{{state}} ({{pod}})", - "refId": "A" + "legendFormat": "{{persistentvolumeclaim}}", + "range": true, + "refId": "FREE_INODES_WAL" } ], - "title": "Session States", - "type": "timeseries" + "title": "Volume Inode Usage: PGDATA and WAL", + "transformations": [], + "type": "gauge" }, { "datasource": { @@ -5255,117 +5864,82 @@ "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "mode": "thresholds" }, "mappings": [], + "max": 1, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, + { + "color": "#EAB839", + "value": 0.7 + }, { "color": "red", - "value": 80 + "value": 0.8 } ] }, - "unitScale": true + "unit": "percentunit" }, "overrides": [] }, "gridPos": { - "h": 8, - "w": 12, + "h": 7, + "w": 24, "x": 0, - "y": 54 + "y": 100 }, - "id": 50, + "id": 564, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} }, + "pluginVersion": "10.1.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "sum(rate(cnpg_pg_stat_database_xact_commit{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])) by (pod)", - "interval": "", - "legendFormat": "committed ({{pod}})", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "exemplar": true, - "expr": "sum(rate(cnpg_pg_stat_database_xact_rollback{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])) by (pod)", - "hide": false, + "editorMode": "code", + "expr": "sum by (namespace,persistentvolumeclaim) (kubelet_volume_stats_used_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-tbs.*\"}) \n/\nsum by (namespace,persistentvolumeclaim) (kubelet_volume_stats_capacity_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-tbs.*\"}) \n*\non(namespace, persistentvolumeclaim) group_left(volume,pod)\nkube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"$instances\"}", + "format": "time_series", "interval": "", - "legendFormat": "rolled back ({{pod}})", - "refId": "B" + "legendFormat": "{{volume}}-{{pod}}", + "range": true, + "refId": "FREE_SPACE" } ], - "title": "Transactions [5m]", - "type": "timeseries" + "title": "Volume Space Usage: Tablespaces", + "transformations": [], + "type": "gauge" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -5408,19 +5982,17 @@ "value": 80 } ] - }, - "unit": "s", - "unitScale": true + } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 54 + "x": 0, + "y": 107 }, - "id": 4, + "id": 44, "options": { "legend": { "calcs": [], @@ -5428,25 +6000,83 @@ "placement": "bottom", "showLegend": true }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(cnpg_pg_stat_database_tup_deleted{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m]))", + "interval": "", + "legendFormat": "deleted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(cnpg_pg_stat_database_tup_inserted{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m]))", + "hide": false, + "interval": "", + "legendFormat": "inserted", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(cnpg_pg_stat_database_tup_fetched{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m]))", + "hide": false, + "interval": "", + "legendFormat": "fetched", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(cnpg_pg_stat_database_tup_returned{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m]))", + "hide": false, + "interval": "", + "legendFormat": "returned", + "range": true, + "refId": "D" + }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "editorMode": "code", "exemplar": true, - "expr": "max by (pod) (cnpg_backends_max_tx_duration_seconds{namespace=~\"$namespace\",pod=~\"$instances\"})", + "expr": "sum(rate(cnpg_pg_stat_database_tup_updated{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m]))", + "hide": false, "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" + "legendFormat": "updated", + "range": true, + "refId": "E" } ], - "title": "Longest Transaction", + "title": "Tuple I/O [5m]", "type": "timeseries" }, { @@ -5454,7 +6084,6 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "", "fieldConfig": { "defaults": { "color": { @@ -5474,6 +6103,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -5509,10 +6139,10 @@ "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 62 + "x": 12, + "y": 107 }, - "id": 55, + "id": 46, "options": { "legend": { "calcs": [], @@ -5531,16 +6161,30 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "editorMode": "code", "exemplar": true, - "expr": "rate(cnpg_pg_stat_database_deadlocks{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "expr": "rate(cnpg_pg_stat_database_blks_hit{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "interval": "", + "legendFormat": "hit ({{pod}})", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(cnpg_pg_stat_database_blks_read{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", "hide": false, - "instant": false, "interval": "", - "legendFormat": "count ({{pod}})", + "legendFormat": "read ({{pod}})", + "range": true, "refId": "B" } ], - "title": "Deadlocks [5m]", + "title": "Block I/O [5m]", "type": "timeseries" }, { @@ -5548,7 +6192,6 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "", "fieldConfig": { "defaults": { "color": { @@ -5568,6 +6211,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -5590,23 +6234,20 @@ "steps": [ { "color": "green" - }, - { - "color": "red", - "value": 80 } ] - } + }, + "unit": "decbytes" }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 62 + "x": 0, + "y": 115 }, - "id": 54, + "id": 22, "options": { "legend": { "calcs": [], @@ -5616,194 +6257,10 @@ }, "tooltip": { "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "exemplar": true, - "expr": "cnpg_backends_waiting_total{namespace=~\"$namespace\",pod=~\"$instances\"}", - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" - } - ], - "title": "Blocked Queries", - "type": "timeseries" - } - ], - "targets": [ - { - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, - "refId": "A" - } - ], - "title": "Operational Stats", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 39 - }, - "id": 35, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "#EAB839", - "value": 0.7 - }, - { - "color": "red", - "value": 0.8 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 84 - }, - "id": 424, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "text": {} - }, - "pluginVersion": "10.1.5", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "max by(persistentvolumeclaim) (1 - kubelet_volume_stats_available_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"$instances\"} / kubelet_volume_stats_capacity_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"$instances\"})", - "format": "time_series", - "interval": "", - "legendFormat": "{{persistentvolumeclaim}}", - "range": true, - "refId": "FREE_SPACE" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "max by(persistentvolumeclaim) (1 - kubelet_volume_stats_available_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-wal\"} / kubelet_volume_stats_capacity_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-wal\"})", - "format": "time_series", - "interval": "", - "legendFormat": "{{persistentvolumeclaim}}", - "range": true, - "refId": "FREE_SPACE_WAL" - } - ], - "title": "Volume Space Usage: PGDATA and WAL", - "transformations": [], - "type": "gauge" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "#EAB839", - "value": 0.8 - }, - { - "color": "red", - "value": 0.9 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 84 - }, - "id": 426, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "sort": "none" + } }, - "pluginVersion": "10.1.5", + "pluginVersion": "8.0.5", "targets": [ { "datasource": { @@ -5811,30 +6268,16 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", - "expr": "max by(persistentvolumeclaim) (kubelet_volume_stats_inodes_used{namespace=\"$namespace\", persistentvolumeclaim=~\"$instances\"} / kubelet_volume_stats_inodes{namespace=\"$namespace\", persistentvolumeclaim=~\"$instances\"})", - "format": "time_series", - "interval": "", - "legendFormat": "{{persistentvolumeclaim}}", - "range": true, - "refId": "FREE_INODES" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "max by(persistentvolumeclaim) (kubelet_volume_stats_inodes_used{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-wal\"} / kubelet_volume_stats_inodes{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-wal\"})", - "format": "time_series", + "exemplar": true, + "expr": "max by (datname) (cnpg_pg_database_size_bytes{datname!~\"template.*\",datname!=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"})", "interval": "", - "legendFormat": "{{persistentvolumeclaim}}", + "legendFormat": " {{pod}}: {{datname}}", "range": true, - "refId": "FREE_INODES_WAL" + "refId": "A" } ], - "title": "Volume Inode Usage: PGDATA and WAL", - "transformations": [], - "type": "gauge" + "title": "Database Size", + "type": "timeseries" }, { "datasource": { @@ -5844,71 +6287,117 @@ "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } }, "mappings": [], - "max": 1, - "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, - { - "color": "#EAB839", - "value": 0.7 - }, { "color": "red", - "value": 0.8 + "value": 80 } ] }, - "unit": "percentunit" + "unit": "decbytes" }, "overrides": [] }, "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 92 + "h": 8, + "w": 12, + "x": 12, + "y": 115 }, - "id": 564, + "id": 2, "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "text": {} + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "pluginVersion": "10.1.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "editorMode": "code", - "expr": "sum by (namespace,persistentvolumeclaim) (kubelet_volume_stats_used_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-tbs.*\"}) \n/\nsum by (namespace,persistentvolumeclaim) (kubelet_volume_stats_capacity_bytes{namespace=\"$namespace\", persistentvolumeclaim=~\"(${instances})-tbs.*\"}) \n*\non(namespace, persistentvolumeclaim) group_left(volume,pod)\nkube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"$instances\"}", - "format": "time_series", + "exemplar": true, + "expr": "rate(cnpg_pg_stat_database_temp_bytes{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "instant": false, "interval": "", - "legendFormat": "{{volume}}-{{pod}}", - "range": true, - "refId": "FREE_SPACE" + "legendFormat": "{{pod}}", + "refId": "A" } ], - "title": "Volume Space Usage: Tablespaces", - "transformations": [], - "type": "gauge" - }, + "title": "Temp Bytes [5m]", + "type": "timeseries" + } + ], + "targets": [ + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "refId": "A" + } + ], + "title": "Storage & I/O", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 37, + "panels": [ { "datasource": { "type": "prometheus", @@ -5933,7 +6422,6 @@ "tooltip": false, "viz": false }, - "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -5968,11 +6456,11 @@ }, "gridPos": { "h": 8, - "w": 12, + "w": 8, "x": 0, - "y": 99 + "y": 137 }, - "id": 44, + "id": 6, "options": { "legend": { "calcs": [], @@ -5991,12 +6479,10 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "editorMode": "code", "exemplar": true, - "expr": "sum(rate(cnpg_pg_stat_database_tup_deleted{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m]))", + "expr": "cnpg_collector_pg_wal_archive_status{value=\"ready\",namespace=~\"$namespace\",pod=~\"$instances\"}", "interval": "", - "legendFormat": "deleted", - "range": true, + "legendFormat": "ready ({{pod}})", "refId": "A" }, { @@ -6004,59 +6490,15 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "editorMode": "code", "exemplar": true, - "expr": "sum(rate(cnpg_pg_stat_database_tup_inserted{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m]))", + "expr": "cnpg_collector_pg_wal_archive_status{value=\"done\",namespace=~\"$namespace\",pod=~\"$instances\"}", "hide": false, "interval": "", - "legendFormat": "inserted", - "range": true, + "legendFormat": "done ({{pod}})", "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(rate(cnpg_pg_stat_database_tup_fetched{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m]))", - "hide": false, - "interval": "", - "legendFormat": "fetched", - "range": true, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(rate(cnpg_pg_stat_database_tup_returned{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m]))", - "hide": false, - "interval": "", - "legendFormat": "returned", - "range": true, - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(rate(cnpg_pg_stat_database_tup_updated{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m]))", - "hide": false, - "interval": "", - "legendFormat": "updated", - "range": true, - "refId": "E" } ], - "title": "Tuple I/O [5m]", + "title": "WAL Segment Archive Status", "type": "timeseries" }, { @@ -6083,7 +6525,6 @@ "tooltip": false, "viz": false }, - "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -6118,11 +6559,11 @@ }, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 99 + "w": 8, + "x": 8, + "y": 137 }, - "id": 46, + "id": 52, "options": { "legend": { "calcs": [], @@ -6141,12 +6582,10 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "editorMode": "code", "exemplar": true, - "expr": "rate(cnpg_pg_stat_database_blks_hit{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "expr": "rate(cnpg_pg_stat_archiver_archived_count{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", "interval": "", - "legendFormat": "hit ({{pod}})", - "range": true, + "legendFormat": "archived ({{pod}})", "refId": "A" }, { @@ -6154,17 +6593,15 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "editorMode": "code", "exemplar": true, - "expr": "rate(cnpg_pg_stat_database_blks_read{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "expr": "rate(cnpg_pg_stat_archiver_failed_count{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", "hide": false, "interval": "", - "legendFormat": "read ({{pod}})", - "range": true, + "legendFormat": "failed ({{pod}})", "refId": "B" } ], - "title": "Block I/O [5m]", + "title": "Archiver Status [5m]", "type": "timeseries" }, { @@ -6172,6 +6609,7 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -6191,7 +6629,6 @@ "tooltip": false, "viz": false }, - "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -6214,20 +6651,24 @@ "steps": [ { "color": "green" + }, + { + "color": "red", + "value": 80 } ] }, - "unit": "decbytes" + "unit": "s" }, "overrides": [] }, "gridPos": { "h": 8, - "w": 12, - "x": 0, - "y": 107 + "w": 8, + "x": 16, + "y": 137 }, - "id": 22, + "id": 53, "options": { "legend": { "calcs": [], @@ -6240,25 +6681,47 @@ "sort": "none" } }, - "pluginVersion": "8.0.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "editorMode": "code", "exemplar": true, - "expr": "max by (datname) (cnpg_pg_database_size_bytes{datname!~\"template.*\",datname!=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"})", + "expr": "cnpg_pg_stat_archiver_seconds_since_last_archival{namespace=~\"$namespace\",pod=~\"$instances\"}", "interval": "", - "legendFormat": " {{pod}}: {{datname}}", - "range": true, + "legendFormat": "age ({{pod}})", "refId": "A" } ], - "title": "Database Size", + "title": "Last Archive Age", "type": "timeseries" - }, + } + ], + "targets": [ + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "refId": "A" + } + ], + "title": "Write Ahead Log", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 18, + "panels": [ { "datasource": { "type": "prometheus", @@ -6270,6 +6733,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -6297,7 +6761,7 @@ "mode": "none" }, "thresholdsStyle": { - "mode": "off" + "mode": "line" } }, "mappings": [], @@ -6308,22 +6772,27 @@ "color": "green" }, { - "color": "red", - "value": 80 + "color": "#EAB839", + "value": 600 + }, + { + "color": "dark-red", + "value": 3600 } ] }, - "unit": "decbytes" + "unit": "s", + "unitScale": true }, "overrides": [] }, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 107 + "w": 6, + "x": 0, + "y": 21 }, - "id": 2, + "id": 16, "options": { "legend": { "calcs": [], @@ -6343,41 +6812,16 @@ "uid": "${DS_PROMETHEUS}" }, "exemplar": true, - "expr": "rate(cnpg_pg_stat_database_temp_bytes{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "expr": "cnpg_pg_replication_lag{namespace=~\"$namespace\",pod=~\"$instances\"}", "instant": false, "interval": "", "legendFormat": "{{pod}}", "refId": "A" } ], - "title": "Temp Bytes [5m]", + "title": "Replication Lag", "type": "timeseries" - } - ], - "targets": [ - { - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, - "refId": "A" - } - ], - "title": "Storage & I/O", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 40 - }, - "id": 37, - "panels": [ + }, { "datasource": { "type": "prometheus", @@ -6389,6 +6833,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -6402,6 +6847,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -6430,17 +6876,19 @@ "value": 80 } ] - } + }, + "unit": "s", + "unitScale": true }, "overrides": [] }, "gridPos": { "h": 8, - "w": 8, - "x": 0, - "y": 129 + "w": 6, + "x": 6, + "y": 21 }, - "id": 6, + "id": 14, "options": { "legend": { "calcs": [], @@ -6459,26 +6907,16 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "editorMode": "code", "exemplar": true, - "expr": "cnpg_collector_pg_wal_archive_status{value=\"ready\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "expr": "cnpg_pg_stat_replication_write_lag_seconds{namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": false, "interval": "", - "legendFormat": "ready ({{pod}})", + "legendFormat": "{{pod}} -> {{application_name}}", "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "exemplar": true, - "expr": "cnpg_collector_pg_wal_archive_status{value=\"done\",namespace=~\"$namespace\",pod=~\"$instances\"}", - "hide": false, - "interval": "", - "legendFormat": "done ({{pod}})", - "refId": "B" } ], - "title": "WAL Segment Archive Status", + "title": "Write Lag", "type": "timeseries" }, { @@ -6492,6 +6930,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -6505,6 +6944,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -6533,17 +6973,19 @@ "value": 80 } ] - } + }, + "unit": "s", + "unitScale": true }, "overrides": [] }, "gridPos": { "h": 8, - "w": 8, - "x": 8, - "y": 129 + "w": 6, + "x": 12, + "y": 21 }, - "id": 52, + "id": 59, "options": { "legend": { "calcs": [], @@ -6562,26 +7004,16 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "editorMode": "code", "exemplar": true, - "expr": "rate(cnpg_pg_stat_archiver_archived_count{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "expr": "cnpg_pg_stat_replication_flush_lag_seconds{namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": false, "interval": "", - "legendFormat": "archived ({{pod}})", + "legendFormat": "{{pod}} -> {{application_name}}", "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "exemplar": true, - "expr": "rate(cnpg_pg_stat_archiver_failed_count{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", - "hide": false, - "interval": "", - "legendFormat": "failed ({{pod}})", - "refId": "B" } ], - "title": "Archiver Status [5m]", + "title": "Flush Lag", "type": "timeseries" }, { @@ -6596,6 +7028,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -6609,6 +7042,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -6638,17 +7072,18 @@ } ] }, - "unit": "s" + "unit": "s", + "unitScale": true }, "overrides": [] }, "gridPos": { "h": 8, - "w": 8, - "x": 16, - "y": 129 + "w": 6, + "x": 18, + "y": 21 }, - "id": 53, + "id": 20, "options": { "legend": { "calcs": [], @@ -6667,14 +7102,16 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "editorMode": "code", "exemplar": true, - "expr": "cnpg_pg_stat_archiver_seconds_since_last_archival{namespace=~\"$namespace\",pod=~\"$instances\"}", + "expr": "cnpg_pg_stat_replication_replay_lag_seconds{namespace=~\"$namespace\",pod=~\"$instances\"}", "interval": "", - "legendFormat": "age ({{pod}})", + "legendFormat": "{{pod}} -> {{application_name}}", + "range": true, "refId": "A" } ], - "title": "Last Archive Age", + "title": "Replay Lag", "type": "timeseries" } ], @@ -6686,7 +7123,7 @@ "refId": "A" } ], - "title": "Write Ahead Log", + "title": "Replication", "type": "row" }, { @@ -6698,90 +7135,91 @@ "h": 1, "w": 24, "x": 0, - "y": 41 + "y": 20 }, - "id": 18, + "id": 231, "panels": [ { + "cards": {}, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateOranges", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "timeseries", "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, "scaleDistribution": { "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "#EAB839", - "value": 600 - }, - { - "color": "dark-red", - "value": 3600 - } - ] - }, - "unit": "s" + } }, "overrides": [] }, "gridPos": { "h": 8, - "w": 6, + "w": 12, "x": 0, - "y": 93 + "y": 102 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 233, + "legend": { + "show": false }, - "id": 16, "options": { + "calculate": true, + "calculation": {}, + "cellGap": 2, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "#b4ff00", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "Oranges", + "steps": 128 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "show": false }, + "rowsFrame": { + "layout": "auto" + }, + "showValue": "never", "tooltip": { - "mode": "multi", - "sort": "none" + "show": true, + "yHistogram": false + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" } }, + "pluginVersion": "10.1.5", + "reverseYBuckets": false, "targets": [ { "datasource": { @@ -6789,15 +7227,27 @@ "uid": "${DS_PROMETHEUS}" }, "exemplar": true, - "expr": "cnpg_pg_replication_lag{namespace=~\"$namespace\",pod=~\"$instances\"}", - "instant": false, + "expr": "cnpg_collector_collection_duration_seconds{namespace=~\"$namespace\",pod=~\"$instances\"}", "interval": "", - "legendFormat": "{{pod}}", + "legendFormat": "", "refId": "A" } ], - "title": "Replication Lag", - "type": "timeseries" + "title": "Collection Duration", + "tooltip": { + "show": true, + "showHistogram": false + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "yAxis": { + "format": "s", + "logBase": 1, + "show": true + }, + "yBucketBound": "auto" }, { "datasource": { @@ -6816,21 +7266,22 @@ "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", - "fillOpacity": 10, + "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, - "showPoints": "never", - "spanNulls": true, + "showPoints": "auto", + "spanNulls": false, "stacking": { "group": "A", "mode": "none" @@ -6851,18 +7302,17 @@ "value": 80 } ] - }, - "unit": "s" + } }, "overrides": [] }, "gridPos": { "h": 8, - "w": 6, - "x": 6, - "y": 93 + "w": 12, + "x": 12, + "y": 102 }, - "id": 14, + "id": 235, "options": { "legend": { "calcs": [], @@ -6882,16 +7332,40 @@ "uid": "${DS_PROMETHEUS}" }, "exemplar": true, - "expr": "cnpg_pg_stat_replication_write_lag_seconds{namespace=~\"$namespace\",pod=~\"$cluster-[0-9]+$\"}", - "instant": false, + "expr": "cnpg_collector_last_collection_error{namespace=~\"$namespace\",pod=~\"$instances\"}", "interval": "", - "legendFormat": "{{pod}} -> {{application_name}}", + "legendFormat": "{{pod}}", "refId": "A" } ], - "title": "Write Lag", + "title": "Errors", "type": "timeseries" - }, + } + ], + "targets": [ + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "refId": "A" + } + ], + "title": "Collector Stats", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 239, + "panels": [ { "datasource": { "type": "prometheus", @@ -6909,21 +7383,22 @@ "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", - "fillOpacity": 10, + "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, - "showPoints": "never", - "spanNulls": true, + "showPoints": "auto", + "spanNulls": false, "stacking": { "group": "A", "mode": "none" @@ -6945,17 +7420,17 @@ } ] }, - "unit": "s" + "unit": "dateTimeAsIso" }, "overrides": [] }, "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 93 + "h": 6, + "w": 8, + "x": 0, + "y": 103 }, - "id": 59, + "id": 237, "options": { "legend": { "calcs": [], @@ -6975,16 +7450,41 @@ "uid": "${DS_PROMETHEUS}" }, "exemplar": true, - "expr": "cnpg_pg_stat_replication_flush_lag_seconds{namespace=~\"$namespace\",pod=~\"$cluster-[0-9]+$\"}", - "instant": false, + "expr": "cnpg_collector_first_recoverability_point{namespace=~\"$namespace\",pod=~\"$instances\"}*1000 > 0", + "format": "time_series", "interval": "", - "legendFormat": "{{pod}} -> {{application_name}}", + "legendFormat": "{{pod}}", "refId": "A" } ], - "title": "Flush Lag", + "title": "First Recoverability Point", "type": "timeseries" - }, + } + ], + "targets": [ + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "refId": "A" + } + ], + "title": "Backups", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 293, + "panels": [ { "datasource": { "type": "prometheus", @@ -6997,19 +7497,21 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", - "barAlignment": 0, + "barAlignment": -1, "drawStyle": "line", - "fillOpacity": 10, + "fillOpacity": 8, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -7039,17 +7541,18 @@ } ] }, - "unit": "s" + "unit": "none", + "unitScale": true }, "overrides": [] }, "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 93 + "h": 6, + "w": 5, + "x": 0, + "y": 16 }, - "id": 20, + "id": 295, "options": { "legend": { "calcs": [], @@ -7062,6 +7565,7 @@ "sort": "none" } }, + "pluginVersion": "8.2.1", "targets": [ { "datasource": { @@ -7069,168 +7573,52 @@ "uid": "${DS_PROMETHEUS}" }, "exemplar": true, - "expr": "cnpg_pg_stat_replication_replay_lag_seconds{namespace=~\"$namespace\",pod=~\"$cluster-[0-9]+$\"}", - "interval": "", - "legendFormat": "{{pod}} -> {{application_name}}", - "refId": "A" - } - ], - "title": "Replay Lag", - "type": "timeseries" - } - ], - "targets": [ - { - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, - "refId": "A" - } - ], - "title": "Replication", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 42 - }, - "id": 231, - "panels": [ - { - "cards": {}, - "color": { - "cardColor": "#b4ff00", - "colorScale": "sqrt", - "colorScheme": "interpolateOranges", - "exponent": 0.5, - "mode": "spectrum" - }, - "dataFormat": "timeseries", - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "scaleDistribution": { - "type": "linear" - } - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 94 - }, - "heatmap": {}, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 233, - "legend": { - "show": false - }, - "options": { - "calculate": true, - "calculation": {}, - "cellGap": 2, - "cellValues": {}, - "color": { - "exponent": 0.5, - "fill": "#b4ff00", - "mode": "scheme", - "reverse": false, - "scale": "exponential", - "scheme": "Oranges", - "steps": 128 - }, - "exemplars": { - "color": "rgba(255,0,255,0.7)" - }, - "filterValues": { - "le": 1e-9 - }, - "legend": { - "show": false - }, - "rowsFrame": { - "layout": "auto" - }, - "showValue": "never", - "tooltip": { - "show": true, - "yHistogram": false - }, - "yAxis": { - "axisPlacement": "left", - "reverse": false, - "unit": "s" - } - }, - "pluginVersion": "10.1.5", - "reverseYBuckets": false, - "targets": [ + "expr": "cnpg_pg_stat_bgwriter_checkpoints_req{namespace=~\"$namespace\",pod=~\"$instances\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "req/{{pod}}", + "refId": "B" + }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "exemplar": true, - "expr": "cnpg_collector_collection_duration_seconds{namespace=~\"$namespace\",pod=~\"$instances\"}", + "expr": "cnpg_pg_stat_bgwriter_checkpoints_timed{namespace=~\"$namespace\",pod=~\"$instances\"}", + "format": "time_series", "interval": "", - "legendFormat": "", + "intervalFactor": 1, + "legendFormat": "timed/{{pod}}", "refId": "A" } ], - "title": "Collection Duration", - "tooltip": { - "show": true, - "showHistogram": false - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "yAxis": { - "format": "s", - "logBase": 1, - "show": true - }, - "yBucketBound": "auto" + "title": "Requested/Timed", + "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", - "barAlignment": 0, + "barAlignment": -1, "drawStyle": "line", - "fillOpacity": 0, + "fillOpacity": 8, "gradientMode": "none", "hideFrom": { "legend": false, @@ -7244,8 +7632,8 @@ "scaleDistribution": { "type": "linear" }, - "showPoints": "auto", - "spanNulls": false, + "showPoints": "never", + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -7266,17 +7654,19 @@ "value": 80 } ] - } + }, + "unit": "ms", + "unitScale": true }, "overrides": [] }, "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 94 + "h": 6, + "w": 5, + "x": 5, + "y": 16 }, - "id": 235, + "id": 296, "options": { "legend": { "calcs": [], @@ -7289,6 +7679,7 @@ "sort": "none" } }, + "pluginVersion": "8.2.1", "targets": [ { "datasource": { @@ -7296,13 +7687,30 @@ "uid": "${DS_PROMETHEUS}" }, "exemplar": true, - "expr": "cnpg_collector_last_collection_error{namespace=~\"$namespace\",pod=~\"$instances\"}", + "expr": "cnpg_pg_stat_bgwriter_checkpoint_write_time{namespace=~\"$namespace\",pod=~\"$instances\"}", + "format": "time_series", + "hide": false, + "instant": false, "interval": "", - "legendFormat": "{{pod}}", + "intervalFactor": 1, + "legendFormat": "write/{{pod}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "exemplar": true, + "expr": "cnpg_pg_stat_bgwriter_checkpoint_sync_time{namespace=~\"$namespace\",pod=~\"$instances\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "sync/{{pod}}", "refId": "A" } ], - "title": "Errors", + "title": "Write/Sync time", "type": "timeseries" } ], @@ -7314,375 +7722,511 @@ "refId": "A" } ], - "title": "Collector Stats", + "title": "Checkpoints", "type": "row" }, { "collapsed": true, - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 43 + "y": 23 }, - "id": 239, + "id": 696, "panels": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, + "description": "", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "mode": "thresholds" }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 0, + "text": "No Ready pods" + } + }, + "type": "value" } - }, - "mappings": [], + ], "thresholds": { "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null + } + ] + }, + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "A" + }, + "properties": [ + { + "id": "displayName", + "value": "Reconcile errors" + } + ] + } + ] + }, + "gridPos": { + "h": 2, + "w": 5, + "x": 0, + "y": 24 + }, + "id": 697, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_status_ready{namespace=\"$operatorNamespace\"} * on (pod) group_left( label_app_kubernetes_io_name ) kube_pod_labels{label_app_kubernetes_io_name=~\"cloudnative-pg\"})", + "hide": false, + "instant": false, + "legendFormat": "Ready Operator Pods", + "range": true, + "refId": "A" + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The operator reconcile errors don't distinguish between database cluster or namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "green", + "index": 0, + "text": "None" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "red", + "index": 1 + }, + "to": 4294967295 }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "color": "red", - "value": 80 + "color": "green", + "value": null } ] }, - "unit": "dateTimeAsIso" + "unitScale": true }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "A" + }, + "properties": [ + { + "id": "displayName", + "value": "Reconcile errors" + } + ] + } + ] }, "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 95 + "h": 2, + "w": 5, + "x": 14, + "y": 24 }, - "id": 237, + "id": 702, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "max(controller_runtime_reconcile_total{namespace=~\"$operatorNamespace\", result=\"error\", controller=\"cluster\"})", + "hide": false, + "legendFormat": "Cluster Reconcile Errors", + "range": true, + "refId": "RECONCILE_ERRORS_BACKUP" + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "The operator reconcile errors don't distinguish between database cluster or namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "green", + "index": 0, + "text": "None" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "red", + "index": 1 + }, + "to": 4294967295 + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "A" + }, + "properties": [ + { + "id": "displayName", + "value": "Reconcile errors" + } + ] + } + ] + }, + "gridPos": { + "h": 2, + "w": 5, + "x": 19, + "y": 24 + }, + "id": 703, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": true }, + "pluginVersion": "10.3.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "cnpg_collector_first_recoverability_point{namespace=~\"$namespace\",pod=~\"$instances\"}*1000 > 0", - "format": "time_series", - "interval": "", - "legendFormat": "{{pod}}", - "refId": "A" + "editorMode": "code", + "expr": "max(controller_runtime_reconcile_total{namespace=~\"$operatorNamespace\", result=\"error\", controller=\"pooler\"})", + "hide": false, + "legendFormat": "Pooler Reconcile Errors", + "range": true, + "refId": "RECONCILE_ERRORS_BACKUP" } ], - "title": "First Recoverability Point", - "type": "timeseries" - } - ], - "targets": [ - { - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, - "refId": "A" - } - ], - "title": "Backups", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 44 - }, - "id": 293, - "panels": [ + "type": "stat" + }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "", + "description": "The operator reconcile errors don't distinguish between database cluster or namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "mode": "thresholds" }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": -1, - "drawStyle": "line", - "fillOpacity": 8, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" + "mappings": [ + { + "options": { + "0": { + "color": "green", + "index": 0, + "text": "None" + } + }, + "type": "value" }, - "thresholdsStyle": { - "mode": "off" + { + "options": { + "from": 1, + "result": { + "color": "red", + "index": 1 + }, + "to": 4294967295 + }, + "type": "range" } - }, - "mappings": [], + ], "thresholds": { "mode": "absolute", "steps": [ { - "color": "green" - }, - { - "color": "red", - "value": 80 + "color": "green", + "value": null } ] }, - "unit": "none" + "unitScale": true }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "A" + }, + "properties": [ + { + "id": "displayName", + "value": "Reconcile errors" + } + ] + } + ] }, "gridPos": { - "h": 6, + "h": 2, "w": 5, - "x": 0, - "y": 96 + "x": 14, + "y": 26 }, - "id": 295, + "id": 698, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": true }, - "pluginVersion": "8.2.1", + "pluginVersion": "10.3.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "cnpg_pg_stat_bgwriter_checkpoints_req{namespace=~\"$namespace\",pod=~\"$instances\"}", - "format": "time_series", + "editorMode": "code", + "expr": "max(controller_runtime_reconcile_total{namespace=~\"$operatorNamespace\", result=\"error\", controller=\"backup\"})", "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "req/{{pod}}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "exemplar": true, - "expr": "cnpg_pg_stat_bgwriter_checkpoints_timed{namespace=~\"$namespace\",pod=~\"$instances\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "timed/{{pod}}", - "refId": "A" + "legendFormat": "Backup Reconcile Errors", + "range": true, + "refId": "RECONCILE_ERRORS_BACKUP" } ], - "title": "Requested/Timed", - "type": "timeseries" + "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "", + "description": "The operator reconcile errors don't distinguish between database cluster or namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "mode": "thresholds" }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": -1, - "drawStyle": "line", - "fillOpacity": 8, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" + "mappings": [ + { + "options": { + "0": { + "color": "green", + "index": 0, + "text": "None" + } + }, + "type": "value" }, - "thresholdsStyle": { - "mode": "off" + { + "options": { + "from": 1, + "result": { + "color": "red", + "index": 1 + }, + "to": 4294967295 + }, + "type": "range" } - }, - "mappings": [], + ], "thresholds": { "mode": "absolute", "steps": [ { - "color": "green" - }, - { - "color": "red", - "value": 80 + "color": "green", + "value": null } ] }, - "unit": "ms" + "unitScale": true }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "A" + }, + "properties": [ + { + "id": "displayName", + "value": "Reconcile errors" + } + ] + } + ] }, "gridPos": { - "h": 6, + "h": 2, "w": 5, - "x": 5, - "y": 96 + "x": 19, + "y": 26 }, - "id": 296, + "id": 704, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": true }, - "pluginVersion": "8.2.1", + "pluginVersion": "10.3.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "exemplar": true, - "expr": "cnpg_pg_stat_bgwriter_checkpoint_write_time{namespace=~\"$namespace\",pod=~\"$instances\"}", - "format": "time_series", + "editorMode": "code", + "expr": "max(controller_runtime_reconcile_total{namespace=~\"$operatorNamespace\", result=\"error\", controller=\"scheduledbackup\"})", "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "write/{{pod}}", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "exemplar": true, - "expr": "cnpg_pg_stat_bgwriter_checkpoint_sync_time{namespace=~\"$namespace\",pod=~\"$instances\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "sync/{{pod}}", - "refId": "A" + "legendFormat": "Scheduled Backup Reconcile Errors", + "range": true, + "refId": "RECONCILE_ERRORS_BACKUP" } ], - "title": "Write/Sync time", - "type": "timeseries" - } - ], - "targets": [ - { - "datasource": { - "uid": "${DS_PROMETHEUS}" - }, - "refId": "A" + "type": "stat" } ], - "title": "Checkpoints", + "title": "Operator", "type": "row" } ], @@ -7787,12 +8331,13 @@ "type": "query" }, { + "allValue": "$cluster-([1-9][0-9]*)$", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "definition": "cnpg_collector_up{namespace=~\"$namespace\",pod=~\"$cluster-[0-9]+$\"}", + "definition": "cnpg_collector_up{namespace=~\"$namespace\",pod=~\"$cluster-([1-9][0-9]*)$\"}", "description": "Database cluster instances", "hide": 0, "includeAll": true, @@ -7801,8 +8346,9 @@ "name": "instances", "options": [], "query": { - "query": "cnpg_collector_up{namespace=~\"$namespace\",pod=~\"$cluster-[0-9]+$\"}", - "refId": "StandardVariableQuery" + "qryType": 4, + "query": "cnpg_collector_up{namespace=~\"$namespace\",pod=~\"$cluster-([1-9][0-9]*)$\"}", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "/pod=\"(?[^\"]+)/g", @@ -7813,7 +8359,7 @@ ] }, "time": { - "from": "now-5m", + "from": "now-6h", "to": "now" }, "timepicker": { @@ -7822,6 +8368,6 @@ "timezone": "", "title": "CloudNativePG", "uid": "cloudnative-pg", - "version": 16, + "version": 30, "weekStart": "" }