From e92bf0308131921e15e6ce3ce2c3ed9d2ea494eb Mon Sep 17 00:00:00 2001 From: svetychkina Date: Tue, 8 Sep 2026 18:42:38 +0500 Subject: [PATCH 01/13] feat: [CPCAP-12620] Default partition size monitoring --- .../monitoring-templates/prometheus-rule.yml | 10 +++++++++ operator/charts/patroni-services/values.yaml | 1 + .../pkg/metrics/performance_metrics.go | 22 +++++++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml index 1d0e4821..42544a94 100644 --- a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml +++ b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml @@ -522,4 +522,14 @@ spec: namespace: {{ .Release.Namespace }} service: {{ .Release.Name }} {{- end }} + - alert: PostgreSQL Default Partition Size High + annotations: + description: "Default partition \{\{ \$labels.table_name \}\} of table \{\{ \$labels.parent_table \}\} has exceeded the size threshold in namespace {{ .Release.Namespace }}." + summary: PostgreSQL Default Partition Size High + expr: ma_pg_default_partition_size_bytes{namespace="{{ .Release.Namespace }}"} / ma_pg_size_by_database{namespace="{{ .Release.Namespace }}"} * 100 > {{ default "50" .Values.metricCollector.prometheusRules.defaultPartitionSizeThreshold }} + for: {{ default "3m" .Values.metricCollector.prometheusRules.alertDelay }} + labels: + severity: average + namespace: {{ .Release.Namespace }} + service: {{ .Release.Name }} {{ end }} diff --git a/operator/charts/patroni-services/values.yaml b/operator/charts/patroni-services/values.yaml index 84652f9d..6fad362e 100644 --- a/operator/charts/patroni-services/values.yaml +++ b/operator/charts/patroni-services/values.yaml @@ -153,6 +153,7 @@ metricCollector: # should be specified in bytes, default is set to 32MB replicationLagValue: 33554432 largeObjectSizeThreshold: 104857600 # 100MB + defaultPartitionSizePercentThreshold: 50 # 50% of DB size maxConnectionExceedPercentageThreshold: 90 maxConnectionReachedPercentageThreshold: 80 warnWaitEventTreshold: 5 diff --git a/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go b/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go index efea5a4f..ae8d0287 100644 --- a/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go +++ b/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go @@ -105,6 +105,8 @@ var ( (SELECT setting::int max_connections FROM pg_settings WHERE name=$$max_connections$$) t3; ` + defaultPartitionQuery = `SELECT n.nspname AS schemaname, c.relname AS relname, p.relname AS parent_relname, pg_total_relation_size(c.oid) AS size_bytes, COALESCE(s.n_live_tup, 0) AS row_count FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace JOIN pg_inherits i ON i.inhrelid = c.oid JOIN pg_class p ON p.oid = i.inhparent LEFT JOIN pg_stat_user_tables s ON s.relid = c.oid WHERE c.relispartition = true AND pg_get_expr(c.relpartbound, c.oid) = 'DEFAULT'` + ) func (s *Scraper) CollectPerformanceMetrics() { @@ -326,6 +328,26 @@ func (s *Scraper) collectTableMetrics(ctx context.Context, pg *postgres.Postgres s.metrics = append(s.metrics, NewMetric("ma_pg_tot_size_by_db").withLabels(labels).setValue(totSizeValue)) s.metrics = append(s.metrics, NewMetric("ma_pg_idx_size_by_db").withLabels(labels).setValue(idxSizeValue)) } + + columns, rows = getData(ctx, pg, defaultPartitionQuery) + for _, row := range rows { + labels := gauges.DefaultLabels() + labels["datname"] = pg.GetDatabase() + var sizeValue, rowCountValue string + for _, column := range columns { + rValue := fmt.Sprintf("%v", row[column]) + switch column { + case "size_bytes": + sizeValue = rValue + case "row_count": + rowCountValue = rValue + default: + labels[column] = rValue + } + } + s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_size_bytes").withLabels(labels).setValue(sizeValue)) + s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_row_count").withLabels(labels).setValue(rowCountValue)) + } } func (s *Scraper) collectCommonPerfMetrics(ctx context.Context, pg *postgres.PostgresConnector) { From 82867af968187f3c54dfe2a5f92597c303e1e440 Mon Sep 17 00:00:00 2001 From: svetychkina Date: Wed, 9 Sep 2026 16:06:24 +0500 Subject: [PATCH 02/13] feat: [CPCAP-12620] small bug fixes --- .../templates/monitoring-templates/prometheus-rule.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml index 42544a94..f243c0c7 100644 --- a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml +++ b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml @@ -524,9 +524,9 @@ spec: {{- end }} - alert: PostgreSQL Default Partition Size High annotations: - description: "Default partition \{\{ \$labels.table_name \}\} of table \{\{ \$labels.parent_table \}\} has exceeded the size threshold in namespace {{ .Release.Namespace }}." + description: "Default partition \{\{ \$labels.relname \}\} of table \{\{ \$labels.parent_relname \}\} has exceeded the size threshold in namespace {{ .Release.Namespace }}." summary: PostgreSQL Default Partition Size High - expr: ma_pg_default_partition_size_bytes{namespace="{{ .Release.Namespace }}"} / ma_pg_size_by_database{namespace="{{ .Release.Namespace }}"} * 100 > {{ default "50" .Values.metricCollector.prometheusRules.defaultPartitionSizeThreshold }} + expr: ma_pg_default_partition_size_bytes{namespace="{{ .Release.Namespace }}"} / on(datname) ma_pg_size_by_database{namespace="{{ .Release.Namespace }}"} * 100 > {{ default "50" .Values.metricCollector.prometheusRules.defaultPartitionSizePercentThreshold }} for: {{ default "3m" .Values.metricCollector.prometheusRules.alertDelay }} labels: severity: average From 7ab68d9f1444aefc986dbc29d9429cf024bf3b0b Mon Sep 17 00:00:00 2001 From: svetychkina Date: Thu, 10 Sep 2026 12:26:02 +0500 Subject: [PATCH 03/13] feat: [CPCAP-12620] add new value to schema --- operator/charts/patroni-services/values.schema.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/operator/charts/patroni-services/values.schema.json b/operator/charts/patroni-services/values.schema.json index 0d188d78..8c840fb0 100644 --- a/operator/charts/patroni-services/values.schema.json +++ b/operator/charts/patroni-services/values.schema.json @@ -488,6 +488,10 @@ "type": "integer", "default": 104857600 }, + "defaultPartitionSizePercentThreshold": { + "type": "integer", + "default": 50 + }, "maxConnectionExceedPercentageThreshold": { "type": "integer", "default": 90 From db4b06ed9b146255cd2be880876823b8513de168 Mon Sep 17 00:00:00 2001 From: svetychkina Date: Tue, 15 Sep 2026 14:25:52 +0500 Subject: [PATCH 04/13] feat: [CPCAP-12620] add Grafana panels --- .../monitoring/grafana-dashboard.json | 19843 +++++++++------- 1 file changed, 11083 insertions(+), 8760 deletions(-) diff --git a/operator/charts/patroni-services/monitoring/grafana-dashboard.json b/operator/charts/patroni-services/monitoring/grafana-dashboard.json index 36886412..b30d399f 100644 --- a/operator/charts/patroni-services/monitoring/grafana-dashboard.json +++ b/operator/charts/patroni-services/monitoring/grafana-dashboard.json @@ -1,9424 +1,11747 @@ { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Metrics for PostgreSQL Cluster", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": 373, - "links": [ - { - "asDropdown": false, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": [ - "Postgres_Performance" - ], - "targetBlank": false, - "title": "PostgreSQL Performance Metrics", - "tooltip": "", - "type": "dashboards", - "url": "" + "apiVersion": "dashboard.grafana.app/v2", + "kind": "Dashboard", + "metadata": { + "name": "ad6m2cs", + "namespace": "default", + "uid": "8d955265-086e-4614-be06-27533a59a8e0", + "resourceVersion": "1789464172580002", + "generation": 5, + "creationTimestamp": "2026-09-14T06:57:17Z", + "labels": { + "grafana.app/deprecatedInternalID": "714595832049664" }, - { - "asDropdown": false, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": [ - "Postgres_Exporter" - ], - "targetBlank": false, - "title": "Postgres Exporter", - "tooltip": "", - "type": "dashboards", - "url": "" + "annotations": { + "grafana.app/createdBy": "user:dfxlwjvefh62od", + "grafana.app/folder": "", + "grafana.app/saved-from-ui": "Grafana v13.0.6 (10dd660017)", + "grafana.app/updatedBy": "user:dfxlwjvefh62od", + "grafana.app/updatedTimestamp": "2026-09-15T09:22:52Z" } - ], - "panels": [ - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 980, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" + }, + "spec": { + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "grafana", + "version": "v0", + "datasource": { + "name": "grafana" + }, + "spec": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + } }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "index": 2, - "text": "UP" - }, - "6": { - "index": 1, - "text": "DEGRADED" - }, - "10": { - "index": 0, - "text": "DOWN" - }, - "11": { - "color": "dark-green", - "index": 3, - "text": "UP (EXTERNAL)" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 3 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 6 + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true + } + } + ], + "cursorSync": "Crosshair", + "description": "Metrics for PostgreSQL Cluster", + "editable": true, + "elements": { + "panel-1": { + "kind": "Panel", + "spec": { + "id": 1, + "title": "Smoke Test", + "description": "Shows whether the cluster serves RW requests (select, insert, update, delete) through the endpoint.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "interval": "", + "legendFormat": "{{action}}" + } + }, + "refId": "D", + "hidden": false } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 0, - "y": 39 - }, - "id": 10, - "interval": "$inter", - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" + } ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "transformations": [], + "queryOptions": { + "interval": "$inter" + } + } }, - "pluginVersion": "10.4.13", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "editorMode": "code", - "expr": "sum by () (ma_pg_patroni_cluster_status{namespace=\"$namespace\", cluster=~\"$cluster\"} or ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\", pg_node='External'})", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.5.8", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", - "range": true, - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "percent" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], + } + } + }, + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, "title": "PostgreSQL Cluster Status", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "blue", - "index": 1, - "text": "STANDBY" - }, - "1": { - "index": 0, - "text": "ACTIVE" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 3 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 6 + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "editorMode": "code", + "expr": "sum by () (ma_pg_patroni_cluster_status{namespace=\"$namespace\", cluster=~\"$cluster\"} or ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\", pg_node='External'})", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", + "range": true, + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 4, - "y": 39 - }, - "id": 1077, - "interval": "$inter", - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" + } ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "transformations": [], + "queryOptions": { + "maxDataPoints": 100, + "interval": "$inter" + } + } }, - "pluginVersion": "10.4.13", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "editorMode": "code", - "expr": "ma_pg_patroni_cluster_active{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "13.0.6", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "type": "time" - }, - { - "params": [ - "null" + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "mappings": [ + { + "type": "value", + "options": { + "0": { + "text": "UP", + "index": 2 + }, + "6": { + "text": "DEGRADED", + "index": 1 + }, + "10": { + "text": "DOWN", + "index": 0 + }, + "11": { + "text": "UP (EXTERNAL)", + "color": "dark-green", + "index": 3 + } + } + } ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", - "range": true, - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "rgba(50, 172, 45, 0.97)" + }, + { + "value": 3, + "color": "rgba(237, 129, 40, 0.89)" + }, + { + "value": 6, + "color": "rgba(245, 54, 54, 0.9)" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "thresholds" } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], - "title": "PostgreSQL Cluster Status", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Postgres server version", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 + } + } + }, + "panel-100": { + "kind": "Panel", + "spec": { + "id": 100, + "title": "Sent lag", + "description": "Shows the difference between the current XLOG location and the data that was sent to recipient.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$7", + "dsType": "influxdb", + "expr": "ma_pg_patroni_replication_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ hostname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] - }, - "unit": "string" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 2, - "x": 8, - "y": 39 - }, - "id": 1094, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" + } ], - "fields": "/^Value$/", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.13", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "disableTextWrap": false, - "editorMode": "code", - "expr": "postgres_version{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "format": "table", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "pg_version", - "useBackend": false + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } - ], - "title": "Version", - "type": "stat" - }, - { - "datasource": { - "uid": "$datasource" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "10.1.5", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "mappings": [ - { - "options": { - "0": { - "color": "#F2495C" + "fieldConfig": { + "defaults": { + "unit": "decbytes", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "1": { - "color": "#73BF69" + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "N/A": { - "color": "#CCC" + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" }, - "null": { - "text": "N/A" + "thresholdsStyle": { + "mode": "off" } - }, - "type": "value" + } }, - { - "options": { - "result": { - "text": "N/A" - } - }, - "type": "range" + "overrides": [] + } + } + } + } + }, + "panel-101": { + "kind": "Panel", + "spec": { + "id": 101, + "title": "Sent/Replay lag", + "description": "Shows the difference between the sent XLOG location and applied to the recipient XLOG location.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$7", + "dsType": "influxdb", + "expr": "ma_pg_patroni_replication_state_sent_replay_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ hostname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_replay_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } } ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 10, - "y": 39 - }, - "id": 7, - "interval": "$inter", - "options": { - "alignValue": "left", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "7.5.10", - "targets": [ - { - "alias": "$4", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "10.1.5", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.pg_metrics.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - ], - "title": "Running Nodes (1 = OK)", - "type": "state-timeline" - }, - { - "datasource": { - "uid": "$datasource" - }, - "description": "Shows whether metric sources work. If the value is greater than 1, then the source returns error. If the value is zero, then the source is down.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false }, - "mappings": [ - { - "options": { - "0": { - "color": "#F2495C", - "text": "ERROR" - }, - "1": { - "color": "#73BF69", - "text": "OK" + "fieldConfig": { + "defaults": { + "unit": "decbytes", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "7": { - "color": "#FF9830", - "text": "PROBLEM" + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "N/A": { - "color": "#CCC" + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" }, - "null": { - "text": "N/A" + "thresholdsStyle": { + "mode": "off" } - }, - "type": "value" + } }, - { - "options": { - "result": { - "text": "N/A" - } - }, - "type": "range" + "overrides": [] + } + } + } + } + }, + "panel-1015": { + "kind": "Panel", + "spec": { + "id": 1015, + "title": "Archive mode", + "description": "If archive mode is on, then the WAL archive is enabled. Otherwise, the WAL archive is disabled.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "exemplar": true, + "expr": "ma_pg_patroni_pg_metrics_archive_mode_prom{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM /pg.$cluster_name.*.archive.mode/ WHERE namespace='$namespace' and $timeFilter", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } } ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 17, - "y": 39 - }, - "id": 8, - "interval": "$inter", - "options": { - "alignValue": "left", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" + "transformations": [], + "queryOptions": { + "maxDataPoints": 100 + } } }, - "pluginVersion": "7.5.10", - "targets": [ - { - "alias": "$tag_service_name", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_status{namespace=\"$namespace\", cluster=~\"$cluster\"} + 1", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "11.2.1", + "spec": { + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" ], - "type": "time" - }, - { - "params": [ - "null" + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "mappings": [ + { + "type": "value", + "options": { + "0": { + "text": "Off" + }, + "1": { + "text": "On" + } + } + }, + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "Off" + } + } + } ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{ service_name }}", - "orderByTime": "ASC", - "policy": "default", - "query": "select 1 - ( max(\"value\") / 14 - max(\"value\") % 14 / 14) from /ma.status/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "thresholds" } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], - "title": "Metric Sources (1 = OK)", - "type": "state-timeline" + } } - ], - "title": "Overview", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 1 }, - "id": 1021, - "panels": [ - { - "datasource": { - "uid": "$datasource" + "panel-1023": { + "kind": "Panel", + "spec": { + "id": 1023, + "title": "Patroni Members Status (1 = OK)", + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_patroni_status{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.patroni_status/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": { + "interval": "$inter" + } + } }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false + "vizConfig": { + "kind": "VizConfig", + "group": "state-timeline", + "version": "13.0.6", + "spec": { + "options": { + "alignValue": "left", + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } }, - "mappings": [ - { - "options": { - "0": { - "color": "#F2495C" - }, - "1": { - "color": "#73BF69" - }, - "N/A": { - "color": "#CCC" - }, - "null": { - "text": "N/A" + "fieldConfig": { + "defaults": { + "unit": "short", + "mappings": [ + { + "type": "value", + "options": { + "0": { + "color": "#F2495C" + }, + "1": { + "color": "#73BF69" + }, + "N/A": { + "color": "#CCC" + }, + "null": { + "text": "N/A" + } + } } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - "type": "value" - }, - { - "options": { - "result": { - "text": "N/A" - } + "color": { + "mode": "continuous-GrYlRd" }, - "type": "range" + "custom": { + "axisPlacement": "auto", + "fillOpacity": 100, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false + } + }, + "overrides": [] + } + } + } + } + }, + "panel-1077": { + "kind": "Panel", + "spec": { + "id": 1077, + "title": "PostgreSQL Cluster Status", + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "editorMode": "code", + "expr": "ma_pg_patroni_cluster_active{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", + "range": true, + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } } ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 46 - }, - "id": 1023, - "interval": "$inter", - "options": { - "alignValue": "left", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" + "transformations": [], + "queryOptions": { + "maxDataPoints": 100, + "interval": "$inter" + } } }, - "pluginVersion": "7.5.10", - "targets": [ - { - "alias": "$4", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_patroni_status{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "13.0.6", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "type": "time" - }, - { - "params": [ - "null" + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "mappings": [ + { + "type": "value", + "options": { + "0": { + "text": "STANDBY", + "color": "blue", + "index": 1 + }, + "1": { + "text": "ACTIVE", + "index": 0 + } + } + } ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.patroni_status/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "rgba(50, 172, 45, 0.97)" + }, + { + "value": 3, + "color": "rgba(237, 129, 40, 0.89)" + }, + { + "value": 6, + "color": "rgba(245, 54, 54, 0.9)" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "thresholds" } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], - "title": "Patroni Members Status (1 = OK)", - "type": "state-timeline" + } } - ], - "title": "Patroni Status", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 2 }, - "id": 981, - "panels": [ - { - "datasource": { - "uid": "$datasource" + "panel-1078": { + "kind": "Panel", + "spec": { + "id": 1078, + "title": "Size by database", + "description": "This graph shows size for all of the logical databases in PostgreSQL cluster.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_size_by_database{namespace=\"$namespace\", datname=~\"$datname\"}", + "format": "time_series", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "", + "legendFormat": "{{ datname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") / 1024 / 1024 FROM /pg.common.size_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": { + "interval": "$inter" + } + } }, - "description": "Shows whether the cluster serves RW requests (select, insert, update, delete) through the endpoint.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "percent" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "11.5.2", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "unit": "bits", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "MiB", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 47 - }, - "id": 1, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + }, + "overrides": [] + } } - }, - "pluginVersion": "9.5.8", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "interval": "", - "legendFormat": "{{action}}", - "refId": "D" + } + } + }, + "panel-1079": { + "kind": "Panel", + "spec": { + "id": 1079, + "title": "Number of Tables", + "description": "This graph shows number of table in each of the logical databases.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "exemplar": true, + "expr": "count by (datname) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"})", + "interval": "", + "legendFormat": "{{ datname }}", + "range": true + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} } - ], - "title": "Smoke Test", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the execution time for a **single** RW request (select, insert, update, delete) through the endpoint.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "11.5.2", + "spec": { + "options": { + "legend": { + "calcs": [ + "max", + "last" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" + } } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 47 - }, - "id": 16, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "min", - "max", - "mean", - "lastNotNull" + }, + "overrides": [] + } + } + } + } + }, + "panel-1081": { + "kind": "Panel", + "spec": { + "id": 1081, + "title": "Overall connection statistic", + "description": "Shows how many connections are in use right now. It shows max connections, used connections, reserved for regular, and superuser.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_connection_count_stat_max_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "stat max connections", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.connection_count_stat.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "range": true, + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "expr": "ma_pg_connection_count_stat_reserved_for_reg_users{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "reserved for reg_users", + "range": true + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "expr": "ma_pg_connection_count_stat_reserved_for_superuser{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "reserved for superuser", + "range": true + } + }, + "refId": "C", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "expr": "ma_pg_connection_count_stat_used{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "used", + "range": true + } + }, + "refId": "D", + "hidden": false + } + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "9.5.8", - "targets": [ - { - "alias": "delete", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "10.2.3", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" ], - "type": "fill" + "displayMode": "list", + "placement": "right", + "showLegend": false, + "width": 250 + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "hide": false, - "interval": "", - "legendFormat": "{{action}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] + }, + "overrides": [] + } + } + } + } + }, + "panel-1082": { + "kind": "Panel", + "spec": { + "id": 1082, + "title": "Connection by database", + "description": "Shows the number of connections per database.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_connection_by_database{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "", + "legendFormat": "{{ datname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "tags": [] + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } - ], - "title": "Smoke Tests Timings", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows whether monitoring is able to connect to PostgreSQL through the endpoint.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "10.2.3", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 200 + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ + "fieldConfig": { + "defaults": { + "unit": "short", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [ { - "color": "green" + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "displayName", + "value": "Limits" + } + ] }, { - "color": "red", - "value": 80 + "matcher": { + "id": "byName", + "options": "Limits" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + } + ] } ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 47 - }, - "id": 15, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + } + } + } + } + }, + "panel-1083": { + "kind": "Panel", + "spec": { + "id": 1083, + "title": "Connection by role", + "description": "Shows the number of connections per role.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "editorMode": "code", + "expr": "ma_pg_connection_by_role{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "", + "legendFormat": "{{ usename }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "9.5.8", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_pg_endpoints_cluster_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "10.2.3", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" ], - "type": "fill" + "displayMode": "list", + "placement": "right", + "showLegend": false, + "width": 200 + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "Leader", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], - "title": "Endpoint Cluster Status (1 = Running)", - "type": "timeseries" + } } - ], - "title": "Smoke test", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 3 }, - "id": 982, - "panels": [ - { - "datasource": { - "uid": "$datasource" + "panel-1084": { + "kind": "Panel", + "spec": { + "id": 1084, + "title": "Not idle connections by Database", + "description": "Shows the number of not idle connections per database.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "editorMode": "code", + "expr": "ma_pg_count_not_idle{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ datname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.count_not_idle.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "range": true, + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": { + "interval": "$inter" + } + } }, - "description": "Shows CPU consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Cores", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "10.2.3", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false, + "width": 200 + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "fieldConfig": { + "defaults": { + "unit": "short", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "limit" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineWidth", - "value": 2 } - ] - }, - { - "matcher": { - "id": "byName", - "options": "request" }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EF843C", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 + "overrides": [] + } + } + } + } + }, + "panel-1085": { + "kind": "Panel", + "spec": { + "id": 1085, + "title": "Number of Active Connections by Role", + "description": "This table shows number of Active Connections in current moment by role. Also shows Connection Limits that is set during Role create. Also, shows not idle connection by role.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "last_over_time(ma_pg_connection_by_role_with_limit{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}[$__range:])", + "format": "table", + "groupBy": [ + { + "params": [ + "queryid" + ], + "type": "tag" + } + ], + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Connections", + "measurement": "ma.pg.common.queries_stat", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", + "rawQuery": true, + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "mean_time" + ], + "type": "field" + }, + { + "params": [ + "30" + ], + "type": "top" + } + ], + [ + { + "params": [ + "calls" + ], + "type": "field" + } + ], + [ + { + "params": [ + "short_query" + ], + "type": "field" + } + ], + [ + { + "params": [ + "datname" + ], + "type": "field" + } + ], + [ + { + "params": [ + "total_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/^usage/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#7EB26D", - "mode": "fixed" + } + ], + "transformations": [ + { + "kind": "Transformation", + "group": "organize", + "spec": { + "options": { + "excludeByName": { + "Time": true, + "Value": false, + "__name__": true, + "endpoint": true, + "exported_namespace": true, + "host": true, + "instance": true, + "job": true, + "metric_name": true, + "name": true, + "namespace": true, + "pod": true, + "relid": true, + "service": true, + "short_query": false + }, + "indexByName": { + "Time": 1, + "Value": 12, + "__name__": 2, + "endpoint": 3, + "exported_namespace": 4, + "host": 5, + "instance": 6, + "job": 7, + "limit": 13, + "name": 8, + "namespace": 9, + "pod": 10, + "service": 11, + "usename": 0 + }, + "renameByName": { + "Value": "Connections", + "datname": "Database Name", + "idx_size": "Index Size", + "limit": "Connections Limit", + "name": "", + "namespace": "", + "not_idle_cnt": "Not Idle Connections", + "queryid": "Query Id", + "relname": "Relation Name", + "short_query": "", + "tot_size": "Total Size", + "usename": "Role" + } } - }, - { - "id": "custom.fillOpacity", - "value": 20 } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 20, - "interval": "$inter", - "links": [ - { - "targetBlank": true, - "title": "Kubernetes Pods", - "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables" - } - ], - "options": { - "legend": { - "calcs": [ - "lastNotNull" + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "queryOptions": {} } }, - "pluginVersion": "9.5.8", - "repeat": "namespace_pods", - "repeatDirection": "h", - "targets": [ - { - "alias": "usage", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "sum(rate(container_cpu_usage_seconds_total{image!=\"\", container!=\"POD\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}[2m])) by (pod_name, container)", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "table", + "version": "11.2.1", + "spec": { + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" ], - "type": "time" + "show": false }, - { - "params": [ - "container" - ], - "type": "tag" + "frameIndex": 1, + "showHeader": true, + "sortBy": [] + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + } }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "usage", - "measurement": "cpu/usage_rate", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM \"cpu/usage_rate\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ + "overrides": [ { - "params": [ - "value" - ], - "type": "field" + "matcher": { + "id": "byName", + "options": "Not Idle Connections" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "None": { + "text": "0" + } + }, + "type": "value" + } + ] + } + ] }, { - "params": [], - "type": "sum" + "matcher": { + "id": "byName", + "options": "Role" + }, + "properties": [ + { + "id": "custom.width", + "value": 358 + } + ] } ] + } + } + } + } + }, + "panel-1087": { + "kind": "Panel", + "spec": { + "id": 1087, + "title": "TOP $limit tables by size", + "description": "The table shows TOP tables filtered by the selected database name.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "groupBy": [ + { + "params": [ + "queryid" + ], + "type": "tag" + } + ], + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "measurement": "ma.pg.common.queries_stat", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", + "rawQuery": true, + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "mean_time" + ], + "type": "field" + }, + { + "params": [ + "30" + ], + "type": "top" + } + ], + [ + { + "params": [ + "calls" + ], + "type": "field" + } + ], + [ + { + "params": [ + "short_query" + ], + "type": "field" + } + ], + [ + { + "params": [ + "datname" + ], + "type": "field" + } + ], + [ + { + "params": [ + "total_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_tot_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false + } + }, + "refId": "C", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_idx_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false + } + }, + "refId": "D", + "hidden": false + } + } ], - "tags": [ - { - "key": "type", - "operator": "=", - "value": "pod_container" - }, - { - "condition": "AND", - "key": "namespace_name", - "operator": "=~", - "value": "/$namespace$/" + "transformations": [ + { + "kind": "Transformation", + "group": "merge", + "spec": { + "options": {} + } + }, + { + "kind": "Transformation", + "group": "filterFieldsByName", + "spec": { + "options": { + "include": { + "names": [ + "datname", + "relid", + "relname", + "selector", + "Value #A", + "Value #B", + "Value #C", + "Value #D" + ] + } + } + } }, { - "condition": "AND", - "key": "pod_name", - "operator": "=~", - "value": "/$podname$/" + "kind": "Transformation", + "group": "organize", + "spec": { + "options": { + "excludeByName": { + "Value": false, + "Value #A": false, + "__name__": true, + "endpoint": true, + "exported_namespace": true, + "host": true, + "instance": true, + "job": true, + "metric_name": true, + "name": true, + "namespace": true, + "pod": true, + "relid": true, + "service": true, + "short_query": false + }, + "indexByName": { + "Value #A": 7, + "Value #B": 4, + "Value #C": 5, + "Value #D": 6, + "datname": 0, + "relid": 1, + "relname": 2, + "selector": 3 + }, + "renameByName": { + "Value": "VALUE", + "Value #A": "Table Size", + "Value #B": "Estimated Number Of Tuples", + "Value #C": "Total Size", + "Value #D": "Index Size", + "datname": "Database Name", + "idx_size": "Index Size", + "live_tuples": "Estimated Number Of Tuples", + "name": "", + "namespace": "", + "pod_name": "", + "queryid": "Query Id", + "relname": "Relation Name", + "service_name": "", + "short_query": "", + "tot_size": "Total Size" + } + } + } } - ] - }, - { - "datasource": { - "uid": "$datasource" - }, - "expr": "kube_pod_container_resource_limits_cpu_cores{exported_namespace=\"$namespace\", exported_pod=\"$namespace_pods\", cluster=~\"$cluster\"}", - "hide": false, - "interval": "", - "legendFormat": "limit", - "refId": "B" + ], + "queryOptions": {} } - ], - "title": "CPU Usage: $namespace_pods", - "type": "timeseries" - } - ], - "title": "CPU Usage", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 983, - "panels": [ - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows memory consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Memory", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, + "vizConfig": { + "kind": "VizConfig", + "group": "table", + "version": "13.0.6", + "spec": { + "options": { + "cellHeight": "sm", + "showHeader": true, + "sortBy": [ { - "color": "red", - "value": 80 + "desc": true, + "displayName": "Table Size" } ] }, - "unit": "bytes" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/^limit/" + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "footer": { + "reducers": [] + }, + "inspect": false + } }, - "properties": [ + "overrides": [ { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } + "matcher": { + "id": "byName", + "options": "Table Size" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] }, { - "id": "custom.fillOpacity", - "value": 0 + "matcher": { + "id": "byName", + "options": "Total Size" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] }, { - "id": "custom.lineWidth", - "value": 2 + "matcher": { + "id": "byName", + "options": "Index Size" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] } ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/^request/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EF843C", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 + } + } + } + } + }, + "panel-1088": { + "kind": "Panel", + "spec": { + "id": 1088, + "title": "Size by tables", + "description": "This Graph Shows size of the each table in all of the databases", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "topk($table_limit, sort_desc(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", + "instant": false, + "interval": "", + "legendFormat": "{{ datname }}/{{ relname }}", + "range": true + } + }, + "refId": "A", + "hidden": false } - ] + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "13.0.6", + "spec": { + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [ + "max", + "last" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } }, - { - "matcher": { - "id": "byRegexp", - "options": "/^usage/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#7EB26D", - "mode": "fixed" + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/^working set/" }, - "properties": [ + "overrides": [ { - "id": "color", - "value": { - "fixedColor": "#6ED0E0", - "mode": "fixed" - } + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] } ] } - ] - }, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 5 - }, - "id": 22, - "interval": "$inter", - "links": [ - { - "targetBlank": true, - "title": "Kubernetes Pods", - "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables" } - ], - "options": { - "legend": { - "calcs": [ - "lastNotNull" + } + } + }, + "panel-1089": { + "kind": "Panel", + "spec": { + "id": 1089, + "title": "Estimated Number of Rows per Table", + "description": "This graphs shows estimated number of rows in all of the tables, using `pg_stat_all_tables` system view.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "exemplar": true, + "expr": "topk($table_limit, sort_desc(ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", + "interval": "", + "legendFormat": "{{datname}}/{{ relname }}", + "range": true + } + }, + "refId": "A", + "hidden": false + } + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": {} } }, - "pluginVersion": "9.5.8", - "repeat": "namespace_pods", - "repeatDirection": "h", - "targets": [ - { - "alias": "usage", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "13.0.6", + "spec": { + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [ + "max", + "last" ], - "type": "time" + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + } }, - { - "params": [ - "container_name" - ], - "type": "tag" + "overrides": [] + } + } + } + } + }, + "panel-1090": { + "kind": "Panel", + "spec": { + "id": 1090, + "title": "TOP $limit queries by $column", + "description": "The table shows TOP queries filtered by the selected column and database name. For queries statistics `pg_stat_statements` view used. More info about columns could be find in official docs.\n\nAlso, it is possible to reset the statistics, by calling `pg_stat_statements_reset()` function.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "last_over_time(topk($limit,sort_desc(ma_pg_queries_stat{namespace=\"$namespace\", metric_name=\"$column\", datname=~\"$datname\", cluster=~\"$cluster\"}))[$__range:])", + "format": "table", + "groupBy": [ + { + "params": [ + "queryid" + ], + "type": "tag" + } + ], + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "measurement": "ma.pg.common.queries_stat", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", + "rawQuery": true, + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "mean_time" + ], + "type": "field" + }, + { + "params": [ + "30" + ], + "type": "top" + } + ], + [ + { + "params": [ + "calls" + ], + "type": "field" + } + ], + [ + { + "params": [ + "short_query" + ], + "type": "field" + } + ], + [ + { + "params": [ + "datname" + ], + "type": "field" + } + ], + [ + { + "params": [ + "total_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [ + { + "kind": "Transformation", + "group": "organize", + "spec": { + "options": { + "excludeByName": { + "Value": false, + "__name__": true, + "endpoint": true, + "exported_namespace": true, + "host": true, + "instance": true, + "job": true, + "metric_name": true, + "name": true, + "namespace": true, + "pod": true, + "service": true, + "short_query": false + }, + "indexByName": { + "Time": 0, + "Value": 1, + "__name__": 2, + "endpoint": 4, + "exported_namespace": 5, + "host": 6, + "instance": 7, + "job": 8, + "metric_name": 14, + "name": 9, + "namespace": 10, + "pod": 11, + "queryid": 12, + "service": 13, + "short_query": 3 + }, + "renameByName": { + "Value": "VALUE", + "datname": "Database Name", + "name": "", + "queryid": "Query Id", + "rolname": "Role Name", + "short_query": "" + } + } + } }, { - "params": [ - "null" - ], - "type": "fill" + "kind": "Transformation", + "group": "seriesToColumns", + "spec": { + "options": { + "byField": "Short Query" + } + } } ], - "interval": "", - "legendFormat": "Working Set", - "measurement": "memory/usage", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT max(\"value\") FROM \"memory/usage\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "table", + "version": "13.0.6", + "spec": { + "options": { + "cellHeight": "sm", + "showHeader": true, + "sortBy": [ { - "params": [], - "type": "sum" + "desc": true, + "displayName": "Database Name" } ] - ], - "tags": [ - { - "key": "type", - "operator": "=", - "value": "pod_container" - }, - { - "condition": "AND", - "key": "namespace_name", - "operator": "=~", - "value": "/$namespace$/" - }, - { - "condition": "AND", - "key": "pod_name", - "operator": "=~", - "value": "/$podname$/" - } - ] - }, - { - "alias": "working set", - "datasource": { - "uid": "$datasource" }, - "dsType": "influxdb", - "expr": "sum(container_spec_memory_limit_bytes{image!=\"\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}) by (pod_name)", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "container_name" - ], - "type": "tag" + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "footer": { + "reducers": [] + }, + "inspect": false + } }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "limits", - "measurement": "memory/usage", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT max(\"value\") FROM \"memory/working_set\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", - "rawQuery": true, - "refId": "G", - "resultFormat": "time_series", - "select": [ - [ + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "VALUE" + }, + "properties": [ + { + "id": "displayName", + "value": "$column" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "short_query" + }, + "properties": [ + { + "id": "displayName", + "value": "Short Query" + } + ] + }, { - "params": [ - "value" - ], - "type": "field" + "matcher": { + "id": "byName", + "options": "Short Query" + }, + "properties": [ + { + "id": "custom.width", + "value": 633 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.width", + "value": 219 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "calls" + }, + "properties": [ + { + "id": "custom.width", + "value": 165 + } + ] }, { - "params": [], - "type": "sum" + "matcher": { + "id": "byName", + "options": "Query Id" + }, + "properties": [ + { + "id": "custom.width", + "value": 322 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Database Name" + }, + "properties": [ + { + "id": "custom.width", + "value": 346 + } + ] } ] - ], - "tags": [ - { - "key": "type", - "operator": "=", - "value": "pod_container" - }, - { - "condition": "AND", - "key": "namespace_name", - "operator": "=~", - "value": "/$namespace$/" - }, - { - "condition": "AND", - "key": "pod_name", - "operator": "=~", - "value": "/$podname$/" - } - ] - }, - { - "datasource": { - "uid": "$datasource" - }, - "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", - "interval": "", - "legendFormat": "Memory Usage", - "refId": "B" - }, - { - "datasource": { - "uid": "$datasource" - }, - "expr": "sum(container_memory_cache{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", - "interval": "", - "legendFormat": "Memory Cache", - "refId": "C" + } } - ], - "title": "Memory Usage: $namespace_pods", - "type": "timeseries" + } } - ], - "title": "Memory Usage", - "type": "row" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 5 - }, - "id": 1101, - "panels": [], - "title": "PG Large Object Stats", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" }, - "description": "Shows objects and chunks count for PG Large Objects.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Count", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" + "panel-1092": { + "kind": "Panel", + "spec": { + "id": 1092, + "title": "DbaaS Mappings", + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "sum by (datname, db_namespace, microservice, tenant_id) (last_over_time(ma_pg_dbaas{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__range:]))", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} } }, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "vizConfig": { + "kind": "VizConfig", + "group": "table", + "version": "11.2.1", + "spec": { + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": true, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "microservice" + } + ] }, - { - "color": "red", - "value": 80 + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] } - ] + } } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 6 - }, - "id": 1100, - "options": { - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" } }, - "pluginVersion": "11.5.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" + "panel-1094": { + "kind": "Panel", + "spec": { + "id": 1094, + "title": "Version", + "description": "Postgres server version", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "disableTextWrap": false, + "editorMode": "code", + "expr": "postgres_version{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "format": "table", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "useBackend": false + } + }, + "refId": "pg_version", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } }, - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_large_object_object_count{namespace=~\"$namespace\", datname=~\"$datname\"}", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "{{datname}}", - "range": true, - "refId": "B", - "useBackend": false + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "13.0.6", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^Value$/", + "values": false + }, + "showPercentChange": false, + "textMode": "value", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "string", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "thresholds" + } + }, + "overrides": [] + } + } + } } - ], - "title": "Large Objects Count", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" }, - "description": "Shows total size of PG Large objects in bytes.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Size in bytes", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" + "panel-1095": { + "kind": "Panel", + "spec": { + "id": 1095, + "title": "Active Temp Writes", + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_active_temp_writes{namespace=~\"$namespace\", datname=~\"$datname\", usename=~\"$usename\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} } }, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "11.5.2", + "spec": { + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } }, - { - "color": "red", - "value": 80 + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Queries Count", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" + } + } + }, + "overrides": [] } - ] + } } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 6 - }, - "id": 1102, - "options": { - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.5.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" - }, - "disableTextWrap": false, - "editorMode": "builder", - "exemplar": false, - "expr": "ma_pg_large_object_total_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\"}", - "format": "time_series", - "fullMetaSearch": false, - "hide": false, - "includeNullMetadata": true, - "instant": false, - "interval": "", - "legendFormat": "{{datname}}", - "range": true, - "refId": "B", - "useBackend": false } - ], - "title": "Size of large objects", - "type": "timeseries" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 }, - "id": 984, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" + "panel-1097": { + "kind": "Panel", + "spec": { + "id": 1097, + "title": "Temporary Files Count By Database", + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_temp_file_count_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } }, - "description": "Shows the number of connections to PostgreSQL pods.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "11.5.2", + "spec": { + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "displayName", - "value": "Limits" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Limits" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Temp Files Count", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" } } - ] + }, + "overrides": [] } - ] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 56 - }, - "id": 6, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" + } + } + } + }, + "panel-1098": { + "kind": "Panel", + "spec": { + "id": 1098, + "title": "Temporary Files Size By Database", + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_temp_file_size_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": {} } }, - "pluginVersion": "9.5.8", - "targets": [ - { - "alias": "$4", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_current_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "11.5.2", + "spec": { + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*\\.current_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Temp File Size", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" + } } - ] + }, + "overrides": [] + } + } + } + } + }, + "panel-1099": { + "kind": "Panel", + "spec": { + "id": 1099, + "title": "Temporary Files Size By Query", + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_temp_file_size_by_query{namespace=~\"$namespace\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "useBackend": false + } + }, + "refId": "A", + "hidden": false + } + } ], - "tags": [] - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "editorMode": "builder", - "expr": "ma_pg_metrics_postgres_max_connections{namespace=\"$namespace\"}", - "format": "table", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" + "transformations": [], + "queryOptions": {} } - ], - "title": "Current Connections", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the number of replication connections to PostgreSQL pods.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "11.5.2", + "spec": { + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Temp File Size", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" + } } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 56 - }, + }, + "overrides": [] + } + } + } + } + }, + "panel-11": { + "kind": "Panel", + "spec": { "id": 11, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull" + "title": "Replication Connections", + "description": "Shows the number of replication connections to PostgreSQL pods.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_replication_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*pg_metrics\\.replication_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "9.5.8", - "targets": [ - { - "alias": "$4", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_replication_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.5.8", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*pg_metrics\\.replication_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], - "title": "Replication Connections", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" - }, - "description": "Estimated value for transactions per second. Calculated as transaction amount for last 30 seconds divided by 30.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 + } + } + }, + "panel-1100": { + "kind": "Panel", + "spec": { + "id": 1100, + "title": "Large Objects Count", + "description": "Shows objects and chunks count for PG Large Objects.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_large_object_object_count{namespace=~\"$namespace\", datname=~\"$datname\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{datname}}", + "range": true, + "useBackend": false + } + }, + "refId": "B", + "hidden": false } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 56 - }, - "id": 14, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": {} } }, - "pluginVersion": "9.5.8", - "targets": [ - { - "alias": "$4", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "sum(irate(ma_pg_metrics_xact_sum{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__rate_interval]))", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "13.0.6", + "spec": { + "options": { + "annotations": { + "clustering": -1, + "multiLane": false }, - { - "params": [ - "null" + "legend": { + "calcs": [ + "last" ], - "type": "fill" + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT non_negative_derivative(mean(\"value\"), 1s) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xact_sum/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "fieldMinMax": false + }, + "overrides": [] + } } - ], - "title": "TPS", - "type": "timeseries" + } } - ], - "title": "Network", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 15 }, - "id": 985, - "panels": [ - { - "datasource": { - "uid": "$datasource" - }, - "description": "Shows disk usage for PostgreSQL pods.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 + "panel-1102": { + "kind": "Panel", + "spec": { + "id": 1102, + "title": "Size of large objects", + "description": "Shows total size of PG Large objects in bytes.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "exemplar": false, + "expr": "ma_pg_large_object_total_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\"}", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "interval": "", + "legendFormat": "{{datname}}", + "range": true, + "useBackend": false + } + }, + "refId": "B", + "hidden": false } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 3, - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": {} } }, - "pluginVersion": "11.5.2", - "targets": [ - { - "alias": "$4", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_metrics_df_pcent{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "13.0.6", + "spec": { + "options": { + "annotations": { + "clustering": -1, + "multiLane": false }, - { - "params": [ - "null" + "legend": { + "calcs": [ + "last" ], - "type": "fill" + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.metrics\\.df\\.pcent/ WHERE namespace='$namespace' and $timeFilter group by service_name", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Size in bytes", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "fieldMinMax": false + }, + "overrides": [] + } + } + } + } + }, + "panel-1103": { + "kind": "Panel", + "spec": { + "id": 1103, + "title": "Default Partition Size (bytes)", + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "spec": { + "editorMode": "builder", + "expr": "sum by(relname, datname) (ma_pg_default_partition_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\", relname=~\"$relname\", cluster=~\"$cluster\"})", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "{{datname}}/{{ relname }}", + "range": true + } + }, + "refId": "B", + "hidden": false } - ] + } ], - "tags": [] + "transformations": [], + "queryOptions": {} } - ], - "title": "Disk Usage Percentage", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" }, - "description": "Shows usage by well-known consumers, such as pg_xlog or base directories.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "13.0.6", + "spec": { + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "unit": "decbytes", + "thresholds": { + "mode": "percentage", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic", + "fixedColor": "green" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "hue", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - }, - "unit": "decbytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "ma_pg_patroni_metrics_du_base" }, - "properties": [ - { - "id": "unit", - "value": "deckbytes" - } - ] + "overrides": [] } - ] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 44 - }, - "id": 901, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" } - }, - "pluginVersion": "10.3.3", - "repeat": "short_container_name", - "repeatDirection": "h", - "targets": [ - { - "alias": "$7", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_patroni_metrics_du_base{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.$short_container_name\\.metrics\\.du\\.(.?)/ WHERE namespace='$namespace' and $timeFilter group by service_name", - "range": true, - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" + } + } + }, + "panel-1104": { + "kind": "Panel", + "spec": { + "id": 1104, + "title": "Default Partition Row count", + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "spec": { + "editorMode": "builder", + "expr": "sum by(relname, datname) (ma_pg_default_partition_row_count{relname=~\"$relname\", datname=~\"$datname\", cluster=~\"$cluster\", namespace=\"$namespace\"})", + "legendFormat": "{{datname}}/{{ relname }}", + "range": true + } + }, + "refId": "A", + "hidden": false } - ] + } ], - "tags": [] + "transformations": [], + "queryOptions": {} } - ], - "title": "Disk Usage", - "type": "timeseries" - } - ], - "title": "Disk space", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 986, - "panels": [ - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows current DB count in PostgreSQL pods.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "13.0.6", + "spec": { + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "fieldConfig": { + "defaults": { + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic", + "fixedColor": "green" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 17 - }, - "id": 5, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" + }, + "overrides": [] + } + } + } + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "id": 12, + "title": "Locks", + "description": "Number of locks from pg_locks view.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_locks{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks$/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "11.5.2", - "targets": [ - { - "alias": "$4", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_db_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "11.5.2", + "spec": { + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" ], - "type": "fill" + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.db_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] + }, + "overrides": [] + } + } + } + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "id": 13, + "title": "Locks not granted", + "description": "Number of locks from pg_locks view that are not granted.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_locks_not_granted{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks_not_granted/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "tags": [] + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } - ], - "title": "DataBases Count", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows current XLOG location. This value is correlated with the transaction count, or the number of changes made to the database.\nThe master and replica should have the same value, with a short period while the replica catches up to the master. \nThe value on the replica can be slightly less than the master's, but should increase over time.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "11.5.2", + "spec": { + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 17 - }, - "id": 19, - "options": { - "legend": { - "calcs": [ - "lastNotNull" + }, + "overrides": [] + } + } + } + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "id": 14, + "title": "TPS", + "description": "Estimated value for transactions per second. Calculated as transaction amount for last 30 seconds divided by 30.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "sum(irate(ma_pg_metrics_xact_sum{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__rate_interval]))", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT non_negative_derivative(mean(\"value\"), 1s) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xact_sum/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "11.5.2", - "targets": [ - { - "alias": "$4", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_xlog_location{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.5.8", + "spec": { + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "select /value/ from /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xlog_location/ where namespace = '$namespace' and $timeFilter", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], - "title": "XLOG Location", - "type": "timeseries" + } } - ], - "title": "Data handing", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 17 }, - "id": 987, - "panels": [ - { - "datasource": { - "uid": "$datasource" - }, - "description": "Number of locks from pg_locks view.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 + "panel-15": { + "kind": "Panel", + "spec": { + "id": 15, + "title": "Endpoint Cluster Status (1 = Running)", + "description": "Shows whether monitoring is able to connect to PostgreSQL through the endpoint.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "expr": "ma_pg_endpoints_cluster_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Leader", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 18 - }, - "id": 12, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "11.5.2", - "targets": [ - { - "alias": "$4", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_locks{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.5.8", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks$/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], - "title": "Locks", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" - }, - "description": "Number of locks from pg_locks view that are not granted.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 + } + } + }, + "panel-16": { + "kind": "Panel", + "spec": { + "id": 16, + "title": "Smoke Tests Timings", + "description": "Shows the execution time for a **single** RW request (select, insert, update, delete) through the endpoint.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "delete", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{action}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 18 - }, - "id": 13, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "11.5.2", - "targets": [ - { - "alias": "$4", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_locks_not_granted{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.5.8", + "spec": { + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean", + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks_not_granted/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - ], - "tags": [] - } - ], - "title": "Locks not granted", - "type": "timeseries" + }, + "overrides": [] + } + } + } } - ], - "title": "Locks", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 18 }, - "id": 988, - "panels": [ - { - "datasource": { - "uid": "$datasource" - }, + "panel-17": { + "kind": "Panel", + "spec": { + "id": 17, + "title": "Smoke Test", "description": "This like the \"Smoke test\" section, with one difference - this section executes smoketests directly on the master pod.\nThe difference in execution allows distinguishing between cases of master unavailability and endpoint failure.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 12, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "always", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "percent" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "delete", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{action}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.*.smoketest.delete.*check$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 60 - }, - "id": 17, - "interval": "$inter", - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "9.5.5", - "targets": [ - { - "alias": "delete", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" } ], - "interval": "", - "legendFormat": "{{action}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.*.smoketest.delete.*check$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } - ], - "title": "Smoke Test", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "This like the \"Smoke test\" section, with one difference - this section executes smoketests directly on the master pod.\n The difference in execution allows distinguishing between cases of master unavailability and endpoint failure.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.5.5", + "spec": { + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 12, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "always", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "percent" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 60 - }, + }, + "overrides": [] + } + } + } + } + }, + "panel-18": { + "kind": "Panel", + "spec": { "id": 18, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "min", - "max", - "mean", - "lastNotNull" + "title": "Smoke Tests Timings", + "description": "This like the \"Smoke test\" section, with one difference - this section executes smoketests directly on the master pod.\n The difference in execution allows distinguishing between cases of master unavailability and endpoint failure.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$6", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{action}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "9.5.5", - "targets": [ - { - "alias": "$6", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.5.5", + "spec": { + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean", + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "{{action}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], - "title": "Smoke Tests Timings", - "type": "timeseries" + } } - ], - "title": "Master Smoke Test", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 19 }, - "id": 989, - "panels": [ - { - "datasource": { - "uid": "$datasource" + "panel-19": { + "kind": "Panel", + "spec": { + "id": 19, + "title": "XLOG Location", + "description": "Shows current XLOG location. This value is correlated with the transaction count, or the number of changes made to the database.\nThe master and replica should have the same value, with a short period while the replica catches up to the master. \nThe value on the replica can be slightly less than the master's, but should increase over time.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_xlog_location{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "select /value/ from /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xlog_location/ where namespace = '$namespace' and $timeFilter", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } }, - "description": "Shows the size of the last backup.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "11.5.2", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "unit": "bytes", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 61 - }, - "id": 31, - "interval": "$inter", - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" + }, + "overrides": [] + } } - }, - "pluginVersion": "9.0.7", - "targets": [ + } + } + }, + "panel-20": { + "kind": "Panel", + "spec": { + "id": 20, + "title": "CPU Usage: $namespace_pods", + "description": "Shows CPU consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", + "links": [ { - "alias": "", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_storage_last_metrics_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Size", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM \"ma.storage.last.metrics.size\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" + "title": "Kubernetes Pods", + "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables", + "targetBlank": true + } + ], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "usage", + "dsType": "influxdb", + "expr": "sum(rate(container_cpu_usage_seconds_total{image!=\"\", container!=\"POD\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}[2m])) by (pod_name, container)", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "container" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "", + "legendFormat": "usage", + "measurement": "cpu/usage_rate", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM \"cpu/usage_rate\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "type", + "operator": "=", + "value": "pod_container" + }, + { + "condition": "AND", + "key": "namespace_name", + "operator": "=~", + "value": "/$namespace$/" + }, + { + "condition": "AND", + "key": "pod_name", + "operator": "=~", + "value": "/$podname$/" + } + ] + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "kube_pod_container_resource_limits_cpu_cores{exported_namespace=\"$namespace\", exported_pod=\"$namespace_pods\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "limit" + } + }, + "refId": "B", + "hidden": false } - ] + } ], - "tags": [] + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } - ], - "title": "Backup Last Version Size", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the space occupied by backups and the remaining amount of space. \nNot all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.5.8", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "unit": "short", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Cores", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - }, - "unit": "decbytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Total Volume Space" }, - "properties": [ + "overrides": [ { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } + "matcher": { + "id": "byName", + "options": "limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.lineWidth", + "value": 2 + } + ] }, { - "id": "custom.fillOpacity", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Space Used" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#629E51", - "mode": "fixed" - } + "matcher": { + "id": "byName", + "options": "request" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#EF843C", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] }, { - "id": "custom.fillOpacity", - "value": 20 + "matcher": { + "id": "byRegexp", + "options": "/^usage/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#7EB26D", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] } ] } - ] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 61 - }, - "id": 32, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull" + } + } + } + }, + "panel-22": { + "kind": "Panel", + "spec": { + "id": 22, + "title": "Memory Usage: $namespace_pods", + "description": "Shows memory consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", + "links": [ + { + "title": "Kubernetes Pods", + "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables", + "targetBlank": true + } + ], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "usage", + "dsType": "influxdb", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "container_name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Working Set", + "measurement": "memory/usage", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT max(\"value\") FROM \"memory/usage\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "type", + "operator": "=", + "value": "pod_container" + }, + { + "condition": "AND", + "key": "namespace_name", + "operator": "=~", + "value": "/$namespace$/" + }, + { + "condition": "AND", + "key": "pod_name", + "operator": "=~", + "value": "/$podname$/" + } + ] + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "working set", + "dsType": "influxdb", + "expr": "sum(container_spec_memory_limit_bytes{image!=\"\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}) by (pod_name)", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "container_name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "limits", + "measurement": "memory/usage", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT max(\"value\") FROM \"memory/working_set\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "type", + "operator": "=", + "value": "pod_container" + }, + { + "condition": "AND", + "key": "namespace_name", + "operator": "=~", + "value": "/$namespace$/" + }, + { + "condition": "AND", + "key": "pod_name", + "operator": "=~", + "value": "/$podname$/" + } + ] + } + }, + "refId": "G", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", + "interval": "", + "legendFormat": "Memory Usage" + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "expr": "sum(container_memory_cache{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", + "interval": "", + "legendFormat": "Memory Cache" + } + }, + "refId": "C", + "hidden": false + } + } ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "9.0.7", - "targets": [ - { - "alias": "Space Used", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_storage_total_space{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.5.8", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "Total Space", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /storage\\.size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - { - "alias": "Total Volume Space", - "datasource": { - "uid": "$datasource" }, - "dsType": "influxdb", - "expr": "ma_storage_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" + "fieldConfig": { + "defaults": { + "unit": "bytes", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Memory", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + } }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Storage Size", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /storage\\.total_space/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "refId": "B", - "resultFormat": "time_series", - "select": [ - [ + "overrides": [ { - "params": [ - "value" - ], - "type": "field" + "matcher": { + "id": "byRegexp", + "options": "/^limit/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.lineWidth", + "value": 2 + } + ] }, { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - ], - "title": "Storage Size/Free Space", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" - }, - "description": "Shows time spent on last backup.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ + "matcher": { + "id": "byRegexp", + "options": "/^request/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#EF843C", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + }, { - "color": "green" + "matcher": { + "id": "byRegexp", + "options": "/^usage/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#7EB26D", + "mode": "fixed" + } + } + ] }, { - "color": "red", - "value": 80 + "matcher": { + "id": "byRegexp", + "options": "/^working set/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#6ED0E0", + "mode": "fixed" + } + } + ] } ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 12, - "y": 61 - }, - "id": 33, - "interval": "$inter", - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" + } + } + } + } + }, + "panel-29": { + "kind": "Panel", + "spec": { + "id": 29, + "title": "Last Backup Status", + "description": "Backup status shows the state of the backup daemon. The backup status can be one of following:\n \n* OK - There is at least one successful backup, and the latest backup is successful.\n* WARNING - There are no successful backups, or the last backup failed.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "expr": "ma_status{namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /status/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": { + "maxDataPoints": 100, + "interval": "$inter" + } } }, - "pluginVersion": "9.0.7", - "targets": [ - { - "alias": "Time Spent on Each Backup", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_storage_lastSuccessful_metrics_spent_time{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "11.2.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "type": "time" - }, - { - "params": [ - "null" + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "decimals": 0, + "mappings": [ + { + "type": "value", + "options": { + "0": { + "text": "OK" + }, + "3": { + "text": "WARN" + }, + "6": { + "text": "FAILED" + }, + "-1": { + "text": "N/A" + } + } + }, + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "N/A" + } + } + } ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Time Spent", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /storage\\.lastSuccessful\\.metrics\\.spent_time/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "rgba(50, 172, 45, 0.97)" + }, + { + "value": 1, + "color": "rgba(237, 129, 40, 0.89)" + }, + { + "value": 4, + "color": "rgba(245, 54, 54, 0.9)" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "thresholds" } - ] + }, + "overrides": [] + } + } + } + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "id": 3, + "title": "Disk Usage Percentage", + "description": "Shows disk usage for PostgreSQL pods.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_metrics_df_pcent{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.metrics\\.df\\.pcent/ WHERE namespace='$namespace' and $timeFilter group by service_name", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "tags": [] + "transformations": [], + "queryOptions": {} } - ], - "title": "Time Spent on Backup", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the changes of activity status on the chart.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "11.5.2", + "spec": { + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "unit": "percent", + "min": 0, + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 18, - "y": 61 - }, - "id": 46, - "interval": "$inter", - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "9.0.7", - "targets": [ - { - "alias": "Time Spent on Each Backup", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Time in progress", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" + "overrides": [] + } + } + } + } + }, + "panel-31": { + "kind": "Panel", + "spec": { + "id": 31, + "title": "Backup Last Version Size", + "description": "Shows the size of the last backup.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "", + "dsType": "influxdb", + "expr": "ma_storage_last_metrics_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Size", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM \"ma.storage.last.metrics.size\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] + } ], - "tags": [] + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } - ], - "title": "Backup Activity Status", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Backup status shows the state of the backup daemon. The backup status can be one of following:\n \n* OK - There is at least one successful backup, and the latest backup is successful.\n* WARNING - There are no successful backups, or the last backup failed.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.0.7", + "spec": { + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "decimals": 0, - "mappings": [ - { - "options": { - "0": { - "text": "OK" + "fieldConfig": { + "defaults": { + "unit": "decbytes", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "3": { - "text": "WARN" + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "6": { - "text": "FAILED" + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "-1": { - "text": "N/A" + "thresholdsStyle": { + "mode": "off" } - }, - "type": "value" + } }, - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 1 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 4 + "overrides": [] + } + } + } + } + }, + "panel-32": { + "kind": "Panel", + "spec": { + "id": 32, + "title": "Storage Size/Free Space", + "description": "Shows the space occupied by backups and the remaining amount of space. \nNot all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "Space Used", + "dsType": "influxdb", + "expr": "ma_storage_total_space{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Total Space", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /storage\\.size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "Total Volume Space", + "dsType": "influxdb", + "expr": "ma_storage_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Storage Size", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /storage\\.total_space/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "B", + "hidden": false } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 4, - "x": 0, - "y": 76 - }, - "id": 29, - "interval": "$inter", - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" + } ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "transformations": [], + "queryOptions": { + "interval": "$inter" + } + } }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_status{namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.0.7", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "bottom", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /status/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ + }, + "fieldConfig": { + "defaults": { + "unit": "decbytes", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [ { - "params": [ - "value" - ], - "type": "field" + "matcher": { + "id": "byName", + "options": "Total Volume Space" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] }, { - "params": [], - "type": "mean" + "matcher": { + "id": "byName", + "options": "Space Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#629E51", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] } ] + } + } + } + } + }, + "panel-33": { + "kind": "Panel", + "spec": { + "id": 33, + "title": "Time Spent on Backup", + "description": "Shows time spent on last backup.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "Time Spent on Each Backup", + "dsType": "influxdb", + "expr": "ma_storage_lastSuccessful_metrics_spent_time{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Time Spent", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /storage\\.lastSuccessful\\.metrics\\.spent_time/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "tags": [] + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } - ], - "title": "Last Backup Status", - "type": "stat" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the backup storage type.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "PV" - } - }, - "type": "special" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.0.7", + "spec": { + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + }, + "fieldConfig": { + "defaults": { + "unit": "ms", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 4, - "y": 76 - }, - "id": 40, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" + }, + "overrides": [] + } + } + } + } + }, + "panel-37": { + "kind": "Panel", + "spec": { + "id": 37, + "title": "Time of Last Backup", + "description": "Shows the period of time when the last backup process was ended.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "expr": "ma_storage_last_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.last.metrics.end_timestamp", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.last.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "transformations": [], + "queryOptions": { + "maxDataPoints": 100, + "interval": "$inter" + } + } }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "", - "groupBy": [ - { - "params": [ - "$__interval" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "11.2.1", + "spec": { + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "type": "time" - }, - { - "params": [ - "null" + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "ms", + "decimals": 0, + "mappings": [ + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "N/A" + } + } + } ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.type", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM \"ma.storage.type\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "last" + "color": { + "mode": "thresholds" } - ] + }, + "overrides": [] + } + } + } + } + }, + "panel-38": { + "kind": "Panel", + "spec": { + "id": 38, + "title": "Backup Activity Status", + "description": "Shows the current activity status of the backup daemon. The activity status can be one of following:\n* Not Active - There is no running backup process.\n* In Progress - The backup process is running.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.backup_is_in_progress", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "tags": [] - }, - { - "datasource": { - "uid": "$datasource" - }, - "refId": "B" + "transformations": [], + "queryOptions": { + "maxDataPoints": 100, + "interval": "$inter" + } } - ], - "title": "Storage Type", - "type": "stat" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the current activity status of the backup daemon. The activity status can be one of following:\n* Not Active - There is no running backup process.\n* In Progress - The backup process is running.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "text": "Not Active" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "11.2.1", + "spec": { + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "mappings": [ + { + "type": "value", + "options": { + "0": { + "text": "Not Active" + }, + "1": { + "text": "In Progress" + } + } }, - "1": { - "text": "In Progress" + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "N/A" + } + } } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "rgba(245, 54, 54, 0.9)" + }, + { + "value": 0, + "color": "rgba(237, 129, 40, 0.89)" + }, + { + "value": 0.5, + "color": "rgba(50, 172, 45, 0.97)" + } + ] }, - "type": "value" + "color": { + "mode": "thresholds" + } }, - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)" - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 0 - }, - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 0.5 + "overrides": [] + } + } + } + } + }, + "panel-40": { + "kind": "Panel", + "spec": { + "id": 40, + "title": "Storage Type", + "description": "Shows the backup storage type.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "expr": "", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.type", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM \"ma.storage.type\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 9, - "y": 76 - }, - "id": 38, - "interval": "$inter", - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" }, { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.backup_is_in_progress", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": {} + }, + "refId": "B", + "hidden": false } - ] + } ], - "tags": [] + "transformations": [], + "queryOptions": { + "maxDataPoints": 100 + } } - ], - "title": "Backup Activity Status", - "type": "stat" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the period of time when the last successful backup process was ended.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "11.2.1", + "spec": { + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "mappings": [ + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "PV" + } + } } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 + "color": { + "mode": "thresholds" } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 14, - "y": 76 - }, + }, + "overrides": [] + } + } + } + } + }, + "panel-41": { + "kind": "Panel", + "spec": { "id": 41, - "interval": "$inter", - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" + "title": "Time of Last Successful Backup", + "description": "Shows the period of time when the last successful backup process was ended.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "expr": "ma_storage_lastSuccessful_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.last.metrics.end_timestamp", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.lastSuccessful.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "transformations": [], + "queryOptions": { + "maxDataPoints": 100, + "interval": "$inter" + } + } }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_storage_lastSuccessful_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "11.2.1", + "spec": { + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "type": "time" - }, - { - "params": [ - "null" + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "ms", + "decimals": 0, + "mappings": [ + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "N/A" + } + } + } ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.last.metrics.end_timestamp", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.lastSuccessful.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "last" + "color": { + "mode": "thresholds" } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], - "title": "Time of Last Successful Backup", - "type": "stat" - }, - { - "datasource": { - "uid": "$datasource" - }, - "description": "Shows the period of time when the last backup process was ended.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 + } + } + }, + "panel-42": { + "kind": "Panel", + "spec": { + "id": 42, + "title": "Backup Versions Count", + "description": "Shows the amount of available backups.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "expr": "ma_storage_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.dump_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 19, - "y": 76 - }, - "id": 37, - "interval": "$inter", - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" + } ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "transformations": [], + "queryOptions": { + "maxDataPoints": 100, + "interval": "$inter" + } + } }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_storage_last_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "11.2.1", + "spec": { + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "type": "time" - }, - { - "params": [ - "null" + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "mappings": [ + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "N/A" + } + } + } ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.last.metrics.end_timestamp", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.last.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "last" + "color": { + "mode": "thresholds" } - ] + }, + "overrides": [] + } + } + } + } + }, + "panel-43": { + "kind": "Panel", + "spec": { + "id": 43, + "title": "Successful Backup Versions Count", + "description": "Shows the amount of successful backups.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "expr": "ma_storage_successful_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.dump_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.successful_dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "tags": [] + "transformations": [], + "queryOptions": { + "maxDataPoints": 100, + "interval": "$inter" + } } - ], - "title": "Time of Last Backup", - "type": "stat" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the number of backups that will be evicted next time.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "11.2.1", + "spec": { + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "mappings": [ + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "N/A" + } + } } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 0.5 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 1.5 + "color": { + "mode": "thresholds" } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 4, - "x": 0, - "y": 104 - }, - "id": 45, - "interval": "$inter", - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" + }, + "overrides": [] + } + } + } + } + }, + "panel-44": { + "kind": "Panel", + "spec": { + "id": 44, + "title": "Next Backup", + "description": "Shows the time when backup and eviction will be started.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "expr": "ma_backup_time_until_next_backup{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.dump_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.backup.time_until_next_backup\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "transformations": [], + "queryOptions": { + "maxDataPoints": 100, + "interval": "$inter" + } + } }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_storage_outdated_backup_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "11.2.1", + "spec": { + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "type": "time" - }, - { - "params": [ - "null" + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "s", + "decimals": 0, + "mappings": [ + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "N/A" + } + } + } ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.foul_backup_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.outdated_backup_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "last" + "color": { + "mode": "thresholds" } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], + } + } + }, + "panel-45": { + "kind": "Panel", + "spec": { + "id": 45, "title": "Outdated Backup Count", - "type": "stat" - }, - { - "datasource": { - "uid": "$datasource" - }, - "description": "Shows the time when backup and eviction will be started.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 + "description": "Shows the number of backups that will be evicted next time.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "dsType": "influxdb", + "expr": "ma_storage_outdated_backup_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.foul_backup_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.outdated_backup_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 4, - "y": 104 - }, - "id": 44, - "interval": "$inter", - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" + } ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "transformations": [], + "queryOptions": { + "maxDataPoints": 100, + "interval": "$inter" + } + } }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_backup_time_until_next_backup{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "11.2.1", + "spec": { + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "type": "time" - }, - { - "params": [ - "null" + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "mappings": [ + { + "type": "special", + "options": { + "match": "null", + "result": { + "text": "N/A" + } + } + } ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.dump_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.backup.time_until_next_backup\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "rgba(50, 172, 45, 0.97)" + }, + { + "value": 0.5, + "color": "rgba(237, 129, 40, 0.89)" + }, + { + "value": 1.5, + "color": "rgba(245, 54, 54, 0.9)" + } + ] }, - { - "params": [], - "type": "last" + "color": { + "mode": "thresholds" } - ] + }, + "overrides": [] + } + } + } + } + }, + "panel-46": { + "kind": "Panel", + "spec": { + "id": 46, + "title": "Backup Activity Status", + "description": "Shows the changes of activity status on the chart.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "Time Spent on Each Backup", + "dsType": "influxdb", + "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Time in progress", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "tags": [] + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } - ], - "title": "Next Backup", - "type": "stat" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the amount of successful backups.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.0.7", + "spec": { + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } + "fieldConfig": { + "defaults": { + "unit": "ms", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - "type": "special" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [] + } + } + } + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "id": 5, + "title": "DataBases Count", + "description": "Shows current DB count in PostgreSQL pods.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_db_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.db_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } } ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "11.5.2", + "spec": { + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 9, - "y": 104 - }, - "id": 43, - "interval": "$inter", - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" + }, + "overrides": [] + } + } + } + } + }, + "panel-6": { + "kind": "Panel", + "spec": { + "id": 6, + "title": "Current Connections", + "description": "Shows the number of connections to PostgreSQL pods.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_current_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*\\.current_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "editorMode": "builder", + "expr": "ma_pg_metrics_postgres_max_connections{namespace=\"$namespace\"}", + "format": "table", + "legendFormat": "__auto", + "range": true + } + }, + "refId": "B", + "hidden": false + } + } ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "transformations": [], + "queryOptions": { + "interval": "$inter" + } + } }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_storage_successful_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.5.8", + "spec": { + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.dump_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.successful_dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ + }, + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + } + }, + "overrides": [ { - "params": [ - "value" - ], - "type": "field" + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "displayName", + "value": "Limits" + } + ] }, { - "params": [], - "type": "last" + "matcher": { + "id": "byName", + "options": "Limits" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + } + ] } ] + } + } + } + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "id": 7, + "title": "Running Nodes (1 = OK)", + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.pg_metrics.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "tags": [] + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } - ], - "title": "Successful Backup Versions Count", - "type": "stat" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the amount of available backups.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "vizConfig": { + "kind": "VizConfig", + "group": "state-timeline", + "version": "13.0.6", + "spec": { + "options": { + "alignValue": "left", + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "fieldConfig": { + "defaults": { + "unit": "short", + "mappings": [ + { + "type": "value", + "options": { + "0": { + "color": "#F2495C" + }, + "1": { + "color": "#73BF69" + }, + "N/A": { + "color": "#CCC" + }, + "null": { + "text": "N/A" + } + } } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "color": { + "mode": "continuous-GrYlRd" }, - { - "color": "red", - "value": 80 + "custom": { + "axisPlacement": "auto", + "fillOpacity": 100, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 14, - "y": 104 - }, - "id": 42, - "interval": "$inter", - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_storage_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.dump_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] + "overrides": [] + } } - ], - "title": "Backup Versions Count", - "type": "stat" + } } - ], - "title": "Backup", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 20 }, - "id": 990, - "panels": [ - { - "datasource": { - "uid": "$datasource" - }, - "description": "If archive mode is on, then the WAL archive is enabled. Otherwise, the WAL archive is disabled.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "text": "Off" + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Metric Sources (1 = OK)", + "description": "Shows whether metric sources work. If the value is greater than 1, then the source returns error. If the value is zero, then the source is down.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$tag_service_name", + "dsType": "influxdb", + "expr": "ma_status{namespace=\"$namespace\", cluster=~\"$cluster\"} + 1", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ service_name }}", + "orderByTime": "ASC", + "policy": "default", + "query": "select 1 - ( max(\"value\") / 14 - max(\"value\") % 14 / 14) from /ma.status/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } }, - "1": { - "text": "On" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "text": "Off" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 + "refId": "A", + "hidden": false } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 0, - "y": 62 - }, - "id": 1015, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "uid": "$datasource" - }, - "exemplar": true, - "expr": "ma_pg_patroni_pg_metrics_archive_mode_prom{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" } ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM /pg.$cluster_name.*.archive.mode/ WHERE namespace='$namespace' and $timeFilter", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } - ], - "title": "Archive mode", - "type": "stat" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the time in seconds since the last WAL file was archived. If rotation is disabled, and load on server is close to zero, this value can reach thousand of seconds.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "state-timeline", + "version": "13.0.6", + "spec": { + "options": { + "alignValue": "left", + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "unit": "short", + "mappings": [ + { + "type": "value", + "options": { + "0": { + "text": "ERROR", + "color": "#F2495C" + }, + "1": { + "text": "OK", + "color": "#73BF69" + }, + "7": { + "text": "PROBLEM", + "color": "#FF9830" + }, + "N/A": { + "color": "#CCC" + }, + "null": { + "text": "N/A" + } + } + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisPlacement": "auto", + "fillOpacity": 100, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 4, - "y": 62 - }, + }, + "overrides": [] + } + } + } + } + }, + "panel-81": { + "kind": "Panel", + "spec": { "id": 81, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull" + "title": "Archive Lag, s", + "description": "Shows the time in seconds since the last WAL file was archived. If rotation is disabled, and load on server is close to zero, this value can reach thousand of seconds.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$6", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_pg_metrics_archive_delay{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "delay", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.delay$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "9.0.7", - "targets": [ - { - "alias": "$6", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_pg_metrics_archive_delay{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.0.7", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "bottom", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "delay", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.delay$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], - "title": "Archive Lag, s", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" - }, + } + } + }, + "panel-83": { + "kind": "Panel", + "spec": { + "id": 83, + "title": "Failed to archive", "description": "Shows the amount of failed attempts to flush WAL files to archive. If this value is greater than 0, the system checks whether backup daemon is running and has enough space to store files.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$6", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_pg_metrics_archive_failed_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.failed_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 10, - "y": 62 - }, - "id": 83, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull" + } ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } }, - "pluginVersion": "9.0.7", - "targets": [ - { - "alias": "$6", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_pg_metrics_archive_failed_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.0.7", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "bottom", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.failed_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] + }, + "overrides": [] + } + } + } + } + }, + "panel-84": { + "kind": "Panel", + "spec": { + "id": 84, + "title": "Storage Size/Free Space", + "description": "Shows the space occupied by WAL archive and the remaining amount of space. Not all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "Space Used", + "dsType": "influxdb", + "expr": "ma_storage_total_space{exported_namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Total Space", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /storage\\.archive_size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "tags": [] + "transformations": [], + "queryOptions": { + "interval": "$inter" + } } - ], - "title": "Failed to archive", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" }, - "description": "Shows the space occupied by WAL archive and the remaining amount of space. Not all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "9.0.7", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "unit": "decbytes", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Total Volume Space" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - }, - { - "id": "custom.fillOpacity", - "value": 0 } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Space Used" }, - "properties": [ + "overrides": [ { - "id": "color", - "value": { - "fixedColor": "#629E51", - "mode": "fixed" - } + "matcher": { + "id": "byName", + "options": "Total Volume Space" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] }, { - "id": "custom.fillOpacity", - "value": 20 + "matcher": { + "id": "byName", + "options": "Space Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#629E51", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] } ] } - ] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 17, - "y": 62 - }, - "id": 84, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull" + } + } + } + }, + "panel-901": { + "kind": "Panel", + "spec": { + "id": 901, + "title": "Disk Usage", + "description": "Shows usage by well-known consumers, such as pg_xlog or base directories.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "$7", + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_patroni_metrics_du_base{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.$short_container_name\\.metrics\\.du\\.(.?)/ WHERE namespace='$namespace' and $timeFilter group by service_name", + "range": true, + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false + } + } ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": {} } }, - "pluginVersion": "9.0.7", - "targets": [ - { - "alias": "Space Used", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_storage_total_space{exported_namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "10.3.3", + "spec": { + "options": { + "legend": { + "calcs": [ + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Total Space", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /storage\\.archive_size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - ], - "title": "Storage Size/Free Space", - "type": "timeseries" - } - ], - "title": "Archive", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 21 - }, - "id": 991, - "panels": [ - { - "datasource": { - "uid": "$datasource" - }, - "description": "Shows the difference between the current XLOG location and the data that was sent to recipient.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "fieldConfig": { + "defaults": { + "unit": "decbytes", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "color": "red", - "value": 80 + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 63 - }, - "id": 100, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.1.5", - "targets": [ - { - "alias": "$7", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_pg_patroni_replication_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{ hostname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, + "overrides": [ { - "params": [], - "type": "mean" + "matcher": { + "id": "byName", + "options": "ma_pg_patroni_metrics_du_base" + }, + "properties": [ + { + "id": "unit", + "value": "deckbytes" + } + ] } ] - ], - "tags": [] + } } - ], - "title": "Sent lag", - "type": "timeseries" - }, - { - "datasource": { - "uid": "$datasource" - }, - "description": "Shows the difference between the sent XLOG location and applied to the recipient XLOG location.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 + } + } + }, + "panel-910": { + "kind": "Panel", + "spec": { + "id": 910, + "title": "Collector duration", + "description": "", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "alias": "duration", + "dsType": "influxdb", + "expr": "ma_collector_duration{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ host }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT value FROM /collector.duration/ WHERE namespace='$namespace' and $timeFilter fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + }, + "refId": "A", + "hidden": false } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 63 - }, - "id": 101, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull" + } ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "transformations": [], + "queryOptions": {} } }, - "pluginVersion": "10.1.5", - "targets": [ - { - "alias": "$7", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_pg_patroni_replication_state_sent_replay_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "10.1.5", + "spec": { + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "lastNotNull" ], - "type": "time" + "displayMode": "table", + "placement": "right", + "showLegend": true }, - { - "params": [ - "null" - ], - "type": "fill" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "interval": "", - "legendFormat": "{{ hostname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_replay_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" + }, + "fieldConfig": { + "defaults": { + "unit": "ns", + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "green" + }, + { + "value": 80, + "color": "red" + } + ] }, - { - "params": [], - "type": "mean" + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } } - ] - ], - "tags": [] + }, + "overrides": [] + } } - ], - "title": "Sent/Replay lag", - "type": "timeseries" + } } - ], - "title": "Replication state", - "type": "row" + } }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 22 - }, - "id": 992, - "panels": [ - { - "datasource": { - "uid": "$datasource" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "layout": { + "kind": "RowsLayout", + "spec": { + "rows": [ + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Overview", + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 4, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 4, + "y": 0, + "width": 4, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-1077" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 8, + "y": 0, + "width": 2, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-1094" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 10, + "y": 0, + "width": 7, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-7" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 17, + "y": 0, + "width": 7, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + } + ] } - }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ns" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 71 - }, - "id": 910, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + } } }, - "pluginVersion": "10.1.5", - "targets": [ - { - "alias": "duration", - "datasource": { - "uid": "$datasource" - }, - "dsType": "influxdb", - "expr": "ma_collector_duration{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Patroni Status", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 24, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-1023" + } + } + } + ] } - ], - "interval": "", - "legendFormat": "{{ host }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT value FROM /collector.duration/ WHERE namespace='$namespace' and $timeFilter fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] + } } - ], - "title": "Collector duration", - "type": "timeseries" - } - ], - "title": "Collector status", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 23 - }, - "id": 1080, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" }, - "description": "This graph shows size for all of the logical databases in PostgreSQL cluster.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "MiB", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Smoke test", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 8, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-1" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 8, + "y": 0, + "width": 8, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-16" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 16, + "y": 0, + "width": 8, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-15" + } + } + } + ] } - }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bits" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 24 - }, - "id": 1078, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" + } } }, - "pluginVersion": "11.5.2", - "targets": [ - { - "alias": "$4", - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_size_by_database{namespace=\"$namespace\", datname=~\"$datname\"}", - "format": "time_series", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" + { + "kind": "RowsLayoutRow", + "spec": { + "title": "CPU Usage", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 24, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-20" + }, + "repeat": { + "mode": "variable", + "value": "namespace_pods", + "direction": "h" + } + } + } + ] } - ], - "instant": false, - "interval": "", - "legendFormat": "{{ datname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") / 1024 / 1024 FROM /pg.common.size_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] + } } - ], - "title": "Size by database", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" }, - "description": "This graph shows number of table in each of the logical databases.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Memory Usage", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 24, + "height": 6, + "element": { + "kind": "ElementReference", + "name": "panel-22" + }, + "repeat": { + "mode": "variable", + "value": "namespace_pods", + "direction": "h" + } + } + } + ] } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] } - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 24 - }, - "id": 1079, - "options": { - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.5.2", - "targets": [ - { - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "editorMode": "code", - "exemplar": true, - "expr": "count by (datname) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"})", - "interval": "", - "legendFormat": "{{ datname }}", - "range": true, - "refId": "A" } - ], - "title": "Number of Tables", - "type": "timeseries" - } - ], - "title": "Database Statistics", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 24 - }, - "id": 1086, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" }, - "description": "Shows how many connections are in use right now. It shows max connections, used connections, reserved for regular, and superuser.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + { + "kind": "RowsLayoutRow", + "spec": { + "title": "PG Large Object Stats", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-1100" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-1102" + } + } + } + ] } - }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 73 - }, - "id": 1081, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "right", - "showLegend": false, - "width": 250 - }, - "tooltip": { - "mode": "multi", - "sort": "none" + } } }, - "pluginVersion": "10.2.3", - "targets": [ - { - "alias": "$4", - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_connection_count_stat_max_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "stat max connections", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.connection_count_stat.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "range": true, - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - { - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "editorMode": "code", - "expr": "ma_pg_connection_count_stat_reserved_for_reg_users{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "reserved for reg_users", - "range": true, - "refId": "B" - }, - { - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "editorMode": "code", - "expr": "ma_pg_connection_count_stat_reserved_for_superuser{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "reserved for superuser", - "range": true, - "refId": "C" - }, - { - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "editorMode": "code", - "expr": "ma_pg_connection_count_stat_used{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "used", - "range": true, - "refId": "D" - } - ], - "title": "Overall connection statistic", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Shows the number of connections per database.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "displayName", - "value": "Limits" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Limits" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 73 - }, - "id": 1082, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "width": 200 - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.3", - "targets": [ - { - "alias": "$4", - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_connection_by_database{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "instant": false, - "interval": "", - "legendFormat": "{{ datname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - ], - "title": "Connection by database", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Shows the number of connections per role.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 105 - }, - "id": 1083, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "right", - "showLegend": false, - "width": 200 - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.3", - "targets": [ - { - "alias": "$4", - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "dsType": "influxdb", - "editorMode": "code", - "expr": "ma_pg_connection_by_role{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "instant": false, - "interval": "", - "legendFormat": "{{ usename }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - ], - "title": "Connection by role", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "Shows the number of not idle connections per database.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 105 - }, - "id": 1084, - "interval": "$inter", - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "right", - "showLegend": false, - "width": 200 - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.3", - "targets": [ - { - "alias": "$4", - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "dsType": "influxdb", - "editorMode": "code", - "expr": "ma_pg_count_not_idle{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{ datname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.count_not_idle.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "range": true, - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - ], - "title": "Not idle connections by Database", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "This table shows number of Active Connections in current moment by role. Also shows Connection Limits that is set during Role create. Also, shows not idle connection by role.", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Not Idle Connections" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "None": { - "text": "0" - } - }, - "type": "value" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Role" - }, - "properties": [ - { - "id": "custom.width", - "value": 358 - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 114 - }, - "id": 1085, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "editorMode": "code", - "exemplar": false, - "expr": "last_over_time(ma_pg_connection_by_role_with_limit{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}[$__range:])", - "format": "table", - "groupBy": [ - { - "params": [ - "queryid" - ], - "type": "tag" - } - ], - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Connections", - "measurement": "ma.pg.common.queries_stat", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", - "rawQuery": true, - "refId": "A", - "resultFormat": "table", - "select": [ - [ - { - "params": [ - "mean_time" - ], - "type": "field" - }, - { - "params": [ - "30" - ], - "type": "top" - } - ], - [ - { - "params": [ - "calls" - ], - "type": "field" - } - ], - [ - { - "params": [ - "short_query" - ], - "type": "field" - } - ], - [ - { - "params": [ - "datname" - ], - "type": "field" - } - ], - [ - { - "params": [ - "total_time" - ], - "type": "field" - } - ] - ], - "tags": [] - } - ], - "title": "Number of Active Connections by Role", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Value": false, - "__name__": true, - "endpoint": true, - "exported_namespace": true, - "host": true, - "instance": true, - "job": true, - "metric_name": true, - "name": true, - "namespace": true, - "pod": true, - "relid": true, - "service": true, - "short_query": false - }, - "indexByName": { - "Time": 1, - "Value": 12, - "__name__": 2, - "endpoint": 3, - "exported_namespace": 4, - "host": 5, - "instance": 6, - "job": 7, - "limit": 13, - "name": 8, - "namespace": 9, - "pod": 10, - "service": 11, - "usename": 0 - }, - "renameByName": { - "Value": "Connections", - "datname": "Database Name", - "idx_size": "Index Size", - "limit": "Connections Limit", - "name": "", - "namespace": "", - "not_idle_cnt": "Not Idle Connections", - "queryid": "Query Id", - "relname": "Relation Name", - "short_query": "", - "tot_size": "Total Size", - "usename": "Role" - } - } - } - ], - "type": "table" - } - ], - "title": "Connection Statistics", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 25 - }, - "id": 1096, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Temp File Size", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 26 - }, - "id": 1098, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.5.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" - }, - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_temp_file_size_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "refId": "A", - "useBackend": false - } - ], - "title": "Temporary Files Size By Database", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Temp File Size", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 26 - }, - "id": 1099, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.5.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" - }, - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_temp_file_size_by_query{namespace=~\"$namespace\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "refId": "A", - "useBackend": false - } - ], - "title": "Temporary Files Size By Query", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Queries Count", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 34 - }, - "id": 1095, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.5.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" - }, - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_active_temp_writes{namespace=~\"$namespace\", datname=~\"$datname\", usename=~\"$usename\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "refId": "A", - "useBackend": false - } - ], - "title": "Active Temp Writes", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Temp Files Count", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 34 - }, - "id": 1097, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.5.2", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PC3E95692D54ABCC0" - }, - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_temp_file_count_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "refId": "A", - "useBackend": false - } - ], - "title": "Temporary Files Count By Database", - "type": "timeseries" - } - ], - "title": "Temporary File Statistics", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 26 - }, - "id": 1091, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "The table shows TOP tables filtered by the selected database name.", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Table Size" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Total Size" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Index Size" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 74 - }, - "id": 1087, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Table Size" - } - ] - }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "groupBy": [ - { - "params": [ - "queryid" - ], - "type": "tag" - } - ], - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "measurement": "ma.pg.common.queries_stat", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", - "rawQuery": true, - "refId": "A", - "resultFormat": "table", - "select": [ - [ - { - "params": [ - "mean_time" - ], - "type": "field" - }, - { - "params": [ - "30" - ], - "type": "top" - } - ], - [ - { - "params": [ - "calls" - ], - "type": "field" - } - ], - [ - { - "params": [ - "short_query" - ], - "type": "field" - } - ], - [ - { - "params": [ - "datname" - ], - "type": "field" - } - ], - [ - { - "params": [ - "total_time" - ], - "type": "field" - } - ] - ], - "tags": [] - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_tot_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_idx_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "hide": false, - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "D" - } - ], - "title": "TOP $limit tables by size", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "datname", - "relid", - "relname", - "selector", - "Value #A", - "Value #B", - "Value #C", - "Value #D" + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Network", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 8, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-6" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 8, + "y": 0, + "width": 8, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-11" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 16, + "y": 0, + "width": 8, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-14" + } + } + } ] } } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false, - "Value #A": false, - "__name__": true, - "endpoint": true, - "exported_namespace": true, - "host": true, - "instance": true, - "job": true, - "metric_name": true, - "name": true, - "namespace": true, - "pod": true, - "relid": true, - "service": true, - "short_query": false - }, - "indexByName": { - "Value #A": 7, - "Value #B": 4, - "Value #C": 5, - "Value #D": 6, - "datname": 0, - "relid": 1, - "relname": 2, - "selector": 3 - }, - "renameByName": { - "Value": "VALUE", - "Value #A": "Table Size", - "Value #B": "Estimated Number Of Tuples", - "Value #C": "Total Size", - "Value #D": "Index Size", - "datname": "Database Name", - "idx_size": "Index Size", - "live_tuples": "Estimated Number Of Tuples", - "name": "", - "namespace": "", - "pod_name": "", - "queryid": "Query Id", - "relname": "Relation Name", - "service_name": "", - "short_query": "", - "tot_size": "Total Size" - } - } } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" }, - "description": "This Graph Shows size of the each table in all of the databases", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Disk space", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-3" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 28, + "width": 24, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-901" + }, + "repeat": { + "mode": "variable", + "value": "short_container_name", + "direction": "h" + } + } + } + ] } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Value" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] } - ] - }, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 106 - }, - "id": 1088, - "options": { - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "editorMode": "code", - "exemplar": false, - "expr": "topk($table_limit, sort_desc(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", - "instant": false, - "interval": "", - "legendFormat": "{{ datname }}/{{ relname }}", - "range": true, - "refId": "A" } - ], - "title": "Size by tables", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" }, - "description": "This graphs shows estimated number of rows in all of the tables, using `pg_stat_all_tables` system view.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Data handing", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-5" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-19" + } + } + } + ] } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 115 - }, - "id": 1089, - "options": { - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "mode": "single", - "sort": "none" } }, - "targets": [ - { - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "editorMode": "code", - "exemplar": true, - "expr": "topk($table_limit, sort_desc(ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", - "interval": "", - "legendFormat": "{{datname}}/{{ relname }}", - "range": true, - "refId": "A" - } - ], - "title": "Estimated Number of Rows per Table", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "description": "The table shows TOP queries filtered by the selected column and database name. For queries statistics `pg_stat_statements` view used. More info about columns could be find in official docs.\n\nAlso, it is possible to reset the statistics, by calling `pg_stat_statements_reset()` function.", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "VALUE" - }, - "properties": [ - { - "id": "displayName", - "value": "$column" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "short_query" - }, - "properties": [ - { - "id": "displayName", - "value": "Short Query" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Short Query" - }, - "properties": [ - { - "id": "custom.width", - "value": 633 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "custom.width", - "value": 219 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "calls" - }, - "properties": [ - { - "id": "custom.width", - "value": 165 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Query Id" - }, - "properties": [ - { - "id": "custom.width", - "value": 322 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Database Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 346 - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 123 - }, - "id": 1090, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Database Name" - } - ] - }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "0": "$", - "1": "d", - "2": "a", - "3": "t", - "4": "a", - "5": "s", - "6": "o", - "7": "u", - "8": "r", - "9": "c", - "10": "e" - }, - "editorMode": "code", - "exemplar": false, - "expr": "last_over_time(topk($limit,sort_desc(ma_pg_queries_stat{namespace=\"$namespace\", metric_name=\"$column\", datname=~\"$datname\", cluster=~\"$cluster\"}))[$__range:])", - "format": "table", - "groupBy": [ - { - "params": [ - "queryid" - ], - "type": "tag" - } - ], - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "measurement": "ma.pg.common.queries_stat", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", - "rawQuery": true, - "refId": "A", - "resultFormat": "table", - "select": [ - [ - { - "params": [ - "mean_time" - ], - "type": "field" - }, - { - "params": [ - "30" - ], - "type": "top" - } - ], - [ - { - "params": [ - "calls" - ], - "type": "field" - } - ], - [ - { - "params": [ - "short_query" - ], - "type": "field" - } - ], - [ - { - "params": [ - "datname" - ], - "type": "field" - } - ], - [ - { - "params": [ - "total_time" - ], - "type": "field" - } - ] - ], - "tags": [] - } - ], - "title": "TOP $limit queries by $column", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": { - "Value": false, - "__name__": true, - "endpoint": true, - "exported_namespace": true, - "host": true, - "instance": true, - "job": true, - "metric_name": true, - "name": true, - "namespace": true, - "pod": true, - "service": true, - "short_query": false - }, - "indexByName": { - "Time": 0, - "Value": 1, - "__name__": 2, - "endpoint": 4, - "exported_namespace": 5, - "host": 6, - "instance": 7, - "job": 8, - "metric_name": 14, - "name": 9, - "namespace": 10, - "pod": 11, - "queryid": 12, - "service": 13, - "short_query": 3 - }, - "renameByName": { - "Value": "VALUE", - "datname": "Database Name", - "name": "", - "queryid": "Query Id", - "rolname": "Role Name", - "short_query": "" + { + "kind": "RowsLayoutRow", + "spec": { + "title": "Locks", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-12" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-13" + } + } + } + ] } } - }, - { - "id": "seriesToColumns", - "options": { - "byField": "Short Query" - } } - ], - "type": "table" - } - ], - "title": "Tables Statistics", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 1093, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": true, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 75 - }, - "id": 1092, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "microservice" - } - ] }, - "pluginVersion": "11.2.1", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum by (datname, db_namespace, microservice, tenant_id) (last_over_time(ma_pg_dbaas{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__range:]))", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "DbaaS Mappings", - "type": "table" - } - ], - "title": "DBaaS", - "type": "row" - } - ], - "preload": false, - "refresh": "", - "schemaVersion": 40, - "tags": [], - "templating": { - "list": [ - { - "current": { - "text": "Platform Monitoring Prometheus", - "value": "PC3E95692D54ABCC0" - }, - "includeAll": false, - "label": "Cloud", - "name": "datasource", - "options": [], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "current": { - "text": "", - "value": "" - }, - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "definition": "label_values(ma_status, cluster)", - "includeAll": false, - "label": "Cluster", - "name": "cluster", - "options": [], - "query": { - "query": "label_values(ma_status, cluster)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "sort": 1, - "type": "query" - }, - { - "current": { - "text": "test-perm7", - "value": "test-perm7" - }, - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "definition": "label_values(ma_status{cluster=~\"$cluster\"},namespace)", - "includeAll": false, - "label": "Project", - "name": "namespace", - "options": [], - "query": { - "query": "label_values(ma_status{cluster=~\"$cluster\"},namespace)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "type": "query" - }, - { - "current": { - "text": "All", - "value": [ - "$__all" - ] - }, - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "definition": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "includeAll": true, - "label": "PG Data Nodes", - "multi": true, - "name": "container_name", - "options": [], - "query": { - "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "refId": "Platform Monitoring Prometheus-container_name-Variable-Query" - }, - "refresh": 1, - "regex": "", - "sort": 1, - "type": "query" - }, - { - "auto": true, - "auto_count": 30, - "auto_min": "60s", - "current": { - "text": "$__auto", - "value": "$__auto" - }, - "label": "Sampling", - "name": "inter", - "options": [ { - "selected": false, - "text": "1m", - "value": "1m" + "kind": "RowsLayoutRow", + "spec": { + "title": "Master Smoke Test", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-17" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-18" + } + } + } + ] + } + } + } }, { - "selected": false, - "text": "10m", - "value": "10m" + "kind": "RowsLayoutRow", + "spec": { + "title": "Backup", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 6, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-31" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 0, + "width": 6, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-32" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 6, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-33" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 18, + "y": 0, + "width": 6, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-46" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 15, + "width": 4, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-29" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 4, + "y": 15, + "width": 5, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-40" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 9, + "y": 15, + "width": 5, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-38" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 14, + "y": 15, + "width": 5, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-41" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 19, + "y": 15, + "width": 5, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-37" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 43, + "width": 4, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-45" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 4, + "y": 43, + "width": 5, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-44" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 9, + "y": 43, + "width": 5, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-43" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 14, + "y": 43, + "width": 5, + "height": 5, + "element": { + "kind": "ElementReference", + "name": "panel-42" + } + } + } + ] + } + } + } }, { - "selected": false, - "text": "30m", - "value": "30m" + "kind": "RowsLayoutRow", + "spec": { + "title": "Archive", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 4, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-1015" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 4, + "y": 0, + "width": 6, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-81" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 10, + "y": 0, + "width": 7, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-83" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 17, + "y": 0, + "width": 7, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-84" + } + } + } + ] + } + } + } }, { - "selected": false, - "text": "1h", - "value": "1h" + "kind": "RowsLayoutRow", + "spec": { + "title": "Replication state", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-100" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-101" + } + } + } + ] + } + } + } }, { - "selected": false, - "text": "6h", - "value": "6h" + "kind": "RowsLayoutRow", + "spec": { + "title": "Collector status", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 24, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-910" + } + } + } + ] + } + } + } }, { - "selected": false, - "text": "12h", - "value": "12h" + "kind": "RowsLayoutRow", + "spec": { + "title": "Database Statistics", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-1078" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-1079" + } + } + } + ] + } + } + } }, { - "selected": false, - "text": "1d", - "value": "1d" + "kind": "RowsLayoutRow", + "spec": { + "title": "Connection Statistics", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-1081" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-1082" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 32, + "width": 12, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-1083" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 32, + "width": 12, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-1084" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 41, + "width": 12, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-1085" + } + } + } + ] + } + } + } }, { - "selected": false, - "text": "7d", - "value": "7d" + "kind": "RowsLayoutRow", + "spec": { + "title": "Temporary File Statistics", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-1098" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-1099" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-1095" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 8, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-1097" + } + } + } + ] + } + } + } }, { - "selected": false, - "text": "14d", - "value": "14d" + "kind": "RowsLayoutRow", + "spec": { + "title": "Tables Statistics", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 24, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-1087" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 9, + "width": 24, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-1088" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 18, + "width": 24, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-1089" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 26, + "width": 24, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-1090" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 34, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-1103" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 34, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-1104" + } + } + } + ] + } + } + } }, { - "selected": false, - "text": "30d", - "value": "30d" + "kind": "RowsLayoutRow", + "spec": { + "title": "DBaaS", + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 24, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-1092" + } + } + } + ] + } + } + } } + ] + } + }, + "links": [ + { + "title": "PostgreSQL Performance Metrics", + "type": "dashboards", + "icon": "external link", + "tooltip": "", + "url": "", + "tags": [ + "Postgres_Performance" ], - "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", - "refresh": 2, - "type": "interval" + "asDropdown": false, + "targetBlank": false, + "includeVars": false, + "keepTime": false }, { - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": { - "type": "prometheus", - "uid": "$datasource" - }, - "definition": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "includeAll": true, - "name": "namespace_pods", - "options": [], - "query": { - "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "refId": "Platform Monitoring Prometheus-namespace_pods-Variable-Query" - }, - "refresh": 1, - "regex": "", - "sort": 1, - "type": "query" + "title": "Postgres Exporter", + "type": "dashboards", + "icon": "external link", + "tooltip": "", + "url": "", + "tags": [ + "Postgres_Exporter" + ], + "asDropdown": false, + "targetBlank": false, + "includeVars": false, + "keepTime": false + } + ], + "liveNow": false, + "preload": false, + "tags": [], + "timeSettings": { + "timezone": "browser", + "from": "now-5m", + "to": "now", + "autoRefresh": "", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "hideTimepicker": false, + "fiscalYearStartMonth": 0 + }, + "title": "PostgreSQL Cluster Prometheus", + "variables": [ + { + "kind": "DatasourceVariable", + "spec": { + "name": "datasource", + "pluginId": "prometheus", + "refresh": "onDashboardLoad", + "regex": "", + "current": { + "text": "Platform Monitoring Prometheus", + "value": "PC3E95692D54ABCC0" + }, + "options": [], + "multi": false, + "includeAll": false, + "label": "Cloud", + "hide": "dontHide", + "skipUrlSync": false, + "allowCustomValue": true + } }, { - "allValue": ".*", - "current": { - "text": "All", - "value": [ - "$__all" - ] - }, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(ma_pg_size_by_database{namespace=\"$namespace\", cluster=~\"$cluster\"},datname)", - "includeAll": true, - "label": "Database Name", - "multi": true, - "name": "datname", - "options": [], - "query": { - "query": "label_values(ma_pg_size_by_database{namespace=\"$namespace\", cluster=~\"$cluster\"},datname)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 2, - "regex": "", - "sort": 1, - "type": "query" + "kind": "QueryVariable", + "spec": { + "name": "cluster", + "current": { + "text": "", + "value": "" + }, + "label": "Cluster", + "hide": "dontHide", + "refresh": "onDashboardLoad", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "query": "label_values(ma_status, cluster)", + "refId": "StandardVariableQuery" + } + }, + "regex": "", + "regexApplyTo": "value", + "sort": "alphabeticalAsc", + "definition": "label_values(ma_status, cluster)", + "options": [], + "multi": false, + "includeAll": false, + "allowCustomValue": true + } }, { - "current": { - "text": "10", - "value": "10" - }, - "includeAll": false, - "label": "Top", - "name": "limit", - "options": [ - { - "selected": false, - "text": "5", - "value": "5" + "kind": "QueryVariable", + "spec": { + "name": "namespace", + "current": { + "text": "test-perm7", + "value": "test-perm7" + }, + "label": "Project", + "hide": "dontHide", + "refresh": "onDashboardLoad", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "query": "label_values(ma_status{cluster=~\"$cluster\"},namespace)", + "refId": "StandardVariableQuery" + } }, - { - "selected": true, - "text": "10", - "value": "10" + "regex": "", + "regexApplyTo": "value", + "sort": "disabled", + "definition": "label_values(ma_status{cluster=~\"$cluster\"},namespace)", + "options": [], + "multi": false, + "includeAll": false, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "container_name", + "current": { + "text": "All", + "value": [ + "$__all" + ] }, - { - "selected": false, - "text": "20", - "value": "20" + "label": "PG Data Nodes", + "hide": "dontHide", + "refresh": "onDashboardLoad", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", + "refId": "Platform Monitoring Prometheus-container_name-Variable-Query" + } }, - { - "selected": false, - "text": "30", - "value": "30" + "regex": "", + "regexApplyTo": "value", + "sort": "alphabeticalAsc", + "definition": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "IntervalVariable", + "spec": { + "name": "inter", + "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", + "current": { + "text": "$__auto", + "value": "$__auto" + }, + "options": [ + { + "selected": false, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "10m", + "value": "10m" + }, + { + "selected": false, + "text": "30m", + "value": "30m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "6h", + "value": "6h" + }, + { + "selected": false, + "text": "12h", + "value": "12h" + }, + { + "selected": false, + "text": "1d", + "value": "1d" + }, + { + "selected": false, + "text": "7d", + "value": "7d" + }, + { + "selected": false, + "text": "14d", + "value": "14d" + }, + { + "selected": false, + "text": "30d", + "value": "30d" + } + ], + "auto": true, + "auto_min": "60s", + "auto_count": 30, + "refresh": "onTimeRangeChanged", + "label": "Sampling", + "hide": "dontHide", + "skipUrlSync": false + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "namespace_pods", + "current": { + "text": "All", + "value": "$__all" + }, + "hide": "dontHide", + "refresh": "onDashboardLoad", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "$datasource" + }, + "spec": { + "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", + "refId": "Platform Monitoring Prometheus-namespace_pods-Variable-Query" + } }, - { - "selected": false, - "text": "40", - "value": "40" + "regex": "", + "regexApplyTo": "value", + "sort": "alphabeticalAsc", + "definition": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", + "options": [], + "multi": false, + "includeAll": true, + "allowCustomValue": true + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "datname", + "current": { + "text": "All", + "value": [ + "$__all" + ] }, - { - "selected": false, - "text": "50", - "value": "50" - } - ], - "query": "5, 10, 20, 30, 40, 50", - "type": "custom" + "label": "Database Name", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "query": "label_values(ma_pg_size_by_database{namespace=\"$namespace\", cluster=~\"$cluster\"},datname)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + } + }, + "regex": "", + "regexApplyTo": "value", + "sort": "alphabeticalAsc", + "definition": "label_values(ma_pg_size_by_database{namespace=\"$namespace\", cluster=~\"$cluster\"},datname)", + "options": [], + "multi": true, + "includeAll": true, + "allValue": ".*", + "allowCustomValue": true + } }, { - "current": { - "text": "500", - "value": "500" - }, - "includeAll": false, - "label": "Table Limit", - "name": "table_limit", - "options": [ - { - "selected": false, + "kind": "CustomVariable", + "spec": { + "name": "limit", + "query": "5, 10, 20, 30, 40, 50", + "current": { "text": "10", "value": "10" }, - { - "selected": false, - "text": "50", - "value": "50" - }, - { - "selected": false, - "text": "100", - "value": "100" - }, - { - "selected": true, + "options": [ + { + "selected": false, + "text": "5", + "value": "5" + }, + { + "selected": true, + "text": "10", + "value": "10" + }, + { + "selected": false, + "text": "20", + "value": "20" + }, + { + "selected": false, + "text": "30", + "value": "30" + }, + { + "selected": false, + "text": "40", + "value": "40" + }, + { + "selected": false, + "text": "50", + "value": "50" + } + ], + "multi": false, + "includeAll": false, + "label": "Top", + "hide": "dontHide", + "skipUrlSync": false, + "allowCustomValue": true, + "valuesFormat": "csv" + } + }, + { + "kind": "CustomVariable", + "spec": { + "name": "table_limit", + "query": "10,50,100,500,1000,2000,5000", + "current": { "text": "500", "value": "500" }, - { - "selected": false, - "text": "1000", - "value": "1000" - }, - { - "selected": false, - "text": "2000", - "value": "2000" - }, - { - "selected": false, - "text": "5000", - "value": "5000" - } - ], - "query": "10,50,100,500,1000,2000,5000", - "type": "custom" + "options": [ + { + "selected": false, + "text": "10", + "value": "10" + }, + { + "selected": false, + "text": "50", + "value": "50" + }, + { + "selected": false, + "text": "100", + "value": "100" + }, + { + "selected": true, + "text": "500", + "value": "500" + }, + { + "selected": false, + "text": "1000", + "value": "1000" + }, + { + "selected": false, + "text": "2000", + "value": "2000" + }, + { + "selected": false, + "text": "5000", + "value": "5000" + } + ], + "multi": false, + "includeAll": false, + "label": "Table Limit", + "hide": "dontHide", + "skipUrlSync": false, + "allowCustomValue": true, + "valuesFormat": "csv" + } }, { - "allValue": ".*", - "current": { - "text": "All", - "value": [ - "$__all" - ] - }, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(ma_pg_connection_by_role{namespace=\"$namespace\", cluster=~\"$cluster\"},usename)", - "includeAll": true, - "label": "Role Name", - "multi": true, - "name": "usename", - "options": [], - "query": { - "query": "label_values(ma_pg_connection_by_role{namespace=\"$namespace\", cluster=~\"$cluster\"},usename)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 2, - "regex": "", - "type": "query" + "kind": "QueryVariable", + "spec": { + "name": "usename", + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "label": "Role Name", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "query": "label_values(ma_pg_connection_by_role{namespace=\"$namespace\", cluster=~\"$cluster\"},usename)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + } + }, + "regex": "", + "regexApplyTo": "value", + "sort": "disabled", + "definition": "label_values(ma_pg_connection_by_role{namespace=\"$namespace\", cluster=~\"$cluster\"},usename)", + "options": [], + "multi": true, + "includeAll": true, + "allValue": ".*", + "allowCustomValue": true + } }, { - "current": { - "text": "calls", - "value": "calls" - }, - "includeAll": false, - "label": "Top By Column", - "name": "column", - "options": [ - { - "selected": true, + "kind": "CustomVariable", + "spec": { + "name": "column", + "query": "calls, max_time, min_time, mean_time, total_time", + "current": { "text": "calls", "value": "calls" }, - { - "selected": false, - "text": "max_time", - "value": "max_time" - }, - { - "selected": false, - "text": "min_time", - "value": "min_time" + "options": [ + { + "selected": true, + "text": "calls", + "value": "calls" + }, + { + "selected": false, + "text": "max_time", + "value": "max_time" + }, + { + "selected": false, + "text": "min_time", + "value": "min_time" + }, + { + "selected": false, + "text": "mean_time", + "value": "mean_time" + }, + { + "selected": false, + "text": "total_time", + "value": "total_time" + } + ], + "multi": false, + "includeAll": false, + "label": "Top By Column", + "hide": "dontHide", + "skipUrlSync": false, + "allowCustomValue": true, + "valuesFormat": "csv" + } + }, + { + "kind": "QueryVariable", + "spec": { + "name": "top_tables_by_size", + "current": { + "text": "All", + "value": [ + "$__all" + ] }, - { - "selected": false, - "text": "mean_time", - "value": "mean_time" + "hide": "hideVariable", + "refresh": "onDashboardLoad", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "${datasource}" + }, + "spec": { + "query": "query_result(topk($limit, sum by (relid, datname, relname) (last_over_time(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}[$__range:]))))", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + } }, - { - "selected": false, - "text": "total_time", - "value": "total_time" - } - ], - "query": "calls, max_time, min_time, mean_time, total_time", - "type": "custom" + "regex": ".*relname=\"(.*)\".*", + "regexApplyTo": "value", + "sort": "disabled", + "definition": "query_result(topk($limit, sum by (relid, datname, relname) (last_over_time(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}[$__range:]))))", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": true + } }, { - "current": { - "text": "All", - "value": [ - "$__all" - ] - }, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "query_result(topk($limit, sum by (relid, datname, relname) (last_over_time(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}[$__range:]))))", - "hide": 2, - "includeAll": true, - "multi": true, - "name": "top_tables_by_size", - "options": [], - "query": { - "query": "query_result(topk($limit, sum by (relid, datname, relname) (last_over_time(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}[$__range:]))))", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 1, - "regex": ".*relname=\"(.*)\".*", - "type": "query" + "kind": "QueryVariable", + "spec": { + "name": "relname", + "current": { + "text": "", + "value": "" + }, + "hide": "dontHide", + "refresh": "onDashboardLoad", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "spec": { + "qryType": 1, + "query": "label_values(ma_pg_default_partition_size_bytes{datname=~\"$datname\"},relname)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + } + }, + "regex": "", + "regexApplyTo": "value", + "sort": "alphabeticalAsc", + "definition": "label_values(ma_pg_default_partition_size_bytes{datname=~\"$datname\"},relname)", + "options": [], + "multi": true, + "includeAll": true, + "allowCustomValue": false + } } ] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": {}, - "timezone": "browser", - "title": "PostgreSQL Cluster Prometheus", - "uid": "bc9f739dee3fe919d1a280c6e2bbea5255ec26ff", - "version": 12, - "weekStart": "" -} + } +} \ No newline at end of file From 17705e4c4b2d334c3cc16bb5c0b8b5cbfb2c1c3c Mon Sep 17 00:00:00 2001 From: svetychkina Date: Thu, 17 Sep 2026 17:27:31 +0500 Subject: [PATCH 05/13] fix: [CPCAP-12620] change the calculation of partition size percentage --- .../templates/monitoring-templates/prometheus-rule.yml | 6 +++--- .../collector/pkg/metrics/performance_metrics.go | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml index f243c0c7..8f0e9816 100644 --- a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml +++ b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml @@ -522,11 +522,11 @@ spec: namespace: {{ .Release.Namespace }} service: {{ .Release.Name }} {{- end }} - - alert: PostgreSQL Default Partition Size High + - alert: PostgreSQL default partition size high annotations: description: "Default partition \{\{ \$labels.relname \}\} of table \{\{ \$labels.parent_relname \}\} has exceeded the size threshold in namespace {{ .Release.Namespace }}." - summary: PostgreSQL Default Partition Size High - expr: ma_pg_default_partition_size_bytes{namespace="{{ .Release.Namespace }}"} / on(datname) ma_pg_size_by_database{namespace="{{ .Release.Namespace }}"} * 100 > {{ default "50" .Values.metricCollector.prometheusRules.defaultPartitionSizePercentThreshold }} + summary: PostgreSQL default partition size high + expr: ma_pg_default_partition_size_bytes{namespace="{{ .Release.Namespace }}"} / ma_pg_default_partition_parent_size_bytes{namespace="{{ .Release.Namespace }}"} * 100 > {{ default "50" .Values.metricCollector.prometheusRules.defaultPartitionSizePercentThreshold }} for: {{ default "3m" .Values.metricCollector.prometheusRules.alertDelay }} labels: severity: average diff --git a/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go b/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go index ae8d0287..5c68d125 100644 --- a/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go +++ b/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go @@ -105,7 +105,7 @@ var ( (SELECT setting::int max_connections FROM pg_settings WHERE name=$$max_connections$$) t3; ` - defaultPartitionQuery = `SELECT n.nspname AS schemaname, c.relname AS relname, p.relname AS parent_relname, pg_total_relation_size(c.oid) AS size_bytes, COALESCE(s.n_live_tup, 0) AS row_count FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace JOIN pg_inherits i ON i.inhrelid = c.oid JOIN pg_class p ON p.oid = i.inhparent LEFT JOIN pg_stat_user_tables s ON s.relid = c.oid WHERE c.relispartition = true AND pg_get_expr(c.relpartbound, c.oid) = 'DEFAULT'` + defaultPartitionQuery = `SELECT n.nspname AS schemaname, c.relname AS relname, p.relname AS parent_relname, pg_total_relation_size(c.oid) AS size_bytes, (SELECT COALESCE(sum(pg_total_relation_size(inhrelid)), 0) FROM pg_inherits WHERE inhparent = p.oid) AS parent_size_bytes, COALESCE(s.n_live_tup, 0) AS row_count FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace JOIN pg_inherits i ON i.inhrelid = c.oid JOIN pg_class p ON p.oid = i.inhparent LEFT JOIN pg_stat_user_tables s ON s.relid = c.oid WHERE c.relispartition = true AND pg_get_expr(c.relpartbound, c.oid) = 'DEFAULT'` ) @@ -333,7 +333,7 @@ func (s *Scraper) collectTableMetrics(ctx context.Context, pg *postgres.Postgres for _, row := range rows { labels := gauges.DefaultLabels() labels["datname"] = pg.GetDatabase() - var sizeValue, rowCountValue string + var sizeValue, rowCountValue, parentSizeValue string for _, column := range columns { rValue := fmt.Sprintf("%v", row[column]) switch column { @@ -341,12 +341,15 @@ func (s *Scraper) collectTableMetrics(ctx context.Context, pg *postgres.Postgres sizeValue = rValue case "row_count": rowCountValue = rValue + case "parent_size_bytes": + parentSizeValue = rValue default: labels[column] = rValue } } s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_size_bytes").withLabels(labels).setValue(sizeValue)) s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_row_count").withLabels(labels).setValue(rowCountValue)) + s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_parent_size_bytes").withLabels(labels).setValue(parentSizeValue)) } } From 235b2e02fdc5f4badd543002b26e333cb899fd2d Mon Sep 17 00:00:00 2001 From: svetychkina Date: Mon, 21 Sep 2026 12:46:55 +0500 Subject: [PATCH 06/13] feat: [CPCAP-12620] created separate function for partition metrics --- .../monitoring-templates/prometheus-rule.yml | 2 +- .../patroni-services/values.schema.json | 4 +- operator/charts/patroni-services/values.yaml | 2 +- .../pkg/metrics/performance_metrics.go | 58 +++++++++++-------- 4 files changed, 38 insertions(+), 28 deletions(-) diff --git a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml index 8f0e9816..c2470235 100644 --- a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml +++ b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml @@ -526,7 +526,7 @@ spec: annotations: description: "Default partition \{\{ \$labels.relname \}\} of table \{\{ \$labels.parent_relname \}\} has exceeded the size threshold in namespace {{ .Release.Namespace }}." summary: PostgreSQL default partition size high - expr: ma_pg_default_partition_size_bytes{namespace="{{ .Release.Namespace }}"} / ma_pg_default_partition_parent_size_bytes{namespace="{{ .Release.Namespace }}"} * 100 > {{ default "50" .Values.metricCollector.prometheusRules.defaultPartitionSizePercentThreshold }} + expr: ma_pg_default_partition_size_bytes{namespace="{{ .Release.Namespace }}"} / ma_pg_default_partition_parent_size_bytes{namespace="{{ .Release.Namespace }}"} * 100 > {{ default "20" .Values.metricCollector.prometheusRules.defaultPartitionSizePercentThreshold }} for: {{ default "3m" .Values.metricCollector.prometheusRules.alertDelay }} labels: severity: average diff --git a/operator/charts/patroni-services/values.schema.json b/operator/charts/patroni-services/values.schema.json index 8c840fb0..4a23343b 100644 --- a/operator/charts/patroni-services/values.schema.json +++ b/operator/charts/patroni-services/values.schema.json @@ -488,9 +488,9 @@ "type": "integer", "default": 104857600 }, - "defaultPartitionSizePercentThreshold": { + "defaultPartitionSizePercentThreshold": { "type": "integer", - "default": 50 + "default": 20 }, "maxConnectionExceedPercentageThreshold": { "type": "integer", diff --git a/operator/charts/patroni-services/values.yaml b/operator/charts/patroni-services/values.yaml index 6fad362e..3ec19b83 100644 --- a/operator/charts/patroni-services/values.yaml +++ b/operator/charts/patroni-services/values.yaml @@ -153,7 +153,7 @@ metricCollector: # should be specified in bytes, default is set to 32MB replicationLagValue: 33554432 largeObjectSizeThreshold: 104857600 # 100MB - defaultPartitionSizePercentThreshold: 50 # 50% of DB size + defaultPartitionSizePercentThreshold: 20 # 20% of table size maxConnectionExceedPercentageThreshold: 90 maxConnectionReachedPercentageThreshold: 80 warnWaitEventTreshold: 5 diff --git a/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go b/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go index 5c68d125..b3be4b24 100644 --- a/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go +++ b/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go @@ -105,7 +105,9 @@ var ( (SELECT setting::int max_connections FROM pg_settings WHERE name=$$max_connections$$) t3; ` - defaultPartitionQuery = `SELECT n.nspname AS schemaname, c.relname AS relname, p.relname AS parent_relname, pg_total_relation_size(c.oid) AS size_bytes, (SELECT COALESCE(sum(pg_total_relation_size(inhrelid)), 0) FROM pg_inherits WHERE inhparent = p.oid) AS parent_size_bytes, COALESCE(s.n_live_tup, 0) AS row_count FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace JOIN pg_inherits i ON i.inhrelid = c.oid JOIN pg_class p ON p.oid = i.inhparent LEFT JOIN pg_stat_user_tables s ON s.relid = c.oid WHERE c.relispartition = true AND pg_get_expr(c.relpartbound, c.oid) = 'DEFAULT'` + defaultPartitionQuery = `SELECT n.nspname AS schemaname, c.relname AS relname, p.relname AS parent_relname, pg_total_relation_size(c.oid) AS size_bytes, COALESCE(s.n_live_tup, 0) AS row_count FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace JOIN pg_inherits i ON i.inhrelid = c.oid JOIN pg_class p ON p.oid = i.inhparent LEFT JOIN pg_stat_user_tables s ON s.relid = c.oid WHERE c.relispartition = true AND pg_get_expr(c.relpartbound, c.oid) = 'DEFAULT'` + + parentTableQuery = `SELECT n.nspname AS schemaname, p.relname AS parent_relname, COALESCE(sum(pg_total_relation_size(i.inhrelid)), 0) AS parent_size_bytes FROM pg_inherits i JOIN pg_class p ON p.oid = i.inhparent JOIN pg_namespace n ON n.oid = p.relnamespace WHERE p.relkind = 'p' GROUP BY n.nspname, p.relname` ) @@ -328,29 +330,6 @@ func (s *Scraper) collectTableMetrics(ctx context.Context, pg *postgres.Postgres s.metrics = append(s.metrics, NewMetric("ma_pg_tot_size_by_db").withLabels(labels).setValue(totSizeValue)) s.metrics = append(s.metrics, NewMetric("ma_pg_idx_size_by_db").withLabels(labels).setValue(idxSizeValue)) } - - columns, rows = getData(ctx, pg, defaultPartitionQuery) - for _, row := range rows { - labels := gauges.DefaultLabels() - labels["datname"] = pg.GetDatabase() - var sizeValue, rowCountValue, parentSizeValue string - for _, column := range columns { - rValue := fmt.Sprintf("%v", row[column]) - switch column { - case "size_bytes": - sizeValue = rValue - case "row_count": - rowCountValue = rValue - case "parent_size_bytes": - parentSizeValue = rValue - default: - labels[column] = rValue - } - } - s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_size_bytes").withLabels(labels).setValue(sizeValue)) - s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_row_count").withLabels(labels).setValue(rowCountValue)) - s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_parent_size_bytes").withLabels(labels).setValue(parentSizeValue)) - } } func (s *Scraper) collectCommonPerfMetrics(ctx context.Context, pg *postgres.PostgresConnector) { @@ -384,6 +363,37 @@ func (s *Scraper) collectCountStatMetrics(ctx context.Context, pc *postgres.Post } } +func (s *Scraper) collectPartitionMetrics(ctx context.Context, pg *postgres.PostgresConnector) { + _, parentRows := getData(ctx, pg, parentTableQuery) + parentSizes := map[string]string{} + for _, row := range parentRows { + key := fmt.Sprintf("%v|%v", row["schemaname"], row["parent_relname"]) + parentSizes[key] = fmt.Sprintf("%v", row["parent_size_bytes"]) + } + + partColumns, partRows := getData(ctx, pg, defaultPartitionQuery) + for _, row := range partRows { + labels := gauges.DefaultLabels() + labels["datname"] = pg.GetDatabase() + var sizeValue, rowCountValue string + for _, column := range partColumns { + rValue := fmt.Sprintf("%v", row[column]) + switch column { + case "size_bytes": + sizeValue = rValue + case "row_count": + rowCountValue = rValue + default: + labels[column] = rValue + } + } + key := fmt.Sprintf("%v|%v", row["schemaname"], row["parent_relname"]) + s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_size_bytes").withLabels(labels).setValue(sizeValue)) + s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_row_count").withLabels(labels).setValue(rowCountValue)) + s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_parent_size_bytes").withLabels(labels).setValue(parentSizes[key])) + } +} + func getDatabasesList(ctx context.Context, pg *postgres.PostgresConnector) ([]string, error) { databases := []string{} rows, err := pg.Query(ctx, dbQuery) From 5e127c0c9d547fefb7a62abbdc749eb6eb15080c Mon Sep 17 00:00:00 2001 From: svetychkina Date: Tue, 22 Sep 2026 14:46:36 +0500 Subject: [PATCH 07/13] feat: [CPCAP-12620] fix formatting, add function call --- .../pkg/metrics/performance_metrics.go | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go b/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go index b3be4b24..a3fbc181 100644 --- a/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go +++ b/services/monitoring-agent/collector/pkg/metrics/performance_metrics.go @@ -108,7 +108,6 @@ var ( defaultPartitionQuery = `SELECT n.nspname AS schemaname, c.relname AS relname, p.relname AS parent_relname, pg_total_relation_size(c.oid) AS size_bytes, COALESCE(s.n_live_tup, 0) AS row_count FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace JOIN pg_inherits i ON i.inhrelid = c.oid JOIN pg_class p ON p.oid = i.inhparent LEFT JOIN pg_stat_user_tables s ON s.relid = c.oid WHERE c.relispartition = true AND pg_get_expr(c.relpartbound, c.oid) = 'DEFAULT'` parentTableQuery = `SELECT n.nspname AS schemaname, p.relname AS parent_relname, COALESCE(sum(pg_total_relation_size(i.inhrelid)), 0) AS parent_size_bytes FROM pg_inherits i JOIN pg_class p ON p.oid = i.inhparent JOIN pg_namespace n ON n.oid = p.relnamespace WHERE p.relkind = 'p' GROUP BY n.nspname, p.relname` - ) func (s *Scraper) CollectPerformanceMetrics() { @@ -280,6 +279,7 @@ func (s *Scraper) collectMetricsPerDB(ctx context.Context, pg *postgres.Postgres } s.collectTableMetrics(ctx, pg) s.collectDBaaSData(ctx, pg) + s.collectPartitionMetrics(ctx, pg) } logger.Info("Tables statistic metrics collection finished") } @@ -365,32 +365,32 @@ func (s *Scraper) collectCountStatMetrics(ctx context.Context, pc *postgres.Post func (s *Scraper) collectPartitionMetrics(ctx context.Context, pg *postgres.PostgresConnector) { _, parentRows := getData(ctx, pg, parentTableQuery) - parentSizes := map[string]string{} - for _, row := range parentRows { - key := fmt.Sprintf("%v|%v", row["schemaname"], row["parent_relname"]) - parentSizes[key] = fmt.Sprintf("%v", row["parent_size_bytes"]) - } - - partColumns, partRows := getData(ctx, pg, defaultPartitionQuery) - for _, row := range partRows { - labels := gauges.DefaultLabels() - labels["datname"] = pg.GetDatabase() - var sizeValue, rowCountValue string - for _, column := range partColumns { - rValue := fmt.Sprintf("%v", row[column]) - switch column { - case "size_bytes": - sizeValue = rValue - case "row_count": - rowCountValue = rValue - default: - labels[column] = rValue - } - } - key := fmt.Sprintf("%v|%v", row["schemaname"], row["parent_relname"]) - s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_size_bytes").withLabels(labels).setValue(sizeValue)) - s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_row_count").withLabels(labels).setValue(rowCountValue)) - s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_parent_size_bytes").withLabels(labels).setValue(parentSizes[key])) + parentSizes := map[string]string{} + for _, row := range parentRows { + key := fmt.Sprintf("%v|%v", row["schemaname"], row["parent_relname"]) + parentSizes[key] = fmt.Sprintf("%v", row["parent_size_bytes"]) + } + + partColumns, partRows := getData(ctx, pg, defaultPartitionQuery) + for _, row := range partRows { + labels := gauges.DefaultLabels() + labels["datname"] = pg.GetDatabase() + var sizeValue, rowCountValue string + for _, column := range partColumns { + rValue := fmt.Sprintf("%v", row[column]) + switch column { + case "size_bytes": + sizeValue = rValue + case "row_count": + rowCountValue = rValue + default: + labels[column] = rValue + } + } + key := fmt.Sprintf("%v|%v", row["schemaname"], row["parent_relname"]) + s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_size_bytes").withLabels(labels).setValue(sizeValue)) + s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_row_count").withLabels(labels).setValue(rowCountValue)) + s.metrics = append(s.metrics, NewMetric("ma_pg_default_partition_parent_size_bytes").withLabels(labels).setValue(parentSizes[key])) } } From e510f06925573867660e7f62324e5ba1afd63232 Mon Sep 17 00:00:00 2001 From: svetychkina Date: Thu, 24 Sep 2026 16:08:39 +0500 Subject: [PATCH 08/13] feature: [CPCAP-12620] fix formatting --- .../templates/monitoring-templates/prometheus-rule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml index c2470235..395ed7bb 100644 --- a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml +++ b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml @@ -524,7 +524,7 @@ spec: {{- end }} - alert: PostgreSQL default partition size high annotations: - description: "Default partition \{\{ \$labels.relname \}\} of table \{\{ \$labels.parent_relname \}\} has exceeded the size threshold in namespace {{ .Release.Namespace }}." + description: 'Default partition {{ $labels.relname }} of table {{ $labels.parent_relname }} has exceeded the size threshold in namespace {{ .Release.Namespace }}.' summary: PostgreSQL default partition size high expr: ma_pg_default_partition_size_bytes{namespace="{{ .Release.Namespace }}"} / ma_pg_default_partition_parent_size_bytes{namespace="{{ .Release.Namespace }}"} * 100 > {{ default "20" .Values.metricCollector.prometheusRules.defaultPartitionSizePercentThreshold }} for: {{ default "3m" .Values.metricCollector.prometheusRules.alertDelay }} From 2ef527b55b7ccb7a12fe36eb7333b53983a7550d Mon Sep 17 00:00:00 2001 From: svetychkina Date: Thu, 24 Sep 2026 16:22:46 +0500 Subject: [PATCH 09/13] feat: [CPCAP-12620] typo --- .../templates/monitoring-templates/prometheus-rule.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml index 395ed7bb..79113b3b 100644 --- a/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml +++ b/operator/charts/patroni-services/templates/monitoring-templates/prometheus-rule.yml @@ -524,8 +524,9 @@ spec: {{- end }} - alert: PostgreSQL default partition size high annotations: - description: 'Default partition {{ $labels.relname }} of table {{ $labels.parent_relname }} has exceeded the size threshold in namespace {{ .Release.Namespace }}.' - summary: PostgreSQL default partition size high + description: PostgreSQL default partition size high + summary: >- + "Default partition \{\{ \$labels.relname \}\} of table \{\{ \$labels.parent_relname \}\} has exceeded the size threshold in namespace {{ .Release.Namespace }}." expr: ma_pg_default_partition_size_bytes{namespace="{{ .Release.Namespace }}"} / ma_pg_default_partition_parent_size_bytes{namespace="{{ .Release.Namespace }}"} * 100 > {{ default "20" .Values.metricCollector.prometheusRules.defaultPartitionSizePercentThreshold }} for: {{ default "3m" .Values.metricCollector.prometheusRules.alertDelay }} labels: From 45ccfce63ea39129d1100b6c69fc89728a62f0f3 Mon Sep 17 00:00:00 2001 From: svetychkina Date: Thu, 24 Sep 2026 18:40:35 +0500 Subject: [PATCH 10/13] feat: [CPCAP-12620] update grafana dashboard --- .../monitoring/grafana-dashboard.json | 21543 ++++++++-------- 1 file changed, 10697 insertions(+), 10846 deletions(-) diff --git a/operator/charts/patroni-services/monitoring/grafana-dashboard.json b/operator/charts/patroni-services/monitoring/grafana-dashboard.json index b30d399f..d0cb352a 100644 --- a/operator/charts/patroni-services/monitoring/grafana-dashboard.json +++ b/operator/charts/patroni-services/monitoring/grafana-dashboard.json @@ -1,11747 +1,11598 @@ { - "apiVersion": "dashboard.grafana.app/v2", - "kind": "Dashboard", - "metadata": { - "name": "ad6m2cs", - "namespace": "default", - "uid": "8d955265-086e-4614-be06-27533a59a8e0", - "resourceVersion": "1789464172580002", - "generation": 5, - "creationTimestamp": "2026-09-14T06:57:17Z", - "labels": { - "grafana.app/deprecatedInternalID": "714595832049664" - }, - "annotations": { - "grafana.app/createdBy": "user:dfxlwjvefh62od", - "grafana.app/folder": "", - "grafana.app/saved-from-ui": "Grafana v13.0.6 (10dd660017)", - "grafana.app/updatedBy": "user:dfxlwjvefh62od", - "grafana.app/updatedTimestamp": "2026-09-15T09:22:52Z" - } - }, - "spec": { - "annotations": [ - { - "kind": "AnnotationQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "grafana", - "version": "v0", - "datasource": { - "name": "grafana" - }, - "spec": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - } + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "builtIn": true, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "query": { + "datasource": { + "name": "grafana" }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "builtIn": true + "group": "grafana", + "kind": "DataQuery", + "spec": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "version": "v0" } } - ], - "cursorSync": "Crosshair", - "description": "Metrics for PostgreSQL Cluster", - "editable": true, - "elements": { - "panel-1": { - "kind": "Panel", - "spec": { - "id": 1, - "title": "Smoke Test", - "description": "Shows whether the cluster serves RW requests (select, insert, update, delete) through the endpoint.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "interval": "", - "legendFormat": "{{action}}" - } + } + ], + "cursorSync": "Crosshair", + "description": "Metrics for PostgreSQL Cluster", + "editable": true, + "elements": { + "panel-1": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" }, - "refId": "D", - "hidden": false - } + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "interval": "", + "legendFormat": "{{action}}" + }, + "version": "v0" + }, + "refId": "D" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.5.8", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "percent" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows whether the cluster serves RW requests (select, insert, update, delete) through the endpoint.", + "id": 1, + "links": [], + "title": "Smoke Test", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "percent" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.5.8" } - }, - "panel-10": { - "kind": "Panel", - "spec": { - "id": 10, - "title": "PostgreSQL Cluster Status", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "editorMode": "code", - "expr": "sum by () (ma_pg_patroni_cluster_status{namespace=\"$namespace\", cluster=~\"$cluster\"} or ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\", pg_node='External'})", - "groupBy": [ + } + }, + "panel-10": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "editorMode": "code", + "expr": "sum by () (ma_pg_patroni_cluster_status{namespace=\"$namespace\", cluster=~\"$cluster\"} or ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\", pg_node='External'})", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", + "range": true, + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", - "range": true, - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100, - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.6", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "mappings": [ - { - "type": "value", - "options": { - "0": { - "text": "UP", - "index": 2 - }, - "6": { - "text": "DEGRADED", - "index": 1 - }, - "10": { - "text": "DOWN", - "index": 0 - }, - "11": { - "text": "UP (EXTERNAL)", - "color": "dark-green", - "index": 3 - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "rgba(50, 172, 45, 0.97)" + ], + "queryOptions": { + "interval": "$inter", + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "", + "id": 10, + "links": [], + "title": "PostgreSQL Cluster Status", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "index": 2, + "text": "UP" }, - { - "value": 3, - "color": "rgba(237, 129, 40, 0.89)" + "6": { + "index": 1, + "text": "DEGRADED" }, - { - "value": 6, - "color": "rgba(245, 54, 54, 0.9)" + "10": { + "index": 0, + "text": "DOWN" + }, + "11": { + "color": "dark-green", + "index": 3, + "text": "UP (EXTERNAL)" } - ] - }, - "color": { - "mode": "thresholds" + }, + "type": "value" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 3 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 6 + } + ] }, - "overrides": [] - } + "unit": "none" + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "13.0.6" } - }, - "panel-100": { - "kind": "Panel", - "spec": { - "id": 100, - "title": "Sent lag", - "description": "Shows the difference between the current XLOG location and the data that was sent to recipient.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$7", - "dsType": "influxdb", - "expr": "ma_pg_patroni_replication_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-100": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$7", + "dsType": "influxdb", + "expr": "ma_pg_patroni_replication_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ hostname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "{{ hostname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "10.1.5", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "decbytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the difference between the current XLOG location and the data that was sent to recipient.", + "id": 100, + "links": [], + "title": "Sent lag", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "decbytes" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "10.1.5" } - }, - "panel-101": { - "kind": "Panel", - "spec": { - "id": 101, - "title": "Sent/Replay lag", - "description": "Shows the difference between the sent XLOG location and applied to the recipient XLOG location.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$7", - "dsType": "influxdb", - "expr": "ma_pg_patroni_replication_state_sent_replay_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-101": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$7", + "dsType": "influxdb", + "expr": "ma_pg_patroni_replication_state_sent_replay_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ hostname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_replay_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "{{ hostname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_replay_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "10.1.5", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "decbytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the difference between the sent XLOG location and applied to the recipient XLOG location.", + "id": 101, + "links": [], + "title": "Sent/Replay lag", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "decbytes" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "10.1.5" } - }, - "panel-1015": { - "kind": "Panel", - "spec": { - "id": 1015, - "title": "Archive mode", - "description": "If archive mode is on, then the WAL archive is enabled. Otherwise, the WAL archive is disabled.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "exemplar": true, - "expr": "ma_pg_patroni_pg_metrics_archive_mode_prom{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-1015": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "exemplar": true, + "expr": "ma_pg_patroni_pg_metrics_archive_mode_prom{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM /pg.$cluster_name.*.archive.mode/ WHERE namespace='$namespace' and $timeFilter", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM /pg.$cluster_name.*.archive.mode/ WHERE namespace='$namespace' and $timeFilter", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100 } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.2.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "mappings": [ - { - "type": "value", - "options": { - "0": { - "text": "Off" - }, - "1": { - "text": "On" - } - } - }, - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "Off" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" + ], + "queryOptions": { + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "If archive mode is on, then the WAL archive is enabled. Otherwise, the WAL archive is disabled.", + "id": 1015, + "links": [], + "title": "Archive mode", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "Off" }, - { - "value": 80, - "color": "red" + "1": { + "text": "On" } - ] + }, + "type": "value" }, - "color": { - "mode": "thresholds" + { + "options": { + "match": "null", + "result": { + "text": "Off" + } + }, + "type": "special" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] - } + "unit": "none" + }, + "overrides": [] + }, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "11.2.1" } - }, - "panel-1023": { - "kind": "Panel", - "spec": { - "id": 1023, - "title": "Patroni Members Status (1 = OK)", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_patroni_status{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-1023": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_patroni_status{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.patroni_status/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.patroni_status/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "state-timeline", - "version": "13.0.6", - "spec": { - "options": { - "alignValue": "left", - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "mappings": [ - { - "type": "value", - "options": { - "0": { - "color": "#F2495C" - }, - "1": { - "color": "#73BF69" - }, - "N/A": { - "color": "#CCC" - }, - "null": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "", + "id": 1023, + "links": [], + "title": "Patroni Members Status (1 = OK)", + "vizConfig": { + "group": "state-timeline", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisPlacement": "auto", + "fillOpacity": 100, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [ + { + "options": { + "0": { + "color": "#F2495C" + }, + "1": { + "color": "#73BF69" }, - { - "value": 80, - "color": "red" + "N/A": { + "color": "#CCC" + }, + "null": { + "text": "N/A" } - ] - }, - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "axisPlacement": "auto", - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false + }, + "type": "value" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "alignValue": "left", + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } } - } + }, + "version": "13.0.6" } - }, - "panel-1077": { - "kind": "Panel", - "spec": { - "id": 1077, - "title": "PostgreSQL Cluster Status", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "editorMode": "code", - "expr": "ma_pg_patroni_cluster_active{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { + } + }, + "panel-1077": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "editorMode": "code", + "expr": "ma_pg_patroni_cluster_active{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", + "range": true, + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", - "range": true, - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100, - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.6", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "mappings": [ - { - "type": "value", - "options": { - "0": { - "text": "STANDBY", - "color": "blue", - "index": 1 - }, - "1": { - "text": "ACTIVE", - "index": 0 - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "value": 3, - "color": "rgba(237, 129, 40, 0.89)" + ], + "queryOptions": { + "interval": "$inter", + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "", + "id": 1077, + "links": [], + "title": "PostgreSQL Cluster Status", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "blue", + "index": 1, + "text": "STANDBY" }, - { - "value": 6, - "color": "rgba(245, 54, 54, 0.9)" + "1": { + "index": 0, + "text": "ACTIVE" } - ] - }, - "color": { - "mode": "thresholds" + }, + "type": "value" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 3 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 6 + } + ] }, - "overrides": [] - } + "unit": "none" + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "13.0.6" } - }, - "panel-1078": { - "kind": "Panel", - "spec": { - "id": 1078, - "title": "Size by database", - "description": "This graph shows size for all of the logical databases in PostgreSQL cluster.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_size_by_database{namespace=\"$namespace\", datname=~\"$datname\"}", - "format": "time_series", - "groupBy": [ + } + }, + "panel-1078": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_size_by_database{namespace=\"$namespace\", datname=~\"$datname\"}", + "format": "time_series", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "", + "legendFormat": "{{ datname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") / 1024 / 1024 FROM /pg.common.size_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "instant": false, - "interval": "", - "legendFormat": "{{ datname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") / 1024 / 1024 FROM /pg.common.size_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.5.2", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bits", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "MiB", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "This graph shows size for all of the logical databases in PostgreSQL cluster.", + "id": 1078, + "links": [], + "title": "Size by database", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "MiB", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "bits" + }, + "overrides": [] + }, + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } } - } + }, + "version": "13.0.6" } - }, - "panel-1079": { - "kind": "Panel", - "spec": { - "id": 1079, - "title": "Number of Tables", - "description": "This graph shows number of table in each of the logical databases.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "exemplar": true, - "expr": "count by (datname) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"})", - "interval": "", - "legendFormat": "{{ datname }}", - "range": true - } + } + }, + "panel-1079": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" }, - "refId": "A", - "hidden": false - } + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "exemplar": true, + "expr": "count by (datname) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"})", + "interval": "", + "legendFormat": "{{ datname }}", + "range": true + }, + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.5.2", - "spec": { - "options": { - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "This graph shows number of table in each of the logical databases.", + "id": 1079, + "links": [], + "title": "Number of Tables", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] } }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" - } - } - }, - "overrides": [] + "overrides": [] + }, + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [ + "max", + "last" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } } - } + }, + "version": "13.0.6" } - }, - "panel-1081": { - "kind": "Panel", - "spec": { - "id": 1081, - "title": "Overall connection statistic", - "description": "Shows how many connections are in use right now. It shows max connections, used connections, reserved for regular, and superuser.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_connection_count_stat_max_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-1081": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_connection_count_stat_max_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "stat max connections", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.connection_count_stat.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "range": true, + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "stat max connections", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.connection_count_stat.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "range": true, - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "expr": "ma_pg_connection_count_stat_reserved_for_reg_users{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "reserved for reg_users", - "range": true - } + ] + ], + "tags": [] }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "expr": "ma_pg_connection_count_stat_reserved_for_superuser{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "reserved for superuser", - "range": true - } + "version": "v0" + }, + "refId": "A" + } + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" }, - "refId": "C", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "expr": "ma_pg_connection_count_stat_used{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "used", - "range": true - } + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "expr": "ma_pg_connection_count_stat_reserved_for_reg_users{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "reserved for reg_users", + "range": true }, - "refId": "D", - "hidden": false - } + "version": "v0" + }, + "refId": "B" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" - } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "10.2.3", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "right", - "showLegend": false, - "width": 250 - }, - "tooltip": { - "mode": "multi", - "sort": "none" + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "expr": "ma_pg_connection_count_stat_reserved_for_superuser{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "reserved for superuser", + "range": true + }, + "version": "v0" + }, + "refId": "C" } }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "expr": "ma_pg_connection_count_stat_used{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "used", + "range": true + }, + "version": "v0" + }, + "refId": "D" + } + } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows how many connections are in use right now. It shows max connections, used connections, reserved for regular, and superuser.", + "id": 1081, + "links": [], + "title": "Overall connection statistic", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false, + "width": 250 + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "10.2.3" } - }, - "panel-1082": { - "kind": "Panel", - "spec": { - "id": 1082, - "title": "Connection by database", - "description": "Shows the number of connections per database.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_connection_by_database{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-1082": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_connection_by_database{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "", + "legendFormat": "{{ datname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "instant": false, - "interval": "", - "legendFormat": "{{ datname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "10.2.3", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "width": 200 - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the number of connections per database.", + "id": 1082, + "links": [], + "title": "Connection by database", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "displayName", + "value": "Limits" } - } + ] }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "displayName", - "value": "Limits" - } - ] + { + "matcher": { + "id": "byName", + "options": "Limits" }, - { - "matcher": { - "id": "byName", - "options": "Limits" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" } - ] - } - ] + } + ] + } + ] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 200 + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "10.2.3" } - }, - "panel-1083": { - "kind": "Panel", - "spec": { - "id": 1083, - "title": "Connection by role", - "description": "Shows the number of connections per role.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "editorMode": "code", - "expr": "ma_pg_connection_by_role{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-1083": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "editorMode": "code", + "expr": "ma_pg_connection_by_role{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "", + "legendFormat": "{{ usename }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "instant": false, - "interval": "", - "legendFormat": "{{ usename }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "10.2.3", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "right", - "showLegend": false, - "width": 200 - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the number of connections per role.", + "id": 1083, + "links": [], + "title": "Connection by role", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false, + "width": 200 + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "10.2.3" } - }, - "panel-1084": { - "kind": "Panel", - "spec": { - "id": 1084, - "title": "Not idle connections by Database", - "description": "Shows the number of not idle connections per database.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "editorMode": "code", - "expr": "ma_pg_count_not_idle{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-1084": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "editorMode": "code", + "expr": "ma_pg_count_not_idle{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ datname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.count_not_idle.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "range": true, + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "{{ datname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.count_not_idle.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "range": true, - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "10.2.3", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "right", - "showLegend": false, - "width": 200 - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the number of not idle connections per database.", + "id": 1084, + "links": [], + "title": "Not idle connections by Database", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false, + "width": 200 + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "10.2.3" } - }, - "panel-1085": { - "kind": "Panel", - "spec": { - "id": 1085, - "title": "Number of Active Connections by Role", - "description": "This table shows number of Active Connections in current moment by role. Also shows Connection Limits that is set during Role create. Also, shows not idle connection by role.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "last_over_time(ma_pg_connection_by_role_with_limit{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}[$__range:])", - "format": "table", - "groupBy": [ + } + }, + "panel-1085": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "last_over_time(ma_pg_connection_by_role_with_limit{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}[$__range:])", + "format": "table", + "groupBy": [ + { + "params": [ + "queryid" + ], + "type": "tag" + } + ], + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Connections", + "measurement": "ma.pg.common.queries_stat", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", + "rawQuery": true, + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "mean_time" + ], + "type": "field" + }, { "params": [ - "queryid" + "30" ], - "type": "tag" + "type": "top" } ], - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Connections", - "measurement": "ma.pg.common.queries_stat", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", - "rawQuery": true, - "resultFormat": "table", - "select": [ - [ - { - "params": [ - "mean_time" - ], - "type": "field" - }, - { - "params": [ - "30" - ], - "type": "top" - } - ], - [ - { - "params": [ - "calls" - ], - "type": "field" - } - ], - [ - { - "params": [ - "short_query" - ], - "type": "field" - } - ], - [ - { - "params": [ - "datname" - ], - "type": "field" - } - ], - [ - { - "params": [ - "total_time" - ], - "type": "field" - } - ] + [ + { + "params": [ + "calls" + ], + "type": "field" + } ], - "tags": [] - } + [ + { + "params": [ + "short_query" + ], + "type": "field" + } + ], + [ + { + "params": [ + "datname" + ], + "type": "field" + } + ], + [ + { + "params": [ + "total_time" + ], + "type": "field" + } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [ - { - "kind": "Transformation", - "group": "organize", - "spec": { - "options": { - "excludeByName": { - "Time": true, - "Value": false, - "__name__": true, - "endpoint": true, - "exported_namespace": true, - "host": true, - "instance": true, - "job": true, - "metric_name": true, - "name": true, - "namespace": true, - "pod": true, - "relid": true, - "service": true, - "short_query": false - }, - "indexByName": { - "Time": 1, - "Value": 12, - "__name__": 2, - "endpoint": 3, - "exported_namespace": 4, - "host": 5, - "instance": 6, - "job": 7, - "limit": 13, - "name": 8, - "namespace": 9, - "pod": 10, - "service": 11, - "usename": 0 - }, - "renameByName": { - "Value": "Connections", - "datname": "Database Name", - "idx_size": "Index Size", - "limit": "Connections Limit", - "name": "", - "namespace": "", - "not_idle_cnt": "Not Idle Connections", - "queryid": "Query Id", - "relname": "Relation Name", - "short_query": "", - "tot_size": "Total Size", - "usename": "Role" - } + } + ], + "queryOptions": {}, + "transformations": [ + { + "group": "organize", + "kind": "Transformation", + "spec": { + "options": { + "excludeByName": { + "Time": true, + "Value": false, + "__name__": true, + "endpoint": true, + "exported_namespace": true, + "host": true, + "instance": true, + "job": true, + "metric_name": true, + "name": true, + "namespace": true, + "pod": true, + "relid": true, + "service": true, + "short_query": false + }, + "indexByName": { + "Time": 1, + "Value": 12, + "__name__": 2, + "endpoint": 3, + "exported_namespace": 4, + "host": 5, + "instance": 6, + "job": 7, + "limit": 13, + "name": 8, + "namespace": 9, + "pod": 10, + "service": 11, + "usename": 0 + }, + "renameByName": { + "Value": "Connections", + "datname": "Database Name", + "idx_size": "Index Size", + "limit": "Connections Limit", + "name": "", + "namespace": "", + "not_idle_cnt": "Not Idle Connections", + "queryid": "Query Id", + "relname": "Relation Name", + "short_query": "", + "tot_size": "Total Size", + "usename": "Role" } } } - ], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "table", - "version": "11.2.1", - "spec": { - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [] - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" + } + ] + } + }, + "description": "This table shows number of Active Connections in current moment by role. Also shows Connection Limits that is set during Role create. Also, shows not idle connection by role.", + "id": 1085, + "links": [], + "title": "Number of Active Connections by Role", + "vizConfig": { + "group": "table", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "filterable": false, - "inspect": false - } + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Not Idle Connections" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "None": { + "text": "0" + } + }, + "type": "value" + } + ] + } + ] }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Not Idle Connections" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "None": { - "text": "0" - } - }, - "type": "value" - } - ] - } - ] + { + "matcher": { + "id": "byName", + "options": "Role" }, - { - "matcher": { - "id": "byName", - "options": "Role" - }, - "properties": [ - { - "id": "custom.width", - "value": 358 - } - ] - } - ] - } + "properties": [ + { + "id": "custom.width", + "value": 358 + } + ] + } + ] + }, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [] } - } + }, + "version": "11.2.1" } - }, - "panel-1087": { - "kind": "Panel", - "spec": { - "id": 1087, - "title": "TOP $limit tables by size", - "description": "The table shows TOP tables filtered by the selected database name.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "groupBy": [ + } + }, + "panel-1087": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "groupBy": [ + { + "params": [ + "queryid" + ], + "type": "tag" + } + ], + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "measurement": "ma.pg.common.queries_stat", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", + "rawQuery": true, + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "mean_time" + ], + "type": "field" + }, { "params": [ - "queryid" + "30" ], - "type": "tag" + "type": "top" } ], - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "measurement": "ma.pg.common.queries_stat", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", - "rawQuery": true, - "resultFormat": "table", - "select": [ - [ - { - "params": [ - "mean_time" - ], - "type": "field" - }, - { - "params": [ - "30" - ], - "type": "top" - } - ], - [ - { - "params": [ - "calls" - ], - "type": "field" - } - ], - [ - { - "params": [ - "short_query" - ], - "type": "field" - } - ], - [ - { - "params": [ - "datname" - ], - "type": "field" - } - ], - [ - { - "params": [ - "total_time" - ], - "type": "field" - } - ] + [ + { + "params": [ + "calls" + ], + "type": "field" + } ], - "tags": [] - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false - } + [ + { + "params": [ + "short_query" + ], + "type": "field" + } + ], + [ + { + "params": [ + "datname" + ], + "type": "field" + } + ], + [ + { + "params": [ + "total_time" + ], + "type": "field" + } + ] + ], + "tags": [] }, - "refId": "B", - "hidden": false + "version": "v0" + }, + "refId": "A" + } + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false + }, + "version": "v0" + }, + "refId": "B" + } + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_tot_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false + }, + "version": "v0" + }, + "refId": "C" + } + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_idx_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false + }, + "version": "v0" + }, + "refId": "D" + } + } + ], + "queryOptions": {}, + "transformations": [ + { + "group": "merge", + "kind": "Transformation", + "spec": { + "options": {} + } + }, + { + "group": "filterFieldsByName", + "kind": "Transformation", + "spec": { + "options": { + "include": { + "names": [ + "datname", + "relid", + "relname", + "selector", + "Value #A", + "Value #B", + "Value #C", + "Value #D" + ] + } } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_tot_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false - } - }, - "refId": "C", - "hidden": false + } + }, + { + "group": "organize", + "kind": "Transformation", + "spec": { + "options": { + "excludeByName": { + "Value": false, + "Value #A": false, + "__name__": true, + "endpoint": true, + "exported_namespace": true, + "host": true, + "instance": true, + "job": true, + "metric_name": true, + "name": true, + "namespace": true, + "pod": true, + "relid": true, + "service": true, + "short_query": false + }, + "indexByName": { + "Value #A": 7, + "Value #B": 4, + "Value #C": 5, + "Value #D": 6, + "datname": 0, + "relid": 1, + "relname": 2, + "selector": 3 + }, + "renameByName": { + "Value": "VALUE", + "Value #A": "Table Size", + "Value #B": "Estimated Number Of Tuples", + "Value #C": "Total Size", + "Value #D": "Index Size", + "datname": "Database Name", + "idx_size": "Index Size", + "live_tuples": "Estimated Number Of Tuples", + "name": "", + "namespace": "", + "pod_name": "", + "queryid": "Query Id", + "relname": "Relation Name", + "service_name": "", + "short_query": "", + "tot_size": "Total Size" + } } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_idx_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false - } + } + } + ] + } + }, + "description": "The table shows TOP tables filtered by the selected database name.", + "id": 1087, + "links": [], + "title": "TOP $limit tables by size", + "vizConfig": { + "group": "table", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "footer": { + "reducers": [] + }, + "inspect": false + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 }, - "refId": "D", - "hidden": false - } + { + "color": "red", + "value": 80 + } + ] } - ], - "transformations": [ + }, + "overrides": [ { - "kind": "Transformation", - "group": "merge", - "spec": { - "options": {} - } + "matcher": { + "id": "byName", + "options": "Table Size" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] }, { - "kind": "Transformation", - "group": "filterFieldsByName", - "spec": { - "options": { - "include": { - "names": [ - "datname", - "relid", - "relname", - "selector", - "Value #A", - "Value #B", - "Value #C", - "Value #D" - ] - } + "matcher": { + "id": "byName", + "options": "Total Size" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" } - } + ] }, { - "kind": "Transformation", - "group": "organize", - "spec": { - "options": { - "excludeByName": { - "Value": false, - "Value #A": false, - "__name__": true, - "endpoint": true, - "exported_namespace": true, - "host": true, - "instance": true, - "job": true, - "metric_name": true, - "name": true, - "namespace": true, - "pod": true, - "relid": true, - "service": true, - "short_query": false - }, - "indexByName": { - "Value #A": 7, - "Value #B": 4, - "Value #C": 5, - "Value #D": 6, - "datname": 0, - "relid": 1, - "relname": 2, - "selector": 3 - }, - "renameByName": { - "Value": "VALUE", - "Value #A": "Table Size", - "Value #B": "Estimated Number Of Tuples", - "Value #C": "Total Size", - "Value #D": "Index Size", - "datname": "Database Name", - "idx_size": "Index Size", - "live_tuples": "Estimated Number Of Tuples", - "name": "", - "namespace": "", - "pod_name": "", - "queryid": "Query Id", - "relname": "Relation Name", - "service_name": "", - "short_query": "", - "tot_size": "Total Size" - } + "matcher": { + "id": "byName", + "options": "Index Size" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" } - } + ] + } + ] + }, + "options": { + "cellHeight": "sm", + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Table Size" } - ], - "queryOptions": {} + ] } }, - "vizConfig": { - "kind": "VizConfig", - "group": "table", - "version": "13.0.6", - "spec": { - "options": { - "cellHeight": "sm", - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Table Size" - } - ] - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "footer": { - "reducers": [] - }, - "inspect": false - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Table Size" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Total Size" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Index Size" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] - } - ] + "version": "13.0.6" + } + } + }, + "panel-1088": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "topk($table_limit, sort_desc(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", + "instant": false, + "interval": "", + "legendFormat": "{{ datname }}/{{ relname }}", + "range": true + }, + "version": "v0" + }, + "refId": "A" + } } - } + ], + "queryOptions": {}, + "transformations": [] } - } - }, - "panel-1088": { - "kind": "Panel", - "spec": { - "id": 1088, - "title": "Size by tables", - "description": "This Graph Shows size of the each table in all of the databases", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "topk($table_limit, sort_desc(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", - "instant": false, - "interval": "", - "legendFormat": "{{ datname }}/{{ relname }}", - "range": true - } + }, + "description": "This Graph Shows size of the each table in all of the databases", + "id": 1088, + "links": [], + "title": "Size by tables", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.6", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" + { + "color": "red", + "value": 80 + } + ] } }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Value" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] - } - ] + ] + } + ] + }, + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [ + "max", + "last" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } } - } + }, + "version": "13.0.6" } - }, - "panel-1089": { - "kind": "Panel", - "spec": { - "id": 1089, - "title": "Estimated Number of Rows per Table", - "description": "This graphs shows estimated number of rows in all of the tables, using `pg_stat_all_tables` system view.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "exemplar": true, - "expr": "topk($table_limit, sort_desc(ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", - "interval": "", - "legendFormat": "{{datname}}/{{ relname }}", - "range": true - } + } + }, + "panel-1089": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" }, - "refId": "A", - "hidden": false - } + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "exemplar": true, + "expr": "topk($table_limit, sort_desc(ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", + "interval": "", + "legendFormat": "{{datname}}/{{ relname }}", + "range": true + }, + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.6", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "This graphs shows estimated number of rows in all of the tables, using `pg_stat_all_tables` system view.", + "id": 1089, + "links": [], + "title": "Estimated Number of Rows per Table", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] } }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] + "overrides": [] + }, + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [ + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } } - } + }, + "version": "13.0.6" } - }, - "panel-1090": { - "kind": "Panel", - "spec": { - "id": 1090, - "title": "TOP $limit queries by $column", - "description": "The table shows TOP queries filtered by the selected column and database name. For queries statistics `pg_stat_statements` view used. More info about columns could be find in official docs.\n\nAlso, it is possible to reset the statistics, by calling `pg_stat_statements_reset()` function.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "last_over_time(topk($limit,sort_desc(ma_pg_queries_stat{namespace=\"$namespace\", metric_name=\"$column\", datname=~\"$datname\", cluster=~\"$cluster\"}))[$__range:])", - "format": "table", - "groupBy": [ + } + }, + "panel-1090": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "last_over_time(topk($limit,sort_desc(ma_pg_queries_stat{namespace=\"$namespace\", metric_name=\"$column\", datname=~\"$datname\", cluster=~\"$cluster\"}))[$__range:])", + "format": "table", + "groupBy": [ + { + "params": [ + "queryid" + ], + "type": "tag" + } + ], + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "measurement": "ma.pg.common.queries_stat", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", + "rawQuery": true, + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "mean_time" + ], + "type": "field" + }, { "params": [ - "queryid" + "30" ], - "type": "tag" + "type": "top" } ], - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "measurement": "ma.pg.common.queries_stat", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", - "rawQuery": true, - "resultFormat": "table", - "select": [ - [ - { - "params": [ - "mean_time" - ], - "type": "field" - }, - { - "params": [ - "30" - ], - "type": "top" - } - ], - [ - { - "params": [ - "calls" - ], - "type": "field" - } - ], - [ - { - "params": [ - "short_query" - ], - "type": "field" - } - ], - [ - { - "params": [ - "datname" - ], - "type": "field" - } - ], - [ - { - "params": [ - "total_time" - ], - "type": "field" - } - ] + [ + { + "params": [ + "calls" + ], + "type": "field" + } ], - "tags": [] - } + [ + { + "params": [ + "short_query" + ], + "type": "field" + } + ], + [ + { + "params": [ + "datname" + ], + "type": "field" + } + ], + [ + { + "params": [ + "total_time" + ], + "type": "field" + } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [ - { - "kind": "Transformation", - "group": "organize", - "spec": { - "options": { - "excludeByName": { - "Value": false, - "__name__": true, - "endpoint": true, - "exported_namespace": true, - "host": true, - "instance": true, - "job": true, - "metric_name": true, - "name": true, - "namespace": true, - "pod": true, - "service": true, - "short_query": false - }, - "indexByName": { - "Time": 0, - "Value": 1, - "__name__": 2, - "endpoint": 4, - "exported_namespace": 5, - "host": 6, - "instance": 7, - "job": 8, - "metric_name": 14, - "name": 9, - "namespace": 10, - "pod": 11, - "queryid": 12, - "service": 13, - "short_query": 3 - }, - "renameByName": { - "Value": "VALUE", - "datname": "Database Name", - "name": "", - "queryid": "Query Id", - "rolname": "Role Name", - "short_query": "" - } - } - } - }, - { - "kind": "Transformation", - "group": "seriesToColumns", - "spec": { - "options": { - "byField": "Short Query" + } + ], + "queryOptions": {}, + "transformations": [ + { + "group": "organize", + "kind": "Transformation", + "spec": { + "options": { + "excludeByName": { + "Value": false, + "__name__": true, + "endpoint": true, + "exported_namespace": true, + "host": true, + "instance": true, + "job": true, + "metric_name": true, + "name": true, + "namespace": true, + "pod": true, + "service": true, + "short_query": false + }, + "indexByName": { + "Time": 0, + "Value": 1, + "__name__": 2, + "endpoint": 4, + "exported_namespace": 5, + "host": 6, + "instance": 7, + "job": 8, + "metric_name": 14, + "name": 9, + "namespace": 10, + "pod": 11, + "queryid": 12, + "service": 13, + "short_query": 3 + }, + "renameByName": { + "Value": "VALUE", + "datname": "Database Name", + "name": "", + "queryid": "Query Id", + "rolname": "Role Name", + "short_query": "" } } } - ], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "table", - "version": "13.0.6", - "spec": { - "options": { - "cellHeight": "sm", - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Database Name" - } - ] }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "footer": { - "reducers": [] - }, - "inspect": false - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "VALUE" - }, - "properties": [ - { - "id": "displayName", - "value": "$column" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "short_query" - }, - "properties": [ - { - "id": "displayName", - "value": "Short Query" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Short Query" - }, - "properties": [ - { - "id": "custom.width", - "value": 633 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "custom.width", - "value": 219 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "calls" - }, - "properties": [ - { - "id": "custom.width", - "value": 165 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Query Id" - }, - "properties": [ - { - "id": "custom.width", - "value": 322 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Database Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 346 - } - ] + { + "group": "seriesToColumns", + "kind": "Transformation", + "spec": { + "options": { + "byField": "Short Query" } - ] + } } - } + ] } - } - }, - "panel-1092": { - "kind": "Panel", - "spec": { - "id": 1092, - "title": "DbaaS Mappings", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${datasource}" - }, - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "sum by (datname, db_namespace, microservice, tenant_id) (last_over_time(ma_pg_dbaas{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__range:]))", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false - } + }, + "description": "The table shows TOP queries filtered by the selected column and database name. For queries statistics `pg_stat_statements` view used. More info about columns could be find in official docs.\n\nAlso, it is possible to reset the statistics, by calling `pg_stat_statements_reset()` function.", + "id": 1090, + "links": [], + "title": "TOP $limit queries by $column", + "vizConfig": { + "group": "table", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "footer": { + "reducers": [] + }, + "inspect": false + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 }, - "refId": "A", - "hidden": false - } + { + "color": "red", + "value": 80 + } + ] } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "table", - "version": "11.2.1", - "spec": { - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "microservice" - } - ] }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "VALUE" }, - "color": { - "mode": "thresholds" + "properties": [ + { + "id": "displayName", + "value": "$column" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "short_query" }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": true, - "inspect": false - } + "properties": [ + { + "id": "displayName", + "value": "Short Query" + } + ] }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] + { + "matcher": { + "id": "byName", + "options": "Short Query" }, - { - "matcher": { - "id": "byName", - "options": "Value" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - } - } - } - } - }, - "panel-1094": { - "kind": "Panel", - "spec": { - "id": 1094, - "title": "Version", - "description": "Postgres server version", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ + "properties": [ + { + "id": "custom.width", + "value": 633 + } + ] + }, { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "disableTextWrap": false, - "editorMode": "code", - "expr": "postgres_version{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "format": "table", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "__auto", - "range": true, - "useBackend": false - } - }, - "refId": "pg_version", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.6", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^Value$/", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "string", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] + "matcher": { + "id": "byName", + "options": "Time" }, - "color": { - "mode": "thresholds" - } + "properties": [ + { + "id": "custom.width", + "value": 219 + } + ] }, - "overrides": [] - } - } - } - } - }, - "panel-1095": { - "kind": "Panel", - "spec": { - "id": 1095, - "title": "Active Temp Writes", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_active_temp_writes{namespace=~\"$namespace\", datname=~\"$datname\", usename=~\"$usename\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "useBackend": false - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.5.2", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Queries Count", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" + "matcher": { + "id": "byName", + "options": "calls" + }, + "properties": [ + { + "id": "custom.width", + "value": 165 } - } + ] }, - "overrides": [] - } - } - } - } - }, - "panel-1097": { - "kind": "Panel", - "spec": { - "id": 1097, - "title": "Temporary Files Count By Database", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_temp_file_count_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "useBackend": false - } - }, - "refId": "A", - "hidden": false - } + "matcher": { + "id": "byName", + "options": "Query Id" + }, + "properties": [ + { + "id": "custom.width", + "value": 322 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Database Name" + }, + "properties": [ + { + "id": "custom.width", + "value": 346 + } + ] + } + ] + }, + "options": { + "cellHeight": "sm", + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Database Name" } - ], - "transformations": [], - "queryOptions": {} + ] } }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.5.2", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" + "version": "13.0.6" + } + } + }, + "panel-1092": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "code", + "exemplar": false, + "expr": "sum by (datname, db_namespace, microservice, tenant_id) (last_over_time(ma_pg_dbaas{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__range:]))", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false + }, + "version": "v0" + }, + "refId": "A" } - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Temp Files Count", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" - } - } - }, - "overrides": [] } - } + ], + "queryOptions": {}, + "transformations": [] } - } - }, - "panel-1098": { - "kind": "Panel", - "spec": { - "id": 1098, - "title": "Temporary Files Size By Database", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_temp_file_size_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "useBackend": false - } + }, + "description": "", + "id": 1092, + "links": [], + "title": "DbaaS Mappings", + "vizConfig": { + "group": "table", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.5.2", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" + { + "color": "red", + "value": 80 + } + ] } }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Temp File Size", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true } - } + ] }, - "overrides": [] - } - } - } - } - }, - "panel-1099": { - "kind": "Panel", - "spec": { - "id": 1099, - "title": "Temporary Files Size By Query", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_temp_file_size_by_query{namespace=~\"$namespace\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "useBackend": false - } - }, - "refId": "A", - "hidden": false - } + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] + }, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": true, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "microservice" } - ], - "transformations": [], - "queryOptions": {} + ] } }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.5.2", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" + "version": "11.2.1" + } + } + }, + "panel-1094": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "disableTextWrap": false, + "editorMode": "code", + "expr": "postgres_version{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "format": "table", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "useBackend": false + }, + "version": "v0" + }, + "refId": "pg_version" } - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Temp File Size", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" - } - } - }, - "overrides": [] } - } + ], + "queryOptions": {}, + "transformations": [] } - } - }, - "panel-11": { - "kind": "Panel", - "spec": { - "id": 11, - "title": "Replication Connections", - "description": "Shows the number of replication connections to PostgreSQL pods.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_replication_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*pg_metrics\\.replication_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + }, + "description": "Postgres server version", + "id": 1094, + "links": [], + "title": "Version", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" - } + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "string" + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^Value$/", + "values": false + }, + "showPercentChange": false, + "textMode": "value", + "wideLayout": true } }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.5.8", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "version": "13.0.6" + } + } + }, + "panel-1095": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_active_temp_writes{namespace=~\"$namespace\", datname=~\"$datname\", usename=~\"$usename\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "useBackend": false + }, + "version": "v0" + }, + "refId": "A" } - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] } - } + ], + "queryOptions": {}, + "transformations": [] } - } - }, - "panel-1100": { - "kind": "Panel", - "spec": { - "id": 1100, - "title": "Large Objects Count", - "description": "Shows objects and chunks count for PG Large Objects.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_large_object_object_count{namespace=~\"$namespace\", datname=~\"$datname\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "{{datname}}", - "range": true, - "useBackend": false - } + }, + "description": "", + "id": 1095, + "links": [], + "title": "Active Temp Writes", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Queries Count", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "refId": "B", - "hidden": false - } + { + "color": "red", + "value": 80 + } + ] } - ], - "transformations": [], - "queryOptions": {} + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } } }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.6", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" + "version": "11.5.2" + } + } + }, + "panel-1097": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_temp_file_count_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "useBackend": false + }, + "version": "v0" + }, + "refId": "A" } - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Count", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "fieldMinMax": false - }, - "overrides": [] } - } + ], + "queryOptions": {}, + "transformations": [] } - } - }, - "panel-1102": { - "kind": "Panel", - "spec": { - "id": 1102, - "title": "Size of large objects", - "description": "Shows total size of PG Large objects in bytes.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "exemplar": false, - "expr": "ma_pg_large_object_total_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\"}", - "format": "time_series", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": false, - "interval": "", - "legendFormat": "{{datname}}", - "range": true, - "useBackend": false - } + }, + "description": "", + "id": 1097, + "links": [], + "title": "Temporary Files Count By Database", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Temp Files Count", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "refId": "B", - "hidden": false - } + { + "color": "red", + "value": 80 + } + ] } - ], - "transformations": [], - "queryOptions": {} + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } } }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.6", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" + "version": "11.5.2" + } + } + }, + "panel-1098": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_temp_file_size_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "useBackend": false + }, + "version": "v0" + }, + "refId": "A" } - }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Size in bytes", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "fieldMinMax": false - }, - "overrides": [] } - } + ], + "queryOptions": {}, + "transformations": [] } - } - }, - "panel-1103": { - "kind": "Panel", - "spec": { - "id": 1103, - "title": "Default Partition Size (bytes)", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "spec": { - "editorMode": "builder", - "expr": "sum by(relname, datname) (ma_pg_default_partition_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\", relname=~\"$relname\", cluster=~\"$cluster\"})", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "{{datname}}/{{ relname }}", - "range": true - } + }, + "description": "", + "id": 1098, + "links": [], + "title": "Temporary Files Size By Database", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Temp File Size", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "refId": "B", - "hidden": false - } + { + "color": "red", + "value": 80 + } + ] } - ], - "transformations": [], - "queryOptions": {} + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } } }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.6", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" + "version": "11.5.2" + } + } + }, + "panel-1099": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_temp_file_size_by_query{namespace=~\"$namespace\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "useBackend": false + }, + "version": "v0" + }, + "refId": "A" } - }, - "fieldConfig": { - "defaults": { - "unit": "decbytes", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic", - "fixedColor": "green" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "hue", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] } - } + ], + "queryOptions": {}, + "transformations": [] } - } - }, - "panel-1104": { - "kind": "Panel", - "spec": { - "id": 1104, - "title": "Default Partition Row count", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "spec": { - "editorMode": "builder", - "expr": "sum by(relname, datname) (ma_pg_default_partition_row_count{relname=~\"$relname\", datname=~\"$datname\", cluster=~\"$cluster\", namespace=\"$namespace\"})", - "legendFormat": "{{datname}}/{{ relname }}", - "range": true - } + }, + "description": "", + "id": 1099, + "links": [], + "title": "Temporary Files Size By Query", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Temp File Size", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.6", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" + { + "color": "red", + "value": 80 + } + ] } }, - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic", - "fixedColor": "green" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 100, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } } - } + }, + "version": "11.5.2" } - }, - "panel-12": { - "kind": "Panel", - "spec": { - "id": 12, - "title": "Locks", - "description": "Number of locks from pg_locks view.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_locks{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-11": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_replication_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*pg_metrics\\.replication_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks$/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" + } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the number of replication connections to PostgreSQL pods.", + "id": 11, + "links": [], + "title": "Replication Connections", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.5.2", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" + "version": "9.5.8" + } + } + }, + "panel-1100": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_large_object_object_count{namespace=~\"$namespace\", datname=~\"$datname\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{datname}}", + "range": true, + "useBackend": false + }, + "version": "v0" + }, + "refId": "B" } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "Shows objects and chunks count for PG Large Objects.", + "id": 1100, + "links": [], + "title": "Large Objects Count", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "fieldMinMax": false, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 } - } - }, - "overrides": [] + ] + } + }, + "overrides": [] + }, + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } } - } + }, + "version": "13.0.6" } - }, - "panel-13": { - "kind": "Panel", - "spec": { - "id": 13, - "title": "Locks not granted", - "description": "Number of locks from pg_locks view that are not granted.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_locks_not_granted{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks_not_granted/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + } + }, + "panel-1102": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "disableTextWrap": false, + "editorMode": "builder", + "exemplar": false, + "expr": "ma_pg_large_object_total_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\"}", + "format": "time_series", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "interval": "", + "legendFormat": "{{datname}}", + "range": true, + "useBackend": false + }, + "version": "v0" + }, + "refId": "B" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "Shows total size of PG Large objects in bytes.", + "id": 1102, + "links": [], + "title": "Size of large objects", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Size in bytes", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "fieldMinMax": false, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 }, - "refId": "A", - "hidden": false - } + { + "color": "red", + "value": 80 + } + ] } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" + }, + "overrides": [] + }, + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } } }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.5.2", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" + "version": "13.0.6" + } + } + }, + "panel-1103": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "builder", + "expr": "sum by(relname, datname) (ma_pg_default_partition_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\", relname=~\"$relname\", cluster=~\"$cluster\"})", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "{{datname}}/{{ relname }}", + "range": true + }, + "version": "v0" + }, + "refId": "B" } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 1103, + "links": [], + "title": "Default Partition Size (bytes)", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "hue", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "decbytes" + }, + "overrides": [] + }, + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } } - } + }, + "version": "13.0.6" } - }, - "panel-14": { - "kind": "Panel", - "spec": { - "id": 14, - "title": "TPS", - "description": "Estimated value for transactions per second. Calculated as transaction amount for last 30 seconds divided by 30.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "sum(irate(ma_pg_metrics_xact_sum{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__rate_interval]))", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT non_negative_derivative(mean(\"value\"), 1s) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xact_sum/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + } + }, + "panel-1104": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "${datasource}" }, - "refId": "A", - "hidden": false - } + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "builder", + "expr": "sum by(relname, datname) (ma_pg_default_partition_row_count{relname=~\"$relname\", datname=~\"$datname\", cluster=~\"$cluster\", namespace=\"$namespace\"})", + "legendFormat": "{{datname}}/{{ relname }}", + "range": true + }, + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.5.8", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 1104, + "links": [], + "title": "Default Partition Row count", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] } }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] + "overrides": [] + }, + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } } - } + }, + "version": "13.0.6" } - }, - "panel-15": { - "kind": "Panel", - "spec": { - "id": 15, - "title": "Endpoint Cluster Status (1 = Running)", - "description": "Shows whether monitoring is able to connect to PostgreSQL through the endpoint.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "expr": "ma_pg_endpoints_cluster_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_locks{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks$/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "Leader", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.5.8", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Number of locks from pg_locks view.", + "id": 12, + "links": [], + "title": "Locks", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } } - } + }, + "version": "11.5.2" } - }, - "panel-16": { - "kind": "Panel", - "spec": { - "id": 16, - "title": "Smoke Tests Timings", - "description": "Shows the execution time for a **single** RW request (select, insert, update, delete) through the endpoint.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "delete", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "groupBy": [ + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_locks_not_granted{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks_not_granted/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "{{action}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.5.8", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "max", - "mean", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Number of locks from pg_locks view that are not granted.", + "id": 13, + "links": [], + "title": "Locks not granted", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } } - } + }, + "version": "11.5.2" } - }, - "panel-17": { - "kind": "Panel", - "spec": { - "id": 17, - "title": "Smoke Test", - "description": "This like the \"Smoke test\" section, with one difference - this section executes smoketests directly on the master pod.\nThe difference in execution allows distinguishing between cases of master unavailability and endpoint failure.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "delete", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "groupBy": [ + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "sum(irate(ma_pg_metrics_xact_sum{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__rate_interval]))", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT non_negative_derivative(mean(\"value\"), 1s) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xact_sum/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "{{action}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.*.smoketest.delete.*check$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.5.5", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 12, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "always", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "percent" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Estimated value for transactions per second. Calculated as transaction amount for last 30 seconds divided by 30.", + "id": 14, + "links": [], + "title": "TPS", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.5.8" } - }, - "panel-18": { - "kind": "Panel", - "spec": { - "id": 18, - "title": "Smoke Tests Timings", - "description": "This like the \"Smoke test\" section, with one difference - this section executes smoketests directly on the master pod.\n The difference in execution allows distinguishing between cases of master unavailability and endpoint failure.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$6", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "groupBy": [ + } + }, + "panel-15": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "expr": "ma_pg_endpoints_cluster_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Leader", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "{{action}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.5.5", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "max", - "mean", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows whether monitoring is able to connect to PostgreSQL through the endpoint.", + "id": 15, + "links": [], + "title": "Endpoint Cluster Status (1 = Running)", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.5.8" } - }, - "panel-19": { - "kind": "Panel", - "spec": { - "id": 19, - "title": "XLOG Location", - "description": "Shows current XLOG location. This value is correlated with the transaction count, or the number of changes made to the database.\nThe master and replica should have the same value, with a short period while the replica catches up to the master. \nThe value on the replica can be slightly less than the master's, but should increase over time.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_xlog_location{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-16": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "delete", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{action}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "select /value/ from /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xlog_location/ where namespace = '$namespace' and $timeFilter", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.5.2", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the execution time for a **single** RW request (select, insert, update, delete) through the endpoint.", + "id": 16, + "links": [], + "title": "Smoke Tests Timings", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.5.8" } - }, - "panel-20": { - "kind": "Panel", - "spec": { - "id": 20, - "title": "CPU Usage: $namespace_pods", - "description": "Shows CPU consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", - "links": [ - { - "title": "Kubernetes Pods", - "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables", - "targetBlank": true - } - ], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "usage", - "dsType": "influxdb", - "expr": "sum(rate(container_cpu_usage_seconds_total{image!=\"\", container!=\"POD\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}[2m])) by (pod_name, container)", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "container" - ], - "type": "tag" - }, + } + }, + "panel-17": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "delete", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{action}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.*.smoketest.delete.*check$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "null" + "value" ], - "type": "fill" - } - ], - "instant": false, - "interval": "", - "legendFormat": "usage", - "measurement": "cpu/usage_rate", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM \"cpu/usage_rate\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "sum" - } - ] - ], - "tags": [ - { - "key": "type", - "operator": "=", - "value": "pod_container" - }, - { - "condition": "AND", - "key": "namespace_name", - "operator": "=~", - "value": "/$namespace$/" + "type": "field" }, { - "condition": "AND", - "key": "pod_name", - "operator": "=~", - "value": "/$podname$/" + "params": [], + "type": "mean" } ] - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "expr": "kube_pod_container_resource_limits_cpu_cores{exported_namespace=\"$namespace\", exported_pod=\"$namespace_pods\", cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "limit" - } + ], + "tags": [] }, - "refId": "B", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.5.8", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Cores", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "This like the \"Smoke test\" section, with one difference - this section executes smoketests directly on the master pod.\nThe difference in execution allows distinguishing between cases of master unavailability and endpoint failure.", + "id": 17, + "links": [], + "title": "Smoke Test", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 12, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "always", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "percent" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "limit" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineWidth", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "request" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EF843C", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/^usage/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#7EB26D", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 20 - } - ] - } - ] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.5.5" } - }, - "panel-22": { - "kind": "Panel", - "spec": { - "id": 22, - "title": "Memory Usage: $namespace_pods", - "description": "Shows memory consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", - "links": [ - { - "title": "Kubernetes Pods", - "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables", - "targetBlank": true - } - ], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "usage", - "dsType": "influxdb", - "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "container_name" - ], - "type": "tag" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Working Set", - "measurement": "memory/usage", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT max(\"value\") FROM \"memory/usage\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "sum" - } - ] - ], - "tags": [ - { - "key": "type", - "operator": "=", - "value": "pod_container" - }, - { - "condition": "AND", - "key": "namespace_name", - "operator": "=~", - "value": "/$namespace$/" - }, - { - "condition": "AND", - "key": "pod_name", - "operator": "=~", - "value": "/$podname$/" - } - ] - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "working set", - "dsType": "influxdb", - "expr": "sum(container_spec_memory_limit_bytes{image!=\"\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}) by (pod_name)", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "container_name" - ], - "type": "tag" - }, + } + }, + "panel-18": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$6", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{action}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "null" + "value" ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "limits", - "measurement": "memory/usage", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT max(\"value\") FROM \"memory/working_set\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "sum" - } - ] - ], - "tags": [ - { - "key": "type", - "operator": "=", - "value": "pod_container" - }, - { - "condition": "AND", - "key": "namespace_name", - "operator": "=~", - "value": "/$namespace$/" + "type": "field" }, { - "condition": "AND", - "key": "pod_name", - "operator": "=~", - "value": "/$podname$/" + "params": [], + "type": "mean" } ] - } + ], + "tags": [] }, - "refId": "G", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", - "interval": "", - "legendFormat": "Memory Usage" - } - }, - "refId": "B", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "expr": "sum(container_memory_cache{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", - "interval": "", - "legendFormat": "Memory Cache" - } - }, - "refId": "C", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.5.8", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "bytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Memory", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "This like the \"Smoke test\" section, with one difference - this section executes smoketests directly on the master pod.\n The difference in execution allows distinguishing between cases of master unavailability and endpoint failure.", + "id": 18, + "links": [], + "title": "Smoke Tests Timings", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/^limit/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineWidth", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/^request/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EF843C", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/^usage/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#7EB26D", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/^working set/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#6ED0E0", - "mode": "fixed" - } - } - ] - } - ] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.5.5" } - }, - "panel-29": { - "kind": "Panel", - "spec": { - "id": 29, - "title": "Last Backup Status", - "description": "Backup status shows the state of the backup daemon. The backup status can be one of following:\n \n* OK - There is at least one successful backup, and the latest backup is successful.\n* WARNING - There are no successful backups, or the last backup failed.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "expr": "ma_status{namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-19": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_xlog_location{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "select /value/ from /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xlog_location/ where namespace = '$namespace' and $timeFilter", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /status/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100, - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.2.1", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "decimals": 0, - "mappings": [ - { - "type": "value", - "options": { - "0": { - "text": "OK" - }, - "3": { - "text": "WARN" - }, - "6": { - "text": "FAILED" - }, - "-1": { - "text": "N/A" - } - } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "Shows current XLOG location. This value is correlated with the transaction count, or the number of changes made to the database.\nThe master and replica should have the same value, with a short period while the replica catches up to the master. \nThe value on the replica can be slightly less than the master's, but should increase over time.", + "id": 19, + "links": [], + "title": "XLOG Location", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "value": 1, - "color": "rgba(237, 129, 40, 0.89)" - }, - { - "value": 4, - "color": "rgba(245, 54, 54, 0.9)" - } - ] - }, - "color": { - "mode": "thresholds" - } + ] }, - "overrides": [] + "unit": "bytes" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } } - } + }, + "version": "11.5.2" } - }, - "panel-3": { - "kind": "Panel", - "spec": { - "id": 3, - "title": "Disk Usage Percentage", - "description": "Shows disk usage for PostgreSQL pods.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_metrics_df_pcent{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-20": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "usage", + "dsType": "influxdb", + "expr": "sum(rate(container_cpu_usage_seconds_total{image!=\"\", container!=\"POD\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}[2m])) by (pod_name, container)", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "container" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "", + "legendFormat": "usage", + "measurement": "cpu/usage_rate", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM \"cpu/usage_rate\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "sum" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.metrics\\.df\\.pcent/ WHERE namespace='$namespace' and $timeFilter group by service_name", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - }, - "refId": "A", - "hidden": false - } + ] + ], + "tags": [ + { + "key": "type", + "operator": "=", + "value": "pod_container" + }, + { + "condition": "AND", + "key": "namespace_name", + "operator": "=~", + "value": "/$namespace$/" + }, + { + "condition": "AND", + "key": "pod_name", + "operator": "=~", + "value": "/$podname$/" + } + ] + }, + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.5.2", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "kube_pod_container_resource_limits_cpu_cores{exported_namespace=\"$namespace\", exported_pod=\"$namespace_pods\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "limit" + }, + "version": "v0" + }, + "refId": "B" } + } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows CPU consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", + "id": 20, + "links": [ + { + "targetBlank": true, + "title": "Kubernetes Pods", + "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables" + } + ], + "title": "CPU Usage: $namespace_pods", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Cores", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "fieldConfig": { - "defaults": { - "unit": "percent", - "min": 0, - "max": 100, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + }, + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.lineWidth", + "value": 2 } - } + ] }, - "overrides": [] - } - } - } - } - }, - "panel-31": { - "kind": "Panel", - "spec": { - "id": 31, - "title": "Backup Last Version Size", - "description": "Shows the size of the last backup.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "", - "dsType": "influxdb", - "expr": "ma_storage_last_metrics_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Size", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM \"ma.storage.last.metrics.size\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] + "matcher": { + "id": "byName", + "options": "request" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#EF843C", + "mode": "fixed" } }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" - } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.0.7", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "decbytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + { + "id": "custom.fillOpacity", + "value": 0 } - } + ] }, - "overrides": [] + { + "matcher": { + "id": "byRegexp", + "options": "/^usage/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#7EB26D", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] + } + ] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.5.8" } - }, - "panel-32": { - "kind": "Panel", - "spec": { - "id": 32, - "title": "Storage Size/Free Space", - "description": "Shows the space occupied by backups and the remaining amount of space. \nNot all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "Space Used", - "dsType": "influxdb", - "expr": "ma_storage_total_space{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-22": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "usage", + "dsType": "influxdb", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "container_name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Working Set", + "measurement": "memory/usage", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT max(\"value\") FROM \"memory/usage\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "sum" } - ], - "interval": "", - "legendFormat": "Total Space", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /storage\\.size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [ + { + "key": "type", + "operator": "=", + "value": "pod_container" + }, + { + "condition": "AND", + "key": "namespace_name", + "operator": "=~", + "value": "/$namespace$/" + }, + { + "condition": "AND", + "key": "pod_name", + "operator": "=~", + "value": "/$podname$/" + } + ] }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "Total Volume Space", - "dsType": "influxdb", - "expr": "ma_storage_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + "version": "v0" + }, + "refId": "A" + } + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "working set", + "dsType": "influxdb", + "expr": "sum(container_spec_memory_limit_bytes{image!=\"\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}) by (pod_name)", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "container_name" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "limits", + "measurement": "memory/usage", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT max(\"value\") FROM \"memory/working_set\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "sum" } - ], - "interval": "", - "legendFormat": "Storage Size", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /storage\\.total_space/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [ + { + "key": "type", + "operator": "=", + "value": "pod_container" + }, + { + "condition": "AND", + "key": "namespace_name", + "operator": "=~", + "value": "/$namespace$/" + }, + { + "condition": "AND", + "key": "pod_name", + "operator": "=~", + "value": "/$podname$/" + } + ] }, - "refId": "B", - "hidden": false - } + "version": "v0" + }, + "refId": "G" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" - } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.0.7", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", + "interval": "", + "legendFormat": "Memory Usage" + }, + "version": "v0" + }, + "refId": "B" } }, - "fieldConfig": { - "defaults": { - "unit": "decbytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "expr": "sum(container_memory_cache{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", + "interval": "", + "legendFormat": "Memory Cache" + }, + "version": "v0" + }, + "refId": "C" + } + } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows memory consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", + "id": 22, + "links": [ + { + "targetBlank": true, + "title": "Kubernetes Pods", + "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables" + } + ], + "title": "Memory Usage: $namespace_pods", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Memory", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/^limit/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.lineWidth", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/^request/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#EF843C", + "mode": "fixed" } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + }, + { + "id": "custom.fillOpacity", + "value": 0 } - } + ] }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Total Volume Space" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 + { + "matcher": { + "id": "byRegexp", + "options": "/^usage/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#7EB26D", + "mode": "fixed" } - ] + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/^working set/" }, - { - "matcher": { - "id": "byName", - "options": "Space Used" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#629E51", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 20 + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#6ED0E0", + "mode": "fixed" } - ] - } - ] + } + ] + } + ] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.5.8" } - }, - "panel-33": { - "kind": "Panel", - "spec": { - "id": 33, - "title": "Time Spent on Backup", - "description": "Shows time spent on last backup.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "Time Spent on Each Backup", - "dsType": "influxdb", - "expr": "ma_storage_lastSuccessful_metrics_spent_time{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-29": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "expr": "ma_status{namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /status/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "Time Spent", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /storage\\.lastSuccessful\\.metrics\\.spent_time/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.0.7", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ms", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" + ], + "queryOptions": { + "interval": "$inter", + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "Backup status shows the state of the backup daemon. The backup status can be one of following:\n \n* OK - There is at least one successful backup, and the latest backup is successful.\n* WARNING - There are no successful backups, or the last backup failed.", + "id": 29, + "links": [], + "title": "Last Backup Status", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "0": { + "text": "OK" + }, + "3": { + "text": "WARN" + }, + "6": { + "text": "FAILED" }, - { - "value": 80, - "color": "red" + "-1": { + "text": "N/A" } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 4 + } + ] }, - "overrides": [] - } + "unit": "none" + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "11.2.1" } - }, - "panel-37": { - "kind": "Panel", - "spec": { - "id": 37, - "title": "Time of Last Backup", - "description": "Shows the period of time when the last backup process was ended.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "expr": "ma_storage_last_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_metrics_df_pcent{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.metrics\\.df\\.pcent/ WHERE namespace='$namespace' and $timeFilter group by service_name", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.last.metrics.end_timestamp", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.last.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100, - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.2.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "ms", - "decimals": 0, - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "Shows disk usage for PostgreSQL pods.", + "id": 3, + "links": [], + "title": "Disk Usage Percentage", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "thresholds" - } + ] }, - "overrides": [] + "unit": "percent" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } } - } + }, + "version": "11.5.2" } - }, - "panel-38": { - "kind": "Panel", - "spec": { - "id": 38, - "title": "Backup Activity Status", - "description": "Shows the current activity status of the backup daemon. The activity status can be one of following:\n* Not Active - There is no running backup process.\n* In Progress - The backup process is running.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-31": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "", + "dsType": "influxdb", + "expr": "ma_storage_last_metrics_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Size", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM \"ma.storage.last.metrics.size\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.backup_is_in_progress", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100, - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.2.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "mappings": [ - { - "type": "value", - "options": { - "0": { - "text": "Not Active" - }, - "1": { - "text": "In Progress" - } - } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the size of the last backup.", + "id": 31, + "links": [], + "title": "Backup Last Version Size", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "rgba(245, 54, 54, 0.9)" - }, - { - "value": 0, - "color": "rgba(237, 129, 40, 0.89)" - }, - { - "value": 0.5, - "color": "rgba(50, 172, 45, 0.97)" - } - ] - }, - "color": { - "mode": "thresholds" - } + ] }, - "overrides": [] + "unit": "decbytes" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.0.7" } - }, - "panel-40": { - "kind": "Panel", - "spec": { - "id": 40, - "title": "Storage Type", - "description": "Shows the backup storage type.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "expr": "", - "groupBy": [ + } + }, + "panel-32": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "Space Used", + "dsType": "influxdb", + "expr": "ma_storage_total_space{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Total Space", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /storage\\.size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.type", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM \"ma.storage.type\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": {} + ] + ], + "tags": [] }, - "refId": "B", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100 - } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.2.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "PV" + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "Total Volume Space", + "dsType": "influxdb", + "expr": "ma_storage_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-41": { - "kind": "Panel", - "spec": { - "id": 41, - "title": "Time of Last Successful Backup", - "description": "Shows the period of time when the last successful backup process was ended.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "expr": "ma_storage_lastSuccessful_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + ], + "interval": "", + "legendFormat": "Storage Size", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /storage\\.total_space/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.last.metrics.end_timestamp", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.lastSuccessful.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "B" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100, - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.2.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "ms", - "decimals": 0, - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the space occupied by backups and the remaining amount of space. \nNot all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", + "id": 32, + "links": [], + "title": "Storage Size/Free Space", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] + ] + }, + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Total Volume Space" }, - "color": { - "mode": "thresholds" - } + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] }, - "overrides": [] + { + "matcher": { + "id": "byName", + "options": "Space Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#629E51", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] + } + ] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.0.7" } - }, - "panel-42": { - "kind": "Panel", - "spec": { - "id": 42, - "title": "Backup Versions Count", - "description": "Shows the amount of available backups.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "expr": "ma_storage_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-33": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "Time Spent on Each Backup", + "dsType": "influxdb", + "expr": "ma_storage_lastSuccessful_metrics_spent_time{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Time Spent", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /storage\\.lastSuccessful\\.metrics\\.spent_time/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.dump_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100, - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.2.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows time spent on last backup.", + "id": 33, + "links": [], + "title": "Time Spent on Backup", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "thresholds" - } + ] }, - "overrides": [] + "unit": "ms" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.0.7" } - }, - "panel-43": { - "kind": "Panel", - "spec": { - "id": 43, - "title": "Successful Backup Versions Count", - "description": "Shows the amount of successful backups.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "expr": "ma_storage_successful_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-37": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "expr": "ma_storage_last_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.last.metrics.end_timestamp", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.last.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "last" } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.dump_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.successful_dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100, - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.2.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" + ], + "queryOptions": { + "interval": "$inter", + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "Shows the period of time when the last backup process was ended.", + "id": 37, + "links": [], + "title": "Time of Last Backup", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" } - ] - }, - "color": { - "mode": "thresholds" + }, + "type": "special" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] - } + "unit": "ms" + }, + "overrides": [] + }, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "11.2.1" } - }, - "panel-44": { - "kind": "Panel", - "spec": { - "id": 44, - "title": "Next Backup", - "description": "Shows the time when backup and eviction will be started.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "expr": "ma_backup_time_until_next_backup{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-38": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.backup_is_in_progress", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "last" } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.dump_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.backup.time_until_next_backup\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100, - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.2.1", - "spec": { - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "s", - "decimals": 0, - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" + ], + "queryOptions": { + "interval": "$inter", + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "Shows the current activity status of the backup daemon. The activity status can be one of following:\n* Not Active - There is no running backup process.\n* In Progress - The backup process is running.", + "id": 38, + "links": [], + "title": "Backup Activity Status", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "Not Active" }, - { - "value": 80, - "color": "red" + "1": { + "text": "In Progress" } - ] + }, + "type": "value" }, - "color": { - "mode": "thresholds" + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 0.5 + } + ] }, - "overrides": [] - } + "unit": "none" + }, + "overrides": [] + }, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "11.2.1" } - }, - "panel-45": { - "kind": "Panel", - "spec": { - "id": 45, - "title": "Outdated Backup Count", - "description": "Shows the number of backups that will be evicted next time.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "dsType": "influxdb", - "expr": "ma_storage_outdated_backup_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-40": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "expr": "", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.type", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM \"ma.storage.type\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "last" } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.foul_backup_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.outdated_backup_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" + } + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": {}, + "version": "v0" + }, + "refId": "B" } - ], - "transformations": [], - "queryOptions": { - "maxDataPoints": 100, - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "11.2.1", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "mappings": [ - { - "type": "special", - "options": { - "match": "null", - "result": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "value": 0.5, - "color": "rgba(237, 129, 40, 0.89)" - }, - { - "value": 1.5, - "color": "rgba(245, 54, 54, 0.9)" + ], + "queryOptions": { + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "Shows the backup storage type.", + "id": 40, + "links": [], + "title": "Storage Type", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "PV" } - ] - }, - "color": { - "mode": "thresholds" + }, + "type": "special" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] - } + "unit": "none" + }, + "overrides": [] + }, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "11.2.1" } - }, - "panel-46": { - "kind": "Panel", - "spec": { - "id": 46, - "title": "Backup Activity Status", - "description": "Shows the changes of activity status on the chart.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "Time Spent on Each Backup", - "dsType": "influxdb", - "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-41": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "expr": "ma_storage_lastSuccessful_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.last.metrics.end_timestamp", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.lastSuccessful.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "last" } - ], - "interval": "", - "legendFormat": "Time in progress", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.0.7", - "spec": { - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ms", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" + ], + "queryOptions": { + "interval": "$inter", + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "Shows the period of time when the last successful backup process was ended.", + "id": 41, + "links": [], + "title": "Time of Last Successful Backup", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + }, + "type": "special" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] - } + "unit": "ms" + }, + "overrides": [] + }, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "11.2.1" } - }, - "panel-5": { - "kind": "Panel", - "spec": { - "id": 5, - "title": "DataBases Count", - "description": "Shows current DB count in PostgreSQL pods.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_db_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-42": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "expr": "ma_storage_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.dump_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "last" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.db_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "11.5.2", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" + ], + "queryOptions": { + "interval": "$inter", + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "Shows the amount of available backups.", + "id": 42, + "links": [], + "title": "Backup Versions Count", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + }, + "type": "special" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] - } + "unit": "none" + }, + "overrides": [] + }, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "11.2.1" } - }, - "panel-6": { - "kind": "Panel", - "spec": { - "id": 6, - "title": "Current Connections", - "description": "Shows the number of connections to PostgreSQL pods.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_current_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-43": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "expr": "ma_storage_successful_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.dump_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.successful_dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "last" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*\\.current_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "editorMode": "builder", - "expr": "ma_pg_metrics_postgres_max_connections{namespace=\"$namespace\"}", - "format": "table", - "legendFormat": "__auto", - "range": true - } + ] + ], + "tags": [] }, - "refId": "B", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.5.8", - "spec": { - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "none", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "displayName", - "value": "Limits" - } - ] - }, + ], + "queryOptions": { + "interval": "$inter", + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "Shows the amount of successful backups.", + "id": 43, + "links": [], + "title": "Successful Backup Versions Count", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ { - "matcher": { - "id": "byName", - "options": "Limits" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } + "options": { + "match": "null", + "result": { + "text": "N/A" } - ] + }, + "type": "special" } - ] - } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "11.2.1" } - }, - "panel-7": { - "kind": "Panel", - "spec": { - "id": 7, - "title": "Running Nodes (1 = OK)", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-44": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "expr": "ma_backup_time_until_next_backup{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.dump_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.backup.time_until_next_backup\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "last" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.pg_metrics.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "state-timeline", - "version": "13.0.6", - "spec": { - "options": { - "alignValue": "left", - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "mappings": [ - { - "type": "value", - "options": { - "0": { - "color": "#F2495C" - }, - "1": { - "color": "#73BF69" - }, - "N/A": { - "color": "#CCC" - }, - "null": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" + ], + "queryOptions": { + "interval": "$inter", + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "Shows the time when backup and eviction will be started.", + "id": 44, + "links": [], + "title": "Next Backup", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" } - ] - }, - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "axisPlacement": "auto", - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false + }, + "type": "special" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] - } + "unit": "s" + }, + "overrides": [] + }, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "11.2.1" } - }, - "panel-8": { - "kind": "Panel", - "spec": { - "id": 8, - "title": "Metric Sources (1 = OK)", - "description": "Shows whether metric sources work. If the value is greater than 1, then the source returns error. If the value is zero, then the source is down.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$tag_service_name", - "dsType": "influxdb", - "expr": "ma_status{namespace=\"$namespace\", cluster=~\"$cluster\"} + 1", - "groupBy": [ + } + }, + "panel-45": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "dsType": "influxdb", + "expr": "ma_storage_outdated_backup_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.foul_backup_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.outdated_backup_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "last" } - ], - "interval": "", - "legendFormat": "{{ service_name }}", - "orderByTime": "ASC", - "policy": "default", - "query": "select 1 - ( max(\"value\") / 14 - max(\"value\") % 14 / 14) from /ma.status/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "state-timeline", - "version": "13.0.6", - "spec": { - "options": { - "alignValue": "left", - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "mappings": [ - { - "type": "value", - "options": { - "0": { - "text": "ERROR", - "color": "#F2495C" - }, - "1": { - "text": "OK", - "color": "#73BF69" - }, - "7": { - "text": "PROBLEM", - "color": "#FF9830" - }, - "N/A": { - "color": "#CCC" - }, - "null": { - "text": "N/A" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" + ], + "queryOptions": { + "interval": "$inter", + "maxDataPoints": 100 + }, + "transformations": [] + } + }, + "description": "Shows the number of backups that will be evicted next time.", + "id": 45, + "links": [], + "title": "Outdated Backup Count", + "vizConfig": { + "group": "stat", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" } - ] - }, - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "axisPlacement": "auto", - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false + }, + "type": "special" } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.5 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 1.5 + } + ] }, - "overrides": [] - } + "unit": "none" + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true } - } + }, + "version": "11.2.1" } - }, - "panel-81": { - "kind": "Panel", - "spec": { - "id": 81, - "title": "Archive Lag, s", - "description": "Shows the time in seconds since the last WAL file was archived. If rotation is disabled, and load on server is close to zero, this value can reach thousand of seconds.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$6", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_pg_metrics_archive_delay{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-46": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "Time Spent on Each Backup", + "dsType": "influxdb", + "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Time in progress", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "delay", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.delay$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.0.7", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the changes of activity status on the chart.", + "id": 46, + "links": [], + "title": "Backup Activity Status", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "ms" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.0.7" } - }, - "panel-83": { - "kind": "Panel", - "spec": { - "id": 83, - "title": "Failed to archive", - "description": "Shows the amount of failed attempts to flush WAL files to archive. If this value is greater than 0, the system checks whether backup daemon is running and has enough space to store files.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$6", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_pg_metrics_archive_failed_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_db_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.db_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.failed_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.0.7", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows current DB count in PostgreSQL pods.", + "id": 5, + "links": [], + "title": "DataBases Count", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "none" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } } - } + }, + "version": "11.5.2" } - }, - "panel-84": { - "kind": "Panel", - "spec": { - "id": 84, - "title": "Storage Size/Free Space", - "description": "Shows the space occupied by WAL archive and the remaining amount of space. Not all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "Space Used", - "dsType": "influxdb", - "expr": "ma_storage_total_space{exported_namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-6": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_current_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*\\.current_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$__interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "Total Space", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /storage\\.archive_size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } + "version": "v0" + }, + "refId": "A" } - ], - "transformations": [], - "queryOptions": { - "interval": "$inter" - } - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "9.0.7", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + }, + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "editorMode": "builder", + "expr": "ma_pg_metrics_postgres_max_connections{namespace=\"$namespace\"}", + "format": "table", + "legendFormat": "__auto", + "range": true + }, + "version": "v0" + }, + "refId": "B" } + } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the number of connections to PostgreSQL pods.", + "id": 6, + "links": [], + "title": "Current Connections", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, - "fieldConfig": { - "defaults": { - "unit": "decbytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "displayName", + "value": "Limits" } - } + ] }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Total Volume Space" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - } - ] + { + "matcher": { + "id": "byName", + "options": "Limits" }, - { - "matcher": { - "id": "byName", - "options": "Space Used" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#629E51", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 20 + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" } - ] - } - ] + } + ] + } + ] + }, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } - } + }, + "version": "9.5.8" } - }, - "panel-901": { - "kind": "Panel", - "spec": { - "id": 901, - "title": "Disk Usage", - "description": "Shows usage by well-known consumers, such as pg_xlog or base directories.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "alias": "$7", - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_patroni_metrics_du_base{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$4", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.pg_metrics.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "$interval" + "value" ], - "type": "time" + "type": "field" }, { - "params": [ - "null" - ], - "type": "fill" + "params": [], + "type": "mean" } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.$short_container_name\\.metrics\\.du\\.(.?)/ WHERE namespace='$namespace' and $timeFilter group by service_name", - "range": true, - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } + ] + ], + "tags": [] }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "10.3.3", - "spec": { - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" + "version": "v0" + }, + "refId": "A" } - }, - "fieldConfig": { - "defaults": { - "unit": "decbytes", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "ma_pg_patroni_metrics_du_base" - }, - "properties": [ - { - "id": "unit", - "value": "deckbytes" - } - ] - } - ] } - } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] } - } - }, - "panel-910": { - "kind": "Panel", - "spec": { - "id": 910, - "title": "Collector duration", - "description": "", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" + }, + "description": "", + "id": 7, + "links": [], + "title": "Running Nodes (1 = OK)", + "vizConfig": { + "group": "state-timeline", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisPlacement": "auto", + "fillOpacity": 100, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [ + { + "options": { + "0": { + "color": "#F2495C" }, - "spec": { - "alias": "duration", - "dsType": "influxdb", - "expr": "ma_collector_duration{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{ host }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT value FROM /collector.duration/ WHERE namespace='$namespace' and $timeFilter fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] + "1": { + "color": "#73BF69" + }, + "N/A": { + "color": "#CCC" + }, + "null": { + "text": "N/A" } }, - "refId": "A", - "hidden": false + "type": "value" } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "10.1.5", - "spec": { - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "fieldConfig": { - "defaults": { - "unit": "ns", - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": null, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 } - } + ] }, - "overrides": [] + "unit": "short" + }, + "overrides": [] + }, + "options": { + "alignValue": "left", + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } } - } + }, + "version": "13.0.6" } } }, - "layout": { - "kind": "RowsLayout", + "panel-8": { + "kind": "Panel", "spec": { - "rows": [ - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Overview", - "collapse": false, - "layout": { - "kind": "GridLayout", + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 4, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-10" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 4, - "y": 0, - "width": 4, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-1077" + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$tag_service_name", + "dsType": "influxdb", + "expr": "ma_status{namespace=\"$namespace\", cluster=~\"$cluster\"} + 1", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } + ], + "interval": "", + "legendFormat": "{{ service_name }}", + "orderByTime": "ASC", + "policy": "default", + "query": "select 1 - ( max(\"value\") / 14 - max(\"value\") % 14 / 14) from /ma.status/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 8, - "y": 0, - "width": 2, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-1094" - } + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows whether metric sources work. If the value is greater than 1, then the source returns error. If the value is zero, then the source is down.", + "id": 8, + "links": [], + "title": "Metric Sources (1 = OK)", + "vizConfig": { + "group": "state-timeline", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisPlacement": "auto", + "fillOpacity": 100, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [ + { + "options": { + "0": { + "color": "#F2495C", + "text": "ERROR" + }, + "1": { + "color": "#73BF69", + "text": "OK" + }, + "7": { + "color": "#FF9830", + "text": "PROBLEM" + }, + "N/A": { + "color": "#CCC" + }, + "null": { + "text": "N/A" } }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ { - "kind": "GridLayoutItem", - "spec": { - "x": 10, - "y": 0, - "width": 7, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-7" - } - } + "color": "green", + "value": 0 }, { - "kind": "GridLayoutItem", - "spec": { - "x": 17, - "y": 0, - "width": 7, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-8" - } - } + "color": "red", + "value": 80 } ] - } + }, + "unit": "short" + }, + "overrides": [] + }, + "options": { + "alignValue": "left", + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } } }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Patroni Status", - "collapse": true, - "layout": { - "kind": "GridLayout", + "version": "13.0.6" + } + } + }, + "panel-81": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 24, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-1023" + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$6", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_pg_metrics_archive_delay{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - } - ] + ], + "interval": "", + "legendFormat": "delay", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.delay$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + "version": "v0" + }, + "refId": "A" } } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Smoke test", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 8, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-1" - } - } - }, + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the time in seconds since the last WAL file was archived. If rotation is disabled, and load on server is close to zero, this value can reach thousand of seconds.", + "id": 81, + "links": [], + "title": "Archive Lag, s", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ { - "kind": "GridLayoutItem", - "spec": { - "x": 8, - "y": 0, - "width": 8, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-16" - } - } + "color": "green" }, { - "kind": "GridLayoutItem", - "spec": { - "x": 16, - "y": 0, - "width": 8, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-15" - } - } + "color": "red", + "value": 80 } ] - } + }, + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "CPU Usage", - "collapse": true, - "layout": { - "kind": "GridLayout", + "version": "9.0.7" + } + } + }, + "panel-83": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 24, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-20" + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$6", + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_pg_metrics_archive_failed_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" }, - "repeat": { - "mode": "variable", - "value": "namespace_pods", - "direction": "h" + { + "params": [ + "null" + ], + "type": "fill" } - } + ], + "interval": "", + "legendFormat": "count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.failed_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the amount of failed attempts to flush WAL files to archive. If this value is greater than 0, the system checks whether backup daemon is running and has enough space to store files.", + "id": 83, + "links": [], + "title": "Failed to archive", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } ] - } + }, + "unit": "short" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Memory Usage", - "collapse": true, - "layout": { - "kind": "GridLayout", + "version": "9.0.7" + } + } + }, + "panel-84": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 24, - "height": 6, - "element": { - "kind": "ElementReference", - "name": "panel-22" + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "Space Used", + "dsType": "influxdb", + "expr": "ma_storage_total_space{exported_namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" }, - "repeat": { - "mode": "variable", - "value": "namespace_pods", - "direction": "h" + { + "params": [ + "null" + ], + "type": "fill" } - } - } - ] + ], + "interval": "", + "legendFormat": "Total Space", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /storage\\.archive_size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + "version": "v0" + }, + "refId": "A" } } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "PG Large Object Stats", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-1100" - } - } + ], + "queryOptions": { + "interval": "$inter" + }, + "transformations": [] + } + }, + "description": "Shows the space occupied by WAL archive and the remaining amount of space. Not all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", + "id": 84, + "links": [], + "title": "Storage Size/Free Space", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-1102" - } - } + "color": "red", + "value": 80 } ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Network", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 8, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-6" - } - } - }, + }, + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Total Volume Space" + }, + "properties": [ { - "kind": "GridLayoutItem", - "spec": { - "x": 8, - "y": 0, - "width": 8, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-11" - } + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" } }, { - "kind": "GridLayoutItem", - "spec": { - "x": 16, - "y": 0, - "width": 8, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-14" - } - } + "id": "custom.fillOpacity", + "value": 0 } ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Disk space", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-3" - } + }, + { + "matcher": { + "id": "byName", + "options": "Space Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#629E51", + "mode": "fixed" } }, { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 28, - "width": 24, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-901" - }, - "repeat": { - "mode": "variable", - "value": "short_container_name", - "direction": "h" - } - } + "id": "custom.fillOpacity", + "value": 20 } ] } + ] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Data handing", - "collapse": true, - "layout": { - "kind": "GridLayout", + "version": "9.0.7" + } + } + }, + "panel-901": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-5" + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "$7", + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_patroni_metrics_du_base{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.$short_container_name\\.metrics\\.du\\.(.?)/ WHERE namespace='$namespace' and $timeFilter group by service_name", + "range": true, + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-19" - } - } - } - ] + "version": "v0" + }, + "refId": "A" } } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Locks", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-12" - } - } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "Shows usage by well-known consumers, such as pg_xlog or base directories.", + "id": 901, + "links": [], + "title": "Disk Usage", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-13" - } - } + "color": "red", + "value": 80 } ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Master Smoke Test", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-17" - } - } - }, + }, + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "ma_pg_patroni_metrics_du_base" + }, + "properties": [ { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-18" - } - } + "id": "unit", + "value": "deckbytes" } ] } + ] + }, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Backup", - "collapse": true, - "layout": { - "kind": "GridLayout", + "version": "10.3.3" + } + } + }, + "panel-910": { + "kind": "Panel", + "spec": { + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 6, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-31" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 6, - "y": 0, - "width": 6, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-32" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 6, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-33" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 18, - "y": 0, - "width": 6, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-46" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 15, - "width": 4, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-29" + "hidden": false, + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "alias": "duration", + "dsType": "influxdb", + "expr": "ma_collector_duration{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } + ], + "interval": "", + "legendFormat": "{{ host }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT value FROM /collector.duration/ WHERE namespace='$namespace' and $timeFilter fill(null)", + "rawQuery": true, + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] }, + "version": "v0" + }, + "refId": "A" + } + } + ], + "queryOptions": {}, + "transformations": [] + } + }, + "description": "", + "id": 910, + "links": [], + "title": "Collector duration", + "vizConfig": { + "group": "timeseries", + "kind": "VizConfig", + "spec": { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ { - "kind": "GridLayoutItem", - "spec": { - "x": 4, - "y": 15, - "width": 5, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-40" - } - } + "color": "green" }, { - "kind": "GridLayoutItem", - "spec": { - "x": 9, - "y": 15, - "width": 5, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-38" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 14, - "y": 15, - "width": 5, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-41" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 19, - "y": 15, - "width": 5, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-37" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 43, - "width": 4, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-45" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 4, - "y": 43, - "width": 5, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-44" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 9, - "y": 43, - "width": 5, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-43" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 14, - "y": 43, - "width": 5, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-42" - } - } + "color": "red", + "value": 80 } ] - } + }, + "unit": "ns" + }, + "overrides": [] + }, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } } }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Archive", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 4, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-1015" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 4, - "y": 0, - "width": 6, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-81" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 10, - "y": 0, - "width": 7, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-83" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 17, - "y": 0, - "width": 7, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-84" - } - } + "version": "10.1.5" + } + } + } + }, + "layout": { + "kind": "RowsLayout", + "spec": { + "rows": [ + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": false, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-10" + }, + "height": 7, + "width": 4, + "x": 0, + "y": 0 } - ] - } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1077" + }, + "height": 7, + "width": 4, + "x": 4, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1094" + }, + "height": 7, + "width": 2, + "x": 8, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-7" + }, + "height": 7, + "width": 7, + "x": 10, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-8" + }, + "height": 7, + "width": 7, + "x": 17, + "y": 0 + } + } + ] } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Replication state", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-100" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-101" - } - } + }, + "title": "Overview" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1023" + }, + "height": 7, + "width": 24, + "x": 0, + "y": 0 + } + } + ] + } + }, + "title": "Patroni Status" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1" + }, + "height": 7, + "width": 8, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-16" + }, + "height": 7, + "width": 8, + "x": 8, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-15" + }, + "height": 7, + "width": 8, + "x": 16, + "y": 0 + } + } + ] + } + }, + "title": "Smoke test" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-20" + }, + "height": 8, + "repeat": { + "direction": "h", + "mode": "variable", + "value": "namespace_pods" + }, + "width": 24, + "x": 0, + "y": 0 + } + } + ] + } + }, + "title": "CPU Usage" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-22" + }, + "height": 6, + "repeat": { + "direction": "h", + "mode": "variable", + "value": "namespace_pods" + }, + "width": 24, + "x": 0, + "y": 0 + } + } + ] + } + }, + "title": "Memory Usage" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1100" + }, + "height": 8, + "width": 12, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1102" + }, + "height": 8, + "width": 12, + "x": 12, + "y": 0 + } + } + ] + } + }, + "title": "PG Large Object Stats" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-6" + }, + "height": 7, + "width": 8, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-11" + }, + "height": 7, + "width": 8, + "x": 8, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-14" + }, + "height": 7, + "width": 8, + "x": 16, + "y": 0 + } + } + ] + } + }, + "title": "Network" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-3" + }, + "height": 7, + "width": 12, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-901" + }, + "height": 7, + "repeat": { + "direction": "h", + "mode": "variable", + "value": "short_container_name" + }, + "width": 24, + "x": 0, + "y": 28 + } + } + ] + } + }, + "title": "Disk space" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-5" + }, + "height": 7, + "width": 12, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-19" + }, + "height": 7, + "width": 12, + "x": 12, + "y": 0 + } + } + ] + } + }, + "title": "Data handing" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-12" + }, + "height": 7, + "width": 12, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-13" + }, + "height": 7, + "width": 12, + "x": 12, + "y": 0 + } + } + ] + } + }, + "title": "Locks" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-17" + }, + "height": 7, + "width": 12, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-18" + }, + "height": 7, + "width": 12, + "x": 12, + "y": 0 + } + } + ] + } + }, + "title": "Master Smoke Test" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-31" + }, + "height": 8, + "width": 6, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-32" + }, + "height": 8, + "width": 6, + "x": 6, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-33" + }, + "height": 8, + "width": 6, + "x": 12, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-46" + }, + "height": 8, + "width": 6, + "x": 18, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-29" + }, + "height": 5, + "width": 4, + "x": 0, + "y": 15 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-40" + }, + "height": 5, + "width": 5, + "x": 4, + "y": 15 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-38" + }, + "height": 5, + "width": 5, + "x": 9, + "y": 15 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-41" + }, + "height": 5, + "width": 5, + "x": 14, + "y": 15 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-37" + }, + "height": 5, + "width": 5, + "x": 19, + "y": 15 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-45" + }, + "height": 5, + "width": 4, + "x": 0, + "y": 43 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-44" + }, + "height": 5, + "width": 5, + "x": 4, + "y": 43 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-43" + }, + "height": 5, + "width": 5, + "x": 9, + "y": 43 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-42" + }, + "height": 5, + "width": 5, + "x": 14, + "y": 43 + } + } + ] + } + }, + "title": "Backup" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1015" + }, + "height": 7, + "width": 4, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-81" + }, + "height": 7, + "width": 6, + "x": 4, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-83" + }, + "height": 7, + "width": 7, + "x": 10, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-84" + }, + "height": 7, + "width": 7, + "x": 17, + "y": 0 + } + } + ] + } + }, + "title": "Archive" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-100" + }, + "height": 7, + "width": 12, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-101" + }, + "height": 7, + "width": 12, + "x": 12, + "y": 0 + } + } + ] + } + }, + "title": "Replication state" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-910" + }, + "height": 7, + "width": 24, + "x": 0, + "y": 0 + } + } + ] + } + }, + "title": "Collector status" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1078" + }, + "height": 9, + "width": 12, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1079" + }, + "height": 9, + "width": 12, + "x": 12, + "y": 0 + } + } + ] + } + }, + "title": "Database Statistics" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1081" + }, + "height": 9, + "width": 12, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1082" + }, + "height": 9, + "width": 12, + "x": 12, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1083" + }, + "height": 9, + "width": 12, + "x": 0, + "y": 32 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1084" + }, + "height": 9, + "width": 12, + "x": 12, + "y": 32 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1085" + }, + "height": 9, + "width": 12, + "x": 0, + "y": 41 + } + } + ] + } + }, + "title": "Connection Statistics" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1098" + }, + "height": 8, + "width": 12, + "x": 0, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1099" + }, + "height": 8, + "width": 12, + "x": 12, + "y": 0 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1095" + }, + "height": 8, + "width": 12, + "x": 0, + "y": 8 + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1097" + }, + "height": 8, + "width": 12, + "x": 12, + "y": 8 } - ] - } + } + ] } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Collector status", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 24, - "height": 7, - "element": { - "kind": "ElementReference", - "name": "panel-910" - } - } + }, + "title": "Temporary File Statistics" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1087" + }, + "height": 9, + "width": 24, + "x": 0, + "y": 0 } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Database Statistics", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-1078" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-1079" - } - } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1088" + }, + "height": 9, + "width": 24, + "x": 0, + "y": 9 } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Connection Statistics", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-1081" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-1082" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 32, - "width": 12, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-1083" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 32, - "width": 12, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-1084" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 41, - "width": 12, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-1085" - } - } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1089" + }, + "height": 8, + "width": 24, + "x": 0, + "y": 18 } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Temporary File Statistics", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-1098" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-1099" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 8, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-1095" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 8, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-1097" - } - } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1090" + }, + "height": 8, + "width": 24, + "x": 0, + "y": 26 } - ] - } - } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "Tables Statistics", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 24, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-1087" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 9, - "width": 24, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-1088" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 18, - "width": 24, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-1089" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 26, - "width": 24, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-1090" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 34, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-1103" - } - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 34, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-1104" - } - } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1103" + }, + "height": 8, + "width": 12, + "x": 0, + "y": 34 } - ] - } + }, + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1104" + }, + "height": 8, + "width": 12, + "x": 12, + "y": 34 + } + } + ] } - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "title": "DBaaS", - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 24, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-1092" - } - } + }, + "title": "Tables Statistics" + } + }, + { + "kind": "RowsLayoutRow", + "spec": { + "collapse": true, + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "element": { + "kind": "ElementReference", + "name": "panel-1092" + }, + "height": 9, + "width": 24, + "x": 0, + "y": 0 } - ] - } + } + ] } - } + }, + "title": "DBaaS" } - ] + } + ] + } + }, + "links": [ + { + "asDropdown": false, + "icon": "external link", + "includeVars": false, + "keepTime": false, + "tags": [ + "Postgres_Performance" + ], + "targetBlank": false, + "title": "PostgreSQL Performance Metrics", + "tooltip": "", + "type": "dashboards", + "url": "" + }, + { + "asDropdown": false, + "icon": "external link", + "includeVars": false, + "keepTime": false, + "tags": [ + "Postgres_Exporter" + ], + "targetBlank": false, + "title": "Postgres Exporter", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], + "liveNow": false, + "preload": false, + "tags": [], + "timeSettings": { + "autoRefresh": "", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "fiscalYearStartMonth": 0, + "from": "now-5m", + "hideTimepicker": false, + "timezone": "browser", + "to": "now" + }, + "title": "PostgreSQL Cluster Prometheus Copy", + "variables": [ + { + "kind": "DatasourceVariable", + "spec": { + "allowCustomValue": true, + "current": { + "text": "Platform Monitoring Prometheus", + "value": "PC3E95692D54ABCC0" + }, + "hide": "dontHide", + "includeAll": false, + "label": "Cloud", + "multi": false, + "name": "datasource", + "options": [], + "pluginId": "prometheus", + "refresh": "onDashboardLoad", + "regex": "", + "skipUrlSync": false } }, - "links": [ - { - "title": "PostgreSQL Performance Metrics", - "type": "dashboards", - "icon": "external link", - "tooltip": "", - "url": "", - "tags": [ - "Postgres_Performance" - ], - "asDropdown": false, - "targetBlank": false, - "includeVars": false, - "keepTime": false - }, - { - "title": "Postgres Exporter", - "type": "dashboards", - "icon": "external link", - "tooltip": "", - "url": "", - "tags": [ - "Postgres_Exporter" - ], - "asDropdown": false, - "targetBlank": false, - "includeVars": false, - "keepTime": false + { + "kind": "QueryVariable", + "spec": { + "allowCustomValue": true, + "current": { + "text": "", + "value": "" + }, + "definition": "label_values(ma_status, cluster)", + "hide": "dontHide", + "includeAll": false, + "label": "Cluster", + "multi": false, + "name": "cluster", + "options": [], + "query": { + "datasource": { + "name": "$datasource" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "query": "label_values(ma_status, cluster)", + "refId": "StandardVariableQuery" + }, + "version": "v0" + }, + "refresh": "onDashboardLoad", + "regex": "", + "regexApplyTo": "value", + "skipUrlSync": false, + "sort": "alphabeticalAsc" } - ], - "liveNow": false, - "preload": false, - "tags": [], - "timeSettings": { - "timezone": "browser", - "from": "now-5m", - "to": "now", - "autoRefresh": "", - "autoRefreshIntervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "hideTimepicker": false, - "fiscalYearStartMonth": 0 }, - "title": "PostgreSQL Cluster Prometheus", - "variables": [ - { - "kind": "DatasourceVariable", - "spec": { - "name": "datasource", - "pluginId": "prometheus", - "refresh": "onDashboardLoad", - "regex": "", - "current": { - "text": "Platform Monitoring Prometheus", - "value": "PC3E95692D54ABCC0" + { + "kind": "QueryVariable", + "spec": { + "allowCustomValue": true, + "current": { + "text": "postgres-svty", + "value": "postgres-svty" + }, + "definition": "label_values(ma_status{cluster=~\"$cluster\"},namespace)", + "hide": "dontHide", + "includeAll": false, + "label": "Project", + "multi": false, + "name": "namespace", + "options": [], + "query": { + "datasource": { + "name": "$datasource" }, - "options": [], - "multi": false, - "includeAll": false, - "label": "Cloud", - "hide": "dontHide", - "skipUrlSync": false, - "allowCustomValue": true - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "cluster", - "current": { - "text": "", - "value": "" + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "query": "label_values(ma_status{cluster=~\"$cluster\"},namespace)", + "refId": "StandardVariableQuery" }, - "label": "Cluster", - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "query": "label_values(ma_status, cluster)", - "refId": "StandardVariableQuery" - } + "version": "v0" + }, + "refresh": "onDashboardLoad", + "regex": "", + "regexApplyTo": "value", + "skipUrlSync": false, + "sort": "disabled" + } + }, + { + "kind": "QueryVariable", + "spec": { + "allowCustomValue": true, + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "definition": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", + "hide": "dontHide", + "includeAll": true, + "label": "PG Data Nodes", + "multi": true, + "name": "container_name", + "options": [], + "query": { + "datasource": { + "name": "$datasource" }, - "regex": "", - "regexApplyTo": "value", - "sort": "alphabeticalAsc", - "definition": "label_values(ma_status, cluster)", - "options": [], - "multi": false, - "includeAll": false, - "allowCustomValue": true - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "namespace", - "current": { - "text": "test-perm7", - "value": "test-perm7" + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", + "refId": "Platform Monitoring Prometheus-container_name-Variable-Query" }, - "label": "Project", - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "query": "label_values(ma_status{cluster=~\"$cluster\"},namespace)", - "refId": "StandardVariableQuery" - } + "version": "v0" + }, + "refresh": "onDashboardLoad", + "regex": "", + "regexApplyTo": "value", + "skipUrlSync": false, + "sort": "alphabeticalAsc" + } + }, + { + "kind": "IntervalVariable", + "spec": { + "auto": true, + "auto_count": 30, + "auto_min": "60s", + "current": { + "text": "$__auto", + "value": "$__auto" + }, + "hide": "dontHide", + "label": "Sampling", + "name": "inter", + "options": [ + { + "selected": false, + "text": "1m", + "value": "1m" }, - "regex": "", - "regexApplyTo": "value", - "sort": "disabled", - "definition": "label_values(ma_status{cluster=~\"$cluster\"},namespace)", - "options": [], - "multi": false, - "includeAll": false, - "allowCustomValue": true - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "container_name", - "current": { - "text": "All", - "value": [ - "$__all" - ] + { + "selected": false, + "text": "10m", + "value": "10m" }, - "label": "PG Data Nodes", - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "refId": "Platform Monitoring Prometheus-container_name-Variable-Query" - } + { + "selected": false, + "text": "30m", + "value": "30m" }, - "regex": "", - "regexApplyTo": "value", - "sort": "alphabeticalAsc", - "definition": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "options": [], - "multi": true, - "includeAll": true, - "allowCustomValue": true - } - }, - { - "kind": "IntervalVariable", - "spec": { - "name": "inter", - "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", - "current": { - "text": "$__auto", - "value": "$__auto" + { + "selected": false, + "text": "1h", + "value": "1h" }, - "options": [ - { - "selected": false, - "text": "1m", - "value": "1m" - }, - { - "selected": false, - "text": "10m", - "value": "10m" - }, - { - "selected": false, - "text": "30m", - "value": "30m" - }, - { - "selected": false, - "text": "1h", - "value": "1h" - }, - { - "selected": false, - "text": "6h", - "value": "6h" - }, - { - "selected": false, - "text": "12h", - "value": "12h" - }, - { - "selected": false, - "text": "1d", - "value": "1d" - }, - { - "selected": false, - "text": "7d", - "value": "7d" - }, - { - "selected": false, - "text": "14d", - "value": "14d" - }, - { - "selected": false, - "text": "30d", - "value": "30d" - } - ], - "auto": true, - "auto_min": "60s", - "auto_count": 30, - "refresh": "onTimeRangeChanged", - "label": "Sampling", - "hide": "dontHide", - "skipUrlSync": false - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "namespace_pods", - "current": { - "text": "All", - "value": "$__all" + { + "selected": false, + "text": "6h", + "value": "6h" }, - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "$datasource" - }, - "spec": { - "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "refId": "Platform Monitoring Prometheus-namespace_pods-Variable-Query" - } + { + "selected": false, + "text": "12h", + "value": "12h" }, - "regex": "", - "regexApplyTo": "value", - "sort": "alphabeticalAsc", - "definition": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "options": [], - "multi": false, - "includeAll": true, - "allowCustomValue": true - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "datname", - "current": { - "text": "All", - "value": [ - "$__all" - ] + { + "selected": false, + "text": "1d", + "value": "1d" }, - "label": "Database Name", - "hide": "dontHide", - "refresh": "onTimeRangeChanged", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${datasource}" - }, - "spec": { - "query": "label_values(ma_pg_size_by_database{namespace=\"$namespace\", cluster=~\"$cluster\"},datname)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - } + { + "selected": false, + "text": "7d", + "value": "7d" }, - "regex": "", - "regexApplyTo": "value", - "sort": "alphabeticalAsc", - "definition": "label_values(ma_pg_size_by_database{namespace=\"$namespace\", cluster=~\"$cluster\"},datname)", - "options": [], - "multi": true, - "includeAll": true, - "allValue": ".*", - "allowCustomValue": true - } - }, - { - "kind": "CustomVariable", - "spec": { - "name": "limit", - "query": "5, 10, 20, 30, 40, 50", - "current": { - "text": "10", - "value": "10" + { + "selected": false, + "text": "14d", + "value": "14d" }, - "options": [ - { - "selected": false, - "text": "5", - "value": "5" - }, - { - "selected": true, - "text": "10", - "value": "10" - }, - { - "selected": false, - "text": "20", - "value": "20" - }, - { - "selected": false, - "text": "30", - "value": "30" - }, - { - "selected": false, - "text": "40", - "value": "40" - }, - { - "selected": false, - "text": "50", - "value": "50" - } - ], - "multi": false, - "includeAll": false, - "label": "Top", - "hide": "dontHide", - "skipUrlSync": false, - "allowCustomValue": true, - "valuesFormat": "csv" - } - }, - { - "kind": "CustomVariable", - "spec": { - "name": "table_limit", - "query": "10,50,100,500,1000,2000,5000", - "current": { - "text": "500", - "value": "500" + { + "selected": false, + "text": "30d", + "value": "30d" + } + ], + "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false + } + }, + { + "kind": "QueryVariable", + "spec": { + "allowCustomValue": true, + "current": { + "text": "All", + "value": "$__all" + }, + "definition": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", + "hide": "dontHide", + "includeAll": true, + "multi": false, + "name": "namespace_pods", + "options": [], + "query": { + "datasource": { + "name": "$datasource" }, - "options": [ - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": false, - "text": "50", - "value": "50" - }, - { - "selected": false, - "text": "100", - "value": "100" - }, - { - "selected": true, - "text": "500", - "value": "500" - }, - { - "selected": false, - "text": "1000", - "value": "1000" - }, - { - "selected": false, - "text": "2000", - "value": "2000" - }, - { - "selected": false, - "text": "5000", - "value": "5000" - } - ], - "multi": false, - "includeAll": false, - "label": "Table Limit", - "hide": "dontHide", - "skipUrlSync": false, - "allowCustomValue": true, - "valuesFormat": "csv" - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "usename", - "current": { - "text": "All", - "value": [ - "$__all" - ] + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", + "refId": "Platform Monitoring Prometheus-namespace_pods-Variable-Query" }, - "label": "Role Name", - "hide": "dontHide", - "refresh": "onTimeRangeChanged", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${datasource}" - }, - "spec": { - "query": "label_values(ma_pg_connection_by_role{namespace=\"$namespace\", cluster=~\"$cluster\"},usename)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - } + "version": "v0" + }, + "refresh": "onDashboardLoad", + "regex": "", + "regexApplyTo": "value", + "skipUrlSync": false, + "sort": "alphabeticalAsc" + } + }, + { + "kind": "QueryVariable", + "spec": { + "allValue": ".*", + "allowCustomValue": true, + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "definition": "label_values(ma_pg_size_by_database{namespace=\"$namespace\", cluster=~\"$cluster\"},datname)", + "hide": "dontHide", + "includeAll": true, + "label": "Database Name", + "multi": true, + "name": "datname", + "options": [], + "query": { + "datasource": { + "name": "${datasource}" }, - "regex": "", - "regexApplyTo": "value", - "sort": "disabled", - "definition": "label_values(ma_pg_connection_by_role{namespace=\"$namespace\", cluster=~\"$cluster\"},usename)", - "options": [], - "multi": true, - "includeAll": true, - "allValue": ".*", - "allowCustomValue": true - } - }, - { - "kind": "CustomVariable", - "spec": { - "name": "column", - "query": "calls, max_time, min_time, mean_time, total_time", - "current": { - "text": "calls", - "value": "calls" + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "query": "label_values(ma_pg_size_by_database{namespace=\"$namespace\", cluster=~\"$cluster\"},datname)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "options": [ - { - "selected": true, - "text": "calls", - "value": "calls" - }, - { - "selected": false, - "text": "max_time", - "value": "max_time" - }, - { - "selected": false, - "text": "min_time", - "value": "min_time" - }, - { - "selected": false, - "text": "mean_time", - "value": "mean_time" - }, - { - "selected": false, - "text": "total_time", - "value": "total_time" - } - ], - "multi": false, - "includeAll": false, - "label": "Top By Column", - "hide": "dontHide", - "skipUrlSync": false, - "allowCustomValue": true, - "valuesFormat": "csv" - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "top_tables_by_size", - "current": { - "text": "All", - "value": [ - "$__all" - ] + "version": "v0" + }, + "refresh": "onTimeRangeChanged", + "regex": "", + "regexApplyTo": "value", + "skipUrlSync": false, + "sort": "alphabeticalAsc" + } + }, + { + "kind": "CustomVariable", + "spec": { + "allowCustomValue": true, + "current": { + "text": "10", + "value": "10" + }, + "hide": "dontHide", + "includeAll": false, + "label": "Top", + "multi": false, + "name": "limit", + "options": [], + "query": "5, 10, 20, 30, 40, 50", + "skipUrlSync": false, + "valuesFormat": "csv" + } + }, + { + "kind": "CustomVariable", + "spec": { + "allowCustomValue": true, + "current": { + "text": "500", + "value": "500" + }, + "hide": "dontHide", + "includeAll": false, + "label": "Table Limit", + "multi": false, + "name": "table_limit", + "options": [], + "query": "10,50,100,500,1000,2000,5000", + "skipUrlSync": false, + "valuesFormat": "csv" + } + }, + { + "kind": "QueryVariable", + "spec": { + "allValue": ".*", + "allowCustomValue": true, + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "definition": "label_values(ma_pg_connection_by_role{namespace=\"$namespace\", cluster=~\"$cluster\"},usename)", + "hide": "dontHide", + "includeAll": true, + "label": "Role Name", + "multi": true, + "name": "usename", + "options": [], + "query": { + "datasource": { + "name": "${datasource}" }, - "hide": "hideVariable", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "${datasource}" - }, - "spec": { - "query": "query_result(topk($limit, sum by (relid, datname, relname) (last_over_time(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}[$__range:]))))", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - } + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "query": "label_values(ma_pg_connection_by_role{namespace=\"$namespace\", cluster=~\"$cluster\"},usename)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "regex": ".*relname=\"(.*)\".*", - "regexApplyTo": "value", - "sort": "disabled", - "definition": "query_result(topk($limit, sum by (relid, datname, relname) (last_over_time(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}[$__range:]))))", - "options": [], - "multi": true, - "includeAll": true, - "allowCustomValue": true - } - }, - { - "kind": "QueryVariable", - "spec": { - "name": "relname", - "current": { - "text": "", - "value": "" + "version": "v0" + }, + "refresh": "onTimeRangeChanged", + "regex": "", + "regexApplyTo": "value", + "skipUrlSync": false, + "sort": "disabled" + } + }, + { + "kind": "CustomVariable", + "spec": { + "allowCustomValue": true, + "current": { + "text": "calls", + "value": "calls" + }, + "hide": "dontHide", + "includeAll": false, + "label": "Top By Column", + "multi": false, + "name": "column", + "options": [], + "query": "calls, max_time, min_time, mean_time, total_time", + "skipUrlSync": false, + "valuesFormat": "csv" + } + }, + { + "kind": "QueryVariable", + "spec": { + "allowCustomValue": true, + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "definition": "query_result(topk($limit, sum by (relid, datname, relname) (last_over_time(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}[$__range:]))))", + "hide": "hideVariable", + "includeAll": true, + "multi": true, + "name": "top_tables_by_size", + "options": [], + "query": { + "datasource": { + "name": "${datasource}" }, - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "spec": { - "qryType": 1, - "query": "label_values(ma_pg_default_partition_size_bytes{datname=~\"$datname\"},relname)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - } + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "query": "query_result(topk($limit, sum by (relid, datname, relname) (last_over_time(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}[$__range:]))))", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "regex": "", - "regexApplyTo": "value", - "sort": "alphabeticalAsc", - "definition": "label_values(ma_pg_default_partition_size_bytes{datname=~\"$datname\"},relname)", - "options": [], - "multi": true, - "includeAll": true, - "allowCustomValue": false - } + "version": "v0" + }, + "refresh": "onDashboardLoad", + "regex": ".*relname=\"(.*)\".*", + "regexApplyTo": "value", + "skipUrlSync": false, + "sort": "disabled" + } + }, + { + "kind": "QueryVariable", + "spec": { + "allowCustomValue": false, + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "definition": "label_values(ma_pg_default_partition_size_bytes{datname=~\"$datname\"},relname)", + "hide": "dontHide", + "includeAll": true, + "multi": true, + "name": "relname", + "options": [], + "query": { + "datasource": { + "name": "PC3E95692D54ABCC0" + }, + "group": "prometheus", + "kind": "DataQuery", + "spec": { + "qryType": 1, + "query": "label_values(ma_pg_default_partition_size_bytes{datname=~\"$datname\"},relname)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "version": "v0" + }, + "refresh": "onDashboardLoad", + "regex": "", + "regexApplyTo": "value", + "skipUrlSync": false, + "sort": "alphabeticalAsc" } - ] - } + } + ] } \ No newline at end of file From cd92ab14d024b6528b2d412b3c9a5dd4361011cb Mon Sep 17 00:00:00 2001 From: svetychkina Date: Wed, 30 Sep 2026 16:16:30 +0500 Subject: [PATCH 11/13] feat: [CPCAP-12620] update grafana-dashboard.json format --- .../monitoring/grafana-dashboard.json | 19591 +++++++--------- 1 file changed, 8809 insertions(+), 10782 deletions(-) diff --git a/operator/charts/patroni-services/monitoring/grafana-dashboard.json b/operator/charts/patroni-services/monitoring/grafana-dashboard.json index d0cb352a..e39bc471 100644 --- a/operator/charts/patroni-services/monitoring/grafana-dashboard.json +++ b/operator/charts/patroni-services/monitoring/grafana-dashboard.json @@ -1,11297 +1,9321 @@ { - "annotations": [ - { - "kind": "AnnotationQuery", - "spec": { - "builtIn": true, + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", - "query": { - "datasource": { - "name": "grafana" - }, - "group": "grafana", - "kind": "DataQuery", - "spec": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "version": "v0" - } + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" } - } - ], - "cursorSync": "Crosshair", + ] + }, "description": "Metrics for PostgreSQL Cluster", "editable": true, - "elements": { - "panel-1": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "id": 373, + "links": [ + { + "asDropdown": false, + "icon": "external link", + "includeVars": false, + "keepTime": false, + "tags": [ + "Postgres_Performance" + ], + "targetBlank": false, + "title": "PostgreSQL Performance Metrics", + "tooltip": "", + "type": "dashboards", + "url": "" + }, + { + "asDropdown": false, + "icon": "external link", + "includeVars": false, + "keepTime": false, + "tags": [ + "Postgres_Exporter" + ], + "targetBlank": false, + "title": "Postgres Exporter", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], + "panels": [ + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 980, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "index": 2, + "text": "UP" + }, + "6": { + "index": 1, + "text": "DEGRADED" }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "interval": "", - "legendFormat": "{{action}}" + "10": { + "index": 0, + "text": "DOWN" }, - "version": "v0" + "11": { + "color": "dark-green", + "index": 3, + "text": "UP (EXTERNAL)" + } }, - "refId": "D" + "type": "value" } - } - ], - "queryOptions": { - "interval": "$inter" + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 3 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 6 + } + ] + }, + "unit": "none" }, - "transformations": [] - } + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 39 + }, + "id": 10, + "interval": "$inter", + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.13", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "editorMode": "code", + "expr": "sum by () (ma_pg_patroni_cluster_status{namespace=\"$namespace\", cluster=~\"$cluster\"} or ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\", pg_node='External'})", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", + "range": true, + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "PostgreSQL Cluster Status", + "type": "stat" }, - "description": "Shows whether the cluster serves RW requests (select, insert, update, delete) through the endpoint.", - "id": 1, - "links": [], - "title": "Smoke Test", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "percent" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "blue", + "index": 1, + "text": "STANDBY" }, - { - "color": "red", - "value": 80 + "1": { + "index": 0, + "text": "ACTIVE" } - ] - }, - "unit": "short" + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 3 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 6 + } + ] }, - "overrides": [] + "unit": "none" }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 4, + "y": 39 + }, + "id": 1077, + "interval": "$inter", + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.13", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "editorMode": "code", + "expr": "ma_pg_patroni_cluster_active{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", + "range": true, + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] } + ], + "title": "PostgreSQL Cluster Status", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" }, - "version": "9.5.8" - } - } - }, - "panel-10": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "editorMode": "code", - "expr": "sum by () (ma_pg_patroni_cluster_status{namespace=\"$namespace\", cluster=~\"$cluster\"} or ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\", pg_node='External'})", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", - "range": true, - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" + "description": "Postgres server version", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter", - "maxDataPoints": 100 + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "string" }, - "transformations": [] - } + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 2, + "x": 8, + "y": 39 + }, + "id": 1094, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^Value$/", + "values": false + }, + "showPercentChange": false, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.4.13", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "postgres_version{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "format": "table", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "pg_version", + "useBackend": false + } + ], + "title": "Version", + "type": "stat" }, - "description": "", - "id": 10, - "links": [], - "title": "PostgreSQL Cluster Status", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "index": 2, - "text": "UP" - }, - "6": { - "index": 1, - "text": "DEGRADED" - }, - "10": { - "index": 0, - "text": "DOWN" - }, - "11": { - "color": "dark-green", - "index": 3, - "text": "UP (EXTERNAL)" - } + { + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 100, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [ + { + "options": { + "0": { + "color": "#F2495C" }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 0 + "1": { + "color": "#73BF69" }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 3 + "N/A": { + "color": "#CCC" }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 6 + "null": { + "text": "N/A" } - ] + }, + "type": "value" }, - "unit": "none" + { + "options": { + "result": { + "text": "N/A" + } + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] + "unit": "short" }, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 7, + "x": 10, + "y": 39 + }, + "id": 7, + "interval": "$inter", + "options": { + "alignValue": "left", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" } }, - "version": "13.0.6" - } - } - }, - "panel-100": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$7", - "dsType": "influxdb", - "expr": "ma_pg_patroni_replication_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{ hostname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + "pluginVersion": "7.5.10", + "targets": [ + { + "alias": "$4", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.pg_metrics.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Running Nodes (1 = OK)", + "type": "state-timeline" }, - "description": "Shows the difference between the current XLOG location and the data that was sent to recipient.", - "id": 100, - "links": [], - "title": "Sent lag", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows whether metric sources work. If the value is greater than 1, then the source returns error. If the value is zero, then the source is down.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 100, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [ + { + "options": { + "0": { + "color": "#F2495C", + "text": "ERROR" + }, + "1": { + "color": "#73BF69", + "text": "OK" }, - { - "color": "red", - "value": 80 + "7": { + "color": "#FF9830", + "text": "PROBLEM" + }, + "N/A": { + "color": "#CCC" + }, + "null": { + "text": "N/A" } - ] + }, + "type": "value" }, - "unit": "decbytes" + { + "options": { + "result": { + "text": "N/A" + } + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] + "unit": "short" }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 7, + "x": 17, + "y": 39 + }, + "id": 8, + "interval": "$inter", + "options": { + "alignValue": "left", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" } }, - "version": "10.1.5" + "pluginVersion": "7.5.10", + "targets": [ + { + "alias": "$tag_service_name", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_status{namespace=\"$namespace\", cluster=~\"$cluster\"} + 1", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ service_name }}", + "orderByTime": "ASC", + "policy": "default", + "query": "select 1 - ( max(\"value\") / 14 - max(\"value\") % 14 / 14) from /ma.status/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Metric Sources (1 = OK)", + "type": "state-timeline" } - } + ], + "title": "Overview", + "type": "row" }, - "panel-101": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 1021, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 100, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [ + { + "options": { + "0": { + "color": "#F2495C" }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$7", - "dsType": "influxdb", - "expr": "ma_pg_patroni_replication_state_sent_replay_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{ hostname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_replay_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] + "1": { + "color": "#73BF69" }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Shows the difference between the sent XLOG location and applied to the recipient XLOG location.", - "id": 101, - "links": [], - "title": "Sent/Replay lag", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" + "N/A": { + "color": "#CCC" }, - { - "color": "red", - "value": 80 + "null": { + "text": "N/A" } - ] + }, + "type": "value" }, - "unit": "decbytes" + { + "options": { + "result": { + "text": "N/A" + } + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] + "unit": "short" }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 46 + }, + "id": 1023, + "interval": "$inter", + "options": { + "alignValue": "left", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" } }, - "version": "10.1.5" - } - } - }, - "panel-1015": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "exemplar": true, - "expr": "ma_pg_patroni_pg_metrics_archive_mode_prom{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM /pg.$cluster_name.*.archive.mode/ WHERE namespace='$namespace' and $timeFilter", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + "pluginVersion": "7.5.10", + "targets": [ + { + "alias": "$4", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_patroni_status{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - ], - "queryOptions": { - "maxDataPoints": 100 - }, - "transformations": [] - } - }, - "description": "If archive mode is on, then the WAL archive is enabled. Otherwise, the WAL archive is disabled.", - "id": 1015, - "links": [], - "title": "Archive mode", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "text": "Off" - }, - "1": { - "text": "On" - } - }, - "type": "value" + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.patroni_status/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" }, { - "options": { - "match": "null", - "result": { - "text": "Off" - } - }, - "type": "special" + "params": [], + "type": "mean" } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + ] + ], + "tags": [] } - }, - "version": "11.2.1" + ], + "title": "Patroni Members Status (1 = OK)", + "type": "state-timeline" } - } + ], + "title": "Patroni Status", + "type": "row" }, - "panel-1023": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_patroni_status{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.patroni_status/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 981, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows whether the cluster serves RW requests (select, insert, update, delete) through the endpoint.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "percent" + }, + "thresholdsStyle": { + "mode": "off" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "", - "id": 1023, - "links": [], - "title": "Patroni Members Status (1 = OK)", - "vizConfig": { - "group": "state-timeline", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "axisPlacement": "auto", - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#F2495C" - }, - "1": { - "color": "#73BF69" - }, - "N/A": { - "color": "#CCC" - }, - "null": { - "text": "N/A" - } - }, - "type": "value" + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" + ] }, - "overrides": [] + "unit": "short" }, - "options": { - "alignValue": "left", - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - } + "overrides": [] }, - "version": "13.0.6" - } - } - }, - "panel-1077": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "editorMode": "code", - "expr": "ma_pg_patroni_cluster_active{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM /pg.$cluster_name.cluster.status/ WHERE namespace='$namespace' and $timeFilter", - "range": true, - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter", - "maxDataPoints": 100 + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 47 + }, + "id": 1, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true }, - "transformations": [] - } + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.8", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "interval": "", + "legendFormat": "{{action}}", + "refId": "D" + } + ], + "title": "Smoke Test", + "type": "timeseries" }, - "description": "", - "id": 1077, - "links": [], - "title": "PostgreSQL Cluster Status", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "blue", - "index": 1, - "text": "STANDBY" - }, - "1": { - "index": 0, - "text": "ACTIVE" - } - }, - "type": "value" + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows the execution time for a **single** RW request (select, insert, update, delete) through the endpoint.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 3 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 6 - } - ] - }, - "unit": "none" + ] }, - "overrides": [] + "unit": "short" }, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - } + "overrides": [] }, - "version": "13.0.6" - } - } - }, - "panel-1078": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_size_by_database{namespace=\"$namespace\", datname=~\"$datname\"}", - "format": "time_series", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "instant": false, - "interval": "", - "legendFormat": "{{ datname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") / 1024 / 1024 FROM /pg.common.size_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "This graph shows size for all of the logical databases in PostgreSQL cluster.", - "id": 1078, - "links": [], - "title": "Size by database", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "MiB", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bits" - }, - "overrides": [] + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 47 + }, + "id": 16, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true }, - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "13.0.6" - } - } - }, - "panel-1079": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "exemplar": true, - "expr": "count by (datname) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"})", - "interval": "", - "legendFormat": "{{ datname }}", - "range": true - }, - "version": "v0" - }, - "refId": "A" + "pluginVersion": "9.5.8", + "targets": [ + { + "alias": "delete", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - ], - "queryOptions": {}, - "transformations": [] - } + ], + "hide": false, + "interval": "", + "legendFormat": "{{action}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Smoke Tests Timings", + "type": "timeseries" }, - "description": "This graph shows number of table in each of the logical databases.", - "id": 1079, - "links": [], - "title": "Number of Tables", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows whether monitoring is able to connect to PostgreSQL through the endpoint.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "options": { - "annotations": { - "clustering": -1, - "multiLane": false + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 47 + }, + "id": 15, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "13.0.6" + "pluginVersion": "9.5.8", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_pg_endpoints_cluster_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Leader", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Endpoint Cluster Status (1 = Running)", + "type": "timeseries" } - } + ], + "title": "Smoke test", + "type": "row" }, - "panel-1081": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_connection_count_stat_max_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "stat max connections", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.connection_count_stat.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "range": true, - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 982, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows CPU consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Cores", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "expr": "ma_pg_connection_count_stat_reserved_for_reg_users{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "reserved for reg_users", - "range": true - }, - "version": "v0" + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "refId": "B" - } + { + "color": "red", + "value": 80 + } + ] }, + "unit": "short" + }, + "overrides": [ { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "expr": "ma_pg_connection_count_stat_reserved_for_superuser{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "reserved for superuser", - "range": true - }, - "version": "v0" + "matcher": { + "id": "byName", + "options": "limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } }, - "refId": "C" - } + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.lineWidth", + "value": 2 + } + ] }, { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "expr": "ma_pg_connection_count_stat_used{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "used", - "range": true - }, - "version": "v0" - }, - "refId": "D" - } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Shows how many connections are in use right now. It shows max connections, used connections, reserved for regular, and superuser.", - "id": 1081, - "links": [], - "title": "Overall connection statistic", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + "matcher": { + "id": "byName", + "options": "request" }, - "unit": "short" + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#EF843C", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "right", - "showLegend": false, - "width": 250 - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - } - }, - "version": "10.2.3" - } - } - }, - "panel-1082": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_connection_by_database{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "instant": false, - "interval": "", - "legendFormat": "{{ datname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" + "matcher": { + "id": "byRegexp", + "options": "/^usage/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#7EB26D", + "mode": "fixed" + } }, - "refId": "A" - } + { + "id": "custom.fillOpacity", + "value": 20 + } + ] } - ], - "queryOptions": { - "interval": "$inter" + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 20, + "interval": "$inter", + "links": [ + { + "targetBlank": true, + "title": "Kubernetes Pods", + "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables" + } + ], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true }, - "transformations": [] - } - }, - "description": "Shows the number of connections per database.", - "id": 1082, - "links": [], - "title": "Connection by database", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.8", + "repeat": "namespace_pods", + "repeatDirection": "h", + "targets": [ + { + "alias": "usage", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "sum(rate(container_cpu_usage_seconds_total{image!=\"\", container!=\"POD\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}[2m])) by (pod_name, container)", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" }, - "unit": "short" - }, - "overrides": [ { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "displayName", - "value": "Limits" - } - ] + "params": [ + "container" + ], + "type": "tag" }, { - "matcher": { - "id": "byName", - "options": "Limits" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] + "params": [ + "null" + ], + "type": "fill" } - ] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "width": 200 - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - } - }, - "version": "10.2.3" - } - } - }, - "panel-1083": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "editorMode": "code", - "expr": "ma_pg_connection_by_role{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "instant": false, - "interval": "", - "legendFormat": "{{ usename }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Shows the number of connections per role.", - "id": 1083, - "links": [], - "title": "Connection by role", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "list", - "placement": "right", - "showLegend": false, - "width": 200 - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - } - }, - "version": "10.2.3" - } - } - }, - "panel-1084": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "editorMode": "code", - "expr": "ma_pg_count_not_idle{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{ datname }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.common.count_not_idle.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", - "range": true, - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Shows the number of not idle connections per database.", - "id": 1084, - "links": [], - "title": "Not idle connections by Database", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "right", - "showLegend": false, - "width": 200 - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - } - }, - "version": "10.2.3" - } - } - }, - "panel-1085": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "last_over_time(ma_pg_connection_by_role_with_limit{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}[$__range:])", - "format": "table", - "groupBy": [ - { - "params": [ - "queryid" - ], - "type": "tag" - } - ], - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Connections", - "measurement": "ma.pg.common.queries_stat", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", - "rawQuery": true, - "resultFormat": "table", - "select": [ - [ - { - "params": [ - "mean_time" - ], - "type": "field" - }, - { - "params": [ - "30" - ], - "type": "top" - } - ], - [ - { - "params": [ - "calls" - ], - "type": "field" - } - ], - [ - { - "params": [ - "short_query" - ], - "type": "field" - } - ], - [ - { - "params": [ - "datname" - ], - "type": "field" - } - ], - [ - { - "params": [ - "total_time" - ], - "type": "field" - } - ] - ], - "tags": [] - }, - "version": "v0" + ], + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "usage", + "measurement": "cpu/usage_rate", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM \"cpu/usage_rate\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" }, - "refId": "A" - } - } - ], - "queryOptions": {}, - "transformations": [ - { - "group": "organize", - "kind": "Transformation", - "spec": { - "options": { - "excludeByName": { - "Time": true, - "Value": false, - "__name__": true, - "endpoint": true, - "exported_namespace": true, - "host": true, - "instance": true, - "job": true, - "metric_name": true, - "name": true, - "namespace": true, - "pod": true, - "relid": true, - "service": true, - "short_query": false - }, - "indexByName": { - "Time": 1, - "Value": 12, - "__name__": 2, - "endpoint": 3, - "exported_namespace": 4, - "host": 5, - "instance": 6, - "job": 7, - "limit": 13, - "name": 8, - "namespace": 9, - "pod": 10, - "service": 11, - "usename": 0 - }, - "renameByName": { - "Value": "Connections", - "datname": "Database Name", - "idx_size": "Index Size", - "limit": "Connections Limit", - "name": "", - "namespace": "", - "not_idle_cnt": "Not Idle Connections", - "queryid": "Query Id", - "relname": "Relation Name", - "short_query": "", - "tot_size": "Total Size", - "usename": "Role" - } + { + "params": [], + "type": "sum" } - } - } - ] - } - }, - "description": "This table shows number of Active Connections in current moment by role. Also shows Connection Limits that is set during Role create. Also, shows not idle connection by role.", - "id": 1085, - "links": [], - "title": "Number of Active Connections by Role", - "vizConfig": { - "group": "table", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Not Idle Connections" - }, - "properties": [ - { - "id": "mappings", - "value": [ - { - "options": { - "None": { - "text": "0" - } - }, - "type": "value" - } - ] - } - ] + ] + ], + "tags": [ + { + "key": "type", + "operator": "=", + "value": "pod_container" }, { - "matcher": { - "id": "byName", - "options": "Role" - }, - "properties": [ - { - "id": "custom.width", - "value": 358 - } - ] + "condition": "AND", + "key": "namespace_name", + "operator": "=~", + "value": "/$namespace$/" + }, + { + "condition": "AND", + "key": "pod_name", + "operator": "=~", + "value": "/$podname$/" } ] }, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [] + { + "datasource": { + "uid": "$datasource" + }, + "expr": "kube_pod_container_resource_limits_cpu_cores{exported_namespace=\"$namespace\", exported_pod=\"$namespace_pods\", cluster=~\"$cluster\"}", + "hide": false, + "interval": "", + "legendFormat": "limit", + "refId": "B" } - }, - "version": "11.2.1" + ], + "title": "CPU Usage: $namespace_pods", + "type": "timeseries" } - } + ], + "title": "CPU Usage", + "type": "row" }, - "panel-1087": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "groupBy": [ - { - "params": [ - "queryid" - ], - "type": "tag" - } - ], - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "measurement": "ma.pg.common.queries_stat", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", - "rawQuery": true, - "resultFormat": "table", - "select": [ - [ - { - "params": [ - "mean_time" - ], - "type": "field" - }, - { - "params": [ - "30" - ], - "type": "top" - } - ], - [ - { - "params": [ - "calls" - ], - "type": "field" - } - ], - [ - { - "params": [ - "short_query" - ], - "type": "field" - } - ], - [ - { - "params": [ - "datname" - ], - "type": "field" - } - ], - [ - { - "params": [ - "total_time" - ], - "type": "field" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 983, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows memory consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Memory", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false - }, - "version": "v0" + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "refId": "B" - } + { + "color": "red", + "value": 80 + } + ] }, + "unit": "bytes" + }, + "overrides": [ { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_tot_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false - }, - "version": "v0" + "matcher": { + "id": "byRegexp", + "options": "/^limit/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } }, - "refId": "C" - } + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.lineWidth", + "value": 2 + } + ] }, { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "sum by (relid, relname, datname, selector) (ma_pg_idx_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false - }, - "version": "v0" + "matcher": { + "id": "byRegexp", + "options": "/^request/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#EF843C", + "mode": "fixed" + } }, - "refId": "D" - } - } - ], - "queryOptions": {}, - "transformations": [ - { - "group": "merge", - "kind": "Transformation", - "spec": { - "options": {} - } + { + "id": "custom.fillOpacity", + "value": 0 + } + ] }, { - "group": "filterFieldsByName", - "kind": "Transformation", - "spec": { - "options": { - "include": { - "names": [ - "datname", - "relid", - "relname", - "selector", - "Value #A", - "Value #B", - "Value #C", - "Value #D" - ] + "matcher": { + "id": "byRegexp", + "options": "/^usage/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#7EB26D", + "mode": "fixed" } } - } + ] }, { - "group": "organize", - "kind": "Transformation", - "spec": { - "options": { - "excludeByName": { - "Value": false, - "Value #A": false, - "__name__": true, - "endpoint": true, - "exported_namespace": true, - "host": true, - "instance": true, - "job": true, - "metric_name": true, - "name": true, - "namespace": true, - "pod": true, - "relid": true, - "service": true, - "short_query": false - }, - "indexByName": { - "Value #A": 7, - "Value #B": 4, - "Value #C": 5, - "Value #D": 6, - "datname": 0, - "relid": 1, - "relname": 2, - "selector": 3 - }, - "renameByName": { - "Value": "VALUE", - "Value #A": "Table Size", - "Value #B": "Estimated Number Of Tuples", - "Value #C": "Total Size", - "Value #D": "Index Size", - "datname": "Database Name", - "idx_size": "Index Size", - "live_tuples": "Estimated Number Of Tuples", - "name": "", - "namespace": "", - "pod_name": "", - "queryid": "Query Id", - "relname": "Relation Name", - "service_name": "", - "short_query": "", - "tot_size": "Total Size" + "matcher": { + "id": "byRegexp", + "options": "/^working set/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#6ED0E0", + "mode": "fixed" } } - } + ] } ] - } - }, - "description": "The table shows TOP tables filtered by the selected database name.", - "id": 1087, - "links": [], - "title": "TOP $limit tables by size", - "vizConfig": { - "group": "table", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "footer": { - "reducers": [] - }, - "inspect": false - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 22, + "interval": "$inter", + "links": [ + { + "targetBlank": true, + "title": "Kubernetes Pods", + "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables" + } + ], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.8", + "repeat": "namespace_pods", + "repeatDirection": "h", + "targets": [ + { + "alias": "usage", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", + "groupBy": [ { - "matcher": { - "id": "byName", - "options": "Table Size" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] + "params": [ + "$interval" + ], + "type": "time" }, { - "matcher": { - "id": "byName", - "options": "Total Size" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] + "params": [ + "container_name" + ], + "type": "tag" }, { - "matcher": { - "id": "byName", - "options": "Index Size" + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Working Set", + "measurement": "memory/usage", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT max(\"value\") FROM \"memory/usage\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ + { + "key": "type", + "operator": "=", + "value": "pod_container" + }, + { + "condition": "AND", + "key": "namespace_name", + "operator": "=~", + "value": "/$namespace$/" + }, + { + "condition": "AND", + "key": "pod_name", + "operator": "=~", + "value": "/$podname$/" } ] }, - "options": { - "cellHeight": "sm", - "showHeader": true, - "sortBy": [ + { + "alias": "working set", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "sum(container_spec_memory_limit_bytes{image!=\"\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}) by (pod_name)", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "container_name" + ], + "type": "tag" + }, { - "desc": true, - "displayName": "Table Size" + "params": [ + "null" + ], + "type": "fill" } - ] - } - }, - "version": "13.0.6" - } - } - }, - "panel-1088": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "topk($table_limit, sort_desc(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", - "instant": false, - "interval": "", - "legendFormat": "{{ datname }}/{{ relname }}", - "range": true - }, - "version": "v0" + ], + "interval": "", + "legendFormat": "limits", + "measurement": "memory/usage", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT max(\"value\") FROM \"memory/working_set\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", + "rawQuery": true, + "refId": "G", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" }, - "refId": "A" - } - } - ], - "queryOptions": {}, - "transformations": [] - } - }, - "description": "This Graph Shows size of the each table in all of the databases", - "id": 1088, - "links": [], - "title": "Size by tables", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [ { - "matcher": { - "id": "byName", - "options": "Value" - }, - "properties": [ - { - "id": "unit", - "value": "bytes" - } - ] + "key": "type", + "operator": "=", + "value": "pod_container" + }, + { + "condition": "AND", + "key": "namespace_name", + "operator": "=~", + "value": "/$namespace$/" + }, + { + "condition": "AND", + "key": "pod_name", + "operator": "=~", + "value": "/$podname$/" } ] }, - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true, - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", + "interval": "", + "legendFormat": "Memory Usage", + "refId": "B" + }, + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(container_memory_cache{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", + "interval": "", + "legendFormat": "Memory Cache", + "refId": "C" } - }, - "version": "13.0.6" + ], + "title": "Memory Usage: $namespace_pods", + "type": "timeseries" } - } + ], + "title": "Memory Usage", + "type": "row" }, - "panel-1089": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 1101, + "panels": [], + "title": "PG Large Object Stats", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" + }, + "description": "Shows objects and chunks count for PG Large Objects.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "exemplar": true, - "expr": "topk($table_limit, sort_desc(ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", - "interval": "", - "legendFormat": "{{datname}}/{{ relname }}", - "range": true - }, - "version": "v0" - }, - "refId": "A" - } + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 } - ], - "queryOptions": {}, - "transformations": [] + ] } }, - "description": "This graphs shows estimated number of rows in all of the tables, using `pg_stat_all_tables` system view.", - "id": 1089, - "links": [], - "title": "Estimated Number of Rows per Table", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [ - "max", - "last" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Last", - "sortDesc": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - } + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 1100, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" }, - "version": "13.0.6" + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_large_object_object_count{namespace=~\"$namespace\", datname=~\"$datname\"}", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "{{datname}}", + "range": true, + "refId": "B", + "useBackend": false } - } + ], + "title": "Large Objects Count", + "type": "timeseries" }, - "panel-1090": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "last_over_time(topk($limit,sort_desc(ma_pg_queries_stat{namespace=\"$namespace\", metric_name=\"$column\", datname=~\"$datname\", cluster=~\"$cluster\"}))[$__range:])", - "format": "table", - "groupBy": [ - { - "params": [ - "queryid" - ], - "type": "tag" - } - ], - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "measurement": "ma.pg.common.queries_stat", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", - "rawQuery": true, - "resultFormat": "table", - "select": [ - [ - { - "params": [ - "mean_time" - ], - "type": "field" - }, - { - "params": [ - "30" - ], - "type": "top" - } - ], - [ - { - "params": [ - "calls" - ], - "type": "field" - } - ], - [ - { - "params": [ - "short_query" - ], - "type": "field" - } - ], - [ - { - "params": [ - "datname" - ], - "type": "field" - } - ], - [ - { - "params": [ - "total_time" - ], - "type": "field" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": {}, - "transformations": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" + }, + "description": "Shows total size of PG Large objects in bytes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Size in bytes", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" + } + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "group": "organize", - "kind": "Transformation", - "spec": { - "options": { - "excludeByName": { - "Value": false, - "__name__": true, - "endpoint": true, - "exported_namespace": true, - "host": true, - "instance": true, - "job": true, - "metric_name": true, - "name": true, - "namespace": true, - "pod": true, - "service": true, - "short_query": false - }, - "indexByName": { - "Time": 0, - "Value": 1, - "__name__": 2, - "endpoint": 4, - "exported_namespace": 5, - "host": 6, - "instance": 7, - "job": 8, - "metric_name": 14, - "name": 9, - "namespace": 10, - "pod": 11, - "queryid": 12, - "service": 13, - "short_query": 3 - }, - "renameByName": { - "Value": "VALUE", - "datname": "Database Name", - "name": "", - "queryid": "Query Id", - "rolname": "Role Name", - "short_query": "" - } - } - } + "color": "green", + "value": null }, { - "group": "seriesToColumns", - "kind": "Transformation", - "spec": { - "options": { - "byField": "Short Query" - } - } + "color": "red", + "value": 80 } ] } }, - "description": "The table shows TOP queries filtered by the selected column and database name. For queries statistics `pg_stat_statements` view used. More info about columns could be find in official docs.\n\nAlso, it is possible to reset the statistics, by calling `pg_stat_statements_reset()` function.", - "id": 1090, - "links": [], - "title": "TOP $limit queries by $column", - "vizConfig": { - "group": "table", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "footer": { - "reducers": [] - }, - "inspect": false - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 1102, + "options": { + "legend": { + "calcs": [ + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" + }, + "disableTextWrap": false, + "editorMode": "builder", + "exemplar": false, + "expr": "ma_pg_large_object_total_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\"}", + "format": "time_series", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "interval": "", + "legendFormat": "{{datname}}", + "range": true, + "refId": "B", + "useBackend": false + } + ], + "title": "Size of large objects", + "type": "timeseries" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 14 + }, + "id": 984, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Shows the number of connections to PostgreSQL pods.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "VALUE" - }, - "properties": [ - { - "id": "displayName", - "value": "$column" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "short_query" - }, - "properties": [ - { - "id": "displayName", - "value": "Short Query" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Short Query" + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "properties": [ - { - "id": "custom.width", - "value": 633 - } - ] + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "B" }, - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "custom.width", - "value": 219 - } - ] + "properties": [ + { + "id": "displayName", + "value": "Limits" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limits" }, - { - "matcher": { - "id": "byName", - "options": "calls" - }, - "properties": [ - { - "id": "custom.width", - "value": 165 + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" } - ] - }, + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 56 + }, + "id": 6, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.8", + "targets": [ + { + "alias": "$4", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_current_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ { - "matcher": { - "id": "byName", - "options": "Query Id" - }, - "properties": [ - { - "id": "custom.width", - "value": 322 - } - ] + "params": [ + "$interval" + ], + "type": "time" }, { - "matcher": { - "id": "byName", - "options": "Database Name" - }, - "properties": [ - { - "id": "custom.width", - "value": 346 - } - ] + "params": [ + "null" + ], + "type": "fill" } - ] + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*\\.current_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] }, - "options": { - "cellHeight": "sm", - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Database Name" - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "builder", + "expr": "ma_pg_metrics_postgres_max_connections{namespace=\"$namespace\"}", + "format": "table", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" } - }, - "version": "13.0.6" - } - } - }, - "panel-1092": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "${datasource}" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "code", - "exemplar": false, - "expr": "sum by (datname, db_namespace, microservice, tenant_id) (last_over_time(ma_pg_dbaas{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__range:]))", - "format": "table", - "instant": true, - "legendFormat": "__auto", - "range": false - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": {}, - "transformations": [] - } + ], + "title": "Current Connections", + "type": "timeseries" }, - "description": "", - "id": 1092, - "links": [], - "title": "DbaaS Mappings", - "vizConfig": { - "group": "table", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": true, - "inspect": false - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows the number of replication connections to PostgreSQL pods.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time" + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 56 + }, + "id": 11, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.8", + "targets": [ + { + "alias": "$4", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_replication_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" }, { - "matcher": { - "id": "byName", - "options": "Value" + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*pg_metrics\\.replication_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Replication Connections", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "Estimated value for transactions per second. Calculated as transaction amount for last 30 seconds divided by 30.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - ] - }, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": [ - "sum" - ], - "show": false }, - "showHeader": true, - "sortBy": [ + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 56 + }, + "id": 14, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.8", + "targets": [ + { + "alias": "$4", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "sum(irate(ma_pg_metrics_xact_sum{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__rate_interval]))", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, { - "desc": true, - "displayName": "microservice" + "params": [ + "null" + ], + "type": "fill" } - ] + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT non_negative_derivative(mean(\"value\"), 1s) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xact_sum/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] } - }, - "version": "11.2.1" + ], + "title": "TPS", + "type": "timeseries" } - } + ], + "title": "Network", + "type": "row" }, - "panel-1094": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "disableTextWrap": false, - "editorMode": "code", - "expr": "postgres_version{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "format": "table", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "__auto", - "range": true, - "useBackend": false - }, - "version": "v0" - }, - "refId": "pg_version" + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 985, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows disk usage for PostgreSQL pods.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - } - ], - "queryOptions": {}, - "transformations": [] - } - }, - "description": "Postgres server version", - "id": 1094, - "links": [], - "title": "Version", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "string" }, - "overrides": [] - }, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^Value$/", - "values": false + "links": [], + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 3, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } }, - "version": "13.0.6" - } - } - }, - "panel-1095": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_active_temp_writes{namespace=~\"$namespace\", datname=~\"$datname\", usename=~\"$usename\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "useBackend": false - }, - "version": "v0" - }, - "refId": "A" + "pluginVersion": "11.5.2", + "targets": [ + { + "alias": "$4", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_metrics_df_pcent{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - ], - "queryOptions": {}, - "transformations": [] - } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.metrics\\.df\\.pcent/ WHERE namespace='$namespace' and $timeFilter group by service_name", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Disk Usage Percentage", + "type": "timeseries" }, - "description": "", - "id": 1095, - "links": [], - "title": "Active Temp Writes", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Queries Count", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Shows usage by well-known consumers, such as pg_xlog or base directories.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "ma_pg_patroni_metrics_du_base" + }, + "properties": [ + { + "id": "unit", + "value": "deckbytes" + } + ] } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 44 + }, + "id": 901, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "11.5.2" + "pluginVersion": "10.3.3", + "repeat": "short_container_name", + "repeatDirection": "h", + "targets": [ + { + "alias": "$7", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_patroni_metrics_du_base{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.$short_container_name\\.metrics\\.du\\.(.?)/ WHERE namespace='$namespace' and $timeFilter group by service_name", + "range": true, + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Disk Usage", + "type": "timeseries" } - } + ], + "title": "Disk space", + "type": "row" }, - "panel-1097": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_temp_file_count_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "useBackend": false - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": {}, - "transformations": [] - } - }, - "description": "", - "id": 1097, - "links": [], - "title": "Temporary Files Count By Database", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Temp Files Count", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 16 + }, + "id": 986, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows current DB count in PostgreSQL pods.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 17 + }, + "id": 5, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } }, - "version": "11.5.2" - } - } - }, - "panel-1098": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_temp_file_size_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "useBackend": false - }, - "version": "v0" - }, - "refId": "A" + "pluginVersion": "11.5.2", + "targets": [ + { + "alias": "$4", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_db_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - ], - "queryOptions": {}, - "transformations": [] - } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.db_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "DataBases Count", + "type": "timeseries" }, - "description": "", - "id": 1098, - "links": [], - "title": "Temporary Files Size By Database", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Temp File Size", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows current XLOG location. This value is correlated with the transaction count, or the number of changes made to the database.\nThe master and replica should have the same value, with a short period while the replica catches up to the master. \nThe value on the replica can be slightly less than the master's, but should increase over time.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 17 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } }, - "version": "11.5.2" + "pluginVersion": "11.5.2", + "targets": [ + { + "alias": "$4", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_xlog_location{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "select /value/ from /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xlog_location/ where namespace = '$namespace' and $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "XLOG Location", + "type": "timeseries" } - } + ], + "title": "Data handing", + "type": "row" }, - "panel-1099": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_temp_file_size_by_query{namespace=~\"$namespace\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": true, - "legendFormat": "__auto", - "range": true, - "useBackend": false - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": {}, - "transformations": [] - } - }, - "description": "", - "id": 1099, - "links": [], - "title": "Temporary Files Size By Query", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Temp File Size", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 987, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "description": "Number of locks from pg_locks view.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 18 + }, + "id": 12, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } }, - "version": "11.5.2" - } - } - }, - "panel-11": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_replication_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*pg_metrics\\.replication_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + "pluginVersion": "11.5.2", + "targets": [ + { + "alias": "$4", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_locks{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks$/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Locks", + "type": "timeseries" }, - "description": "Shows the number of replication connections to PostgreSQL pods.", - "id": 11, - "links": [], - "title": "Replication Connections", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" + { + "datasource": { + "uid": "$datasource" + }, + "description": "Number of locks from pg_locks view that are not granted.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 13, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "min", + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } }, - "version": "9.5.8" + "pluginVersion": "11.5.2", + "targets": [ + { + "alias": "$4", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_metrics_locks_not_granted{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{pg_node}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks_not_granted/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Locks not granted", + "type": "timeseries" } - } + ], + "title": "Locks", + "type": "row" }, - "panel-1100": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "expr": "ma_pg_large_object_object_count{namespace=~\"$namespace\", datname=~\"$datname\"}", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": false, - "legendFormat": "{{datname}}", - "range": true, - "useBackend": false - }, - "version": "v0" - }, - "refId": "B" - } - } - ], - "queryOptions": {}, - "transformations": [] - } - }, - "description": "Shows objects and chunks count for PG Large Objects.", - "id": 1100, - "links": [], - "title": "Large Objects Count", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Count", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "fieldMinMax": false, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 988, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "description": "This like the \"Smoke test\" section, with one difference - this section executes smoketests directly on the master pod.\nThe difference in execution allows distinguishing between cases of master unavailability and endpoint failure.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 12, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "always", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "percent" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "options": { - "annotations": { - "clustering": -1, - "multiLane": false + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 60 + }, + "id": 17, + "interval": "$inter", + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "13.0.6" - } - } - }, - "panel-1102": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "disableTextWrap": false, - "editorMode": "builder", - "exemplar": false, - "expr": "ma_pg_large_object_total_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\"}", - "format": "time_series", - "fullMetaSearch": false, - "includeNullMetadata": true, - "instant": false, - "interval": "", - "legendFormat": "{{datname}}", - "range": true, - "useBackend": false - }, - "version": "v0" - }, - "refId": "B" + "pluginVersion": "9.5.5", + "targets": [ + { + "alias": "delete", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - ], - "queryOptions": {}, - "transformations": [] - } + ], + "interval": "", + "legendFormat": "{{action}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.*.smoketest.delete.*check$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Smoke Test", + "type": "timeseries" }, - "description": "Shows total size of PG Large objects in bytes.", - "id": 1102, - "links": [], - "title": "Size of large objects", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Size in bytes", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "fieldMinMax": false, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] + { + "datasource": { + "uid": "$datasource" + }, + "description": "This like the \"Smoke test\" section, with one difference - this section executes smoketests directly on the master pod.\n The difference in execution allows distinguishing between cases of master unavailability and endpoint failure.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - "overrides": [] - }, - "options": { - "annotations": { - "clustering": -1, - "multiLane": false + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "legend": { - "calcs": [ - "last" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 60 + }, + "id": 18, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "13.0.6" + "pluginVersion": "9.5.5", + "targets": [ + { + "alias": "$6", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{action}}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Smoke Tests Timings", + "type": "timeseries" } - } + ], + "title": "Master Smoke Test", + "type": "row" }, - "panel-1103": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "${datasource}" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "builder", - "expr": "sum by(relname, datname) (ma_pg_default_partition_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\", relname=~\"$relname\", cluster=~\"$cluster\"})", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "{{datname}}/{{ relname }}", - "range": true - }, - "version": "v0" - }, - "refId": "B" + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 989, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows the size of the last backup.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - } - ], - "queryOptions": {}, - "transformations": [] - } - }, - "description": "", - "id": 1103, - "links": [], - "title": "Default Partition Size (bytes)", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "green", - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "hue", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "options": { - "annotations": { - "clustering": -1, - "multiLane": false }, - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "showLegend": true + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 61 + }, + "id": 31, + "interval": "$inter", + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "13.0.6" - } - } - }, - "panel-1104": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "${datasource}" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "builder", - "expr": "sum by(relname, datname) (ma_pg_default_partition_row_count{relname=~\"$relname\", datname=~\"$datname\", cluster=~\"$cluster\", namespace=\"$namespace\"})", - "legendFormat": "{{datname}}/{{ relname }}", - "range": true - }, - "version": "v0" - }, - "refId": "A" + "pluginVersion": "9.0.7", + "targets": [ + { + "alias": "", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_storage_last_metrics_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - ], - "queryOptions": {}, - "transformations": [] - } - }, - "description": "", - "id": 1104, - "links": [], - "title": "Default Partition Row count", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "green", - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 100, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + ], + "interval": "", + "legendFormat": "Size", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM \"ma.storage.last.metrics.size\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] } + ], + "title": "Backup Last Version Size", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" }, - "version": "13.0.6" - } - } - }, - "panel-12": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_locks{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks$/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + "description": "Shows the space occupied by backups and the remaining amount of space. \nNot all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Number of locks from pg_locks view.", - "id": 12, - "links": [], - "title": "Locks", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - } - }, - "version": "11.5.2" - } - } - }, - "panel-13": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_locks_not_granted{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.locks_not_granted/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Number of locks from pg_locks view that are not granted.", - "id": 13, - "links": [], - "title": "Locks not granted", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] + "unit": "decbytes" }, - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - } - }, - "version": "11.5.2" - } - } - }, - "panel-14": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ + "overrides": [ { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "sum(irate(ma_pg_metrics_xact_sum{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__rate_interval]))", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT non_negative_derivative(mean(\"value\"), 1s) FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xact_sum/ WHERE namespace='$namespace' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Estimated value for transactions per second. Calculated as transaction amount for last 30 seconds divided by 30.", - "id": 14, - "links": [], - "title": "TPS", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + "matcher": { + "id": "byName", + "options": "Total Volume Space" }, - "unit": "short" - }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - } - }, - "version": "9.5.8" - } - } - }, - "panel-15": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "expr": "ma_pg_endpoints_cluster_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Leader", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" + "matcher": { + "id": "byName", + "options": "Space Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#629E51", + "mode": "fixed" + } }, - "refId": "A" - } + { + "id": "custom.fillOpacity", + "value": 20 + } + ] } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Shows whether monitoring is able to connect to PostgreSQL through the endpoint.", - "id": 15, - "links": [], - "title": "Endpoint Cluster Status (1 = Running)", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] + ] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 61 + }, + "id": 32, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "9.5.8" - } - } - }, - "panel-16": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "delete", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{action}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg.$cluster_name.endpoints.cluster.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + "pluginVersion": "9.0.7", + "targets": [ + { + "alias": "Space Used", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_storage_total_space{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - ], - "queryOptions": { - "interval": "$inter" + ], + "interval": "", + "legendFormat": "Total Space", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /storage\\.size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] }, - "transformations": [] - } - }, - "description": "Shows the execution time for a **single** RW request (select, insert, update, delete) through the endpoint.", - "id": 16, - "links": [], - "title": "Smoke Tests Timings", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + { + "alias": "Total Volume Space", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_storage_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" }, - "unit": "short" - }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [ - "min", - "max", - "mean", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Storage Size", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /storage\\.total_space/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] } + ], + "title": "Storage Size/Free Space", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" }, - "version": "9.5.8" - } - } - }, - "panel-17": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "delete", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_check{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{action}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.*.smoketest.delete.*check$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + "description": "Shows time spent on last backup.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "This like the \"Smoke test\" section, with one difference - this section executes smoketests directly on the master pod.\nThe difference in execution allows distinguishing between cases of master unavailability and endpoint failure.", - "id": 17, - "links": [], - "title": "Smoke Test", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 12, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "always", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "percent" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - } - }, - "version": "9.5.5" - } - } - }, - "panel-18": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$6", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_endpoints_cluster_smoketest_time_ms{namespace=\"$namespace\", cluster=~\"$cluster\"} ", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{action}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.smoketest.delete.*time_ms$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "This like the \"Smoke test\" section, with one difference - this section executes smoketests directly on the master pod.\n The difference in execution allows distinguishing between cases of master unavailability and endpoint failure.", - "id": 18, - "links": [], - "title": "Smoke Tests Timings", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] + "unit": "ms" }, - "options": { - "legend": { - "calcs": [ - "min", - "max", - "mean", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - } + "overrides": [] }, - "version": "9.5.5" - } - } - }, - "panel-19": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_xlog_location{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "select /value/ from /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.xlog_location/ where namespace = '$namespace' and $timeFilter", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": {}, - "transformations": [] - } - }, - "description": "Shows current XLOG location. This value is correlated with the transaction count, or the number of changes made to the database.\nThe master and replica should have the same value, with a short period while the replica catches up to the master. \nThe value on the replica can be slightly less than the master's, but should increase over time.", - "id": 19, - "links": [], - "title": "XLOG Location", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 61 + }, + "id": 33, + "interval": "$inter", + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "11.5.2" - } - } - }, - "panel-20": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "usage", - "dsType": "influxdb", - "expr": "sum(rate(container_cpu_usage_seconds_total{image!=\"\", container!=\"POD\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}[2m])) by (pod_name, container)", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "container" - ], - "type": "tag" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "instant": false, - "interval": "", - "legendFormat": "usage", - "measurement": "cpu/usage_rate", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM \"cpu/usage_rate\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "sum" - } - ] - ], - "tags": [ - { - "key": "type", - "operator": "=", - "value": "pod_container" - }, - { - "condition": "AND", - "key": "namespace_name", - "operator": "=~", - "value": "/$namespace$/" - }, - { - "condition": "AND", - "key": "pod_name", - "operator": "=~", - "value": "/$podname$/" - } - ] - }, - "version": "v0" - }, - "refId": "A" - } - }, - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "expr": "kube_pod_container_resource_limits_cpu_cores{exported_namespace=\"$namespace\", exported_pod=\"$namespace_pods\", cluster=~\"$cluster\"}", - "interval": "", - "legendFormat": "limit" - }, - "version": "v0" - }, - "refId": "B" - } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Shows CPU consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", - "id": 20, - "links": [ - { - "targetBlank": true, - "title": "Kubernetes Pods", - "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables" - } - ], - "title": "CPU Usage: $namespace_pods", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Cores", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "limit" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.lineWidth", - "value": 2 - } - ] - }, + "pluginVersion": "9.0.7", + "targets": [ + { + "alias": "Time Spent on Each Backup", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_storage_lastSuccessful_metrics_spent_time{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ { - "matcher": { - "id": "byName", - "options": "request" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EF843C", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - } - ] + "params": [ + "$__interval" + ], + "type": "time" }, { - "matcher": { - "id": "byRegexp", - "options": "/^usage/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#7EB26D", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 20 - } - ] + "params": [ + "null" + ], + "type": "fill" } - ] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + ], + "interval": "", + "legendFormat": "Time Spent", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /storage\\.lastSuccessful\\.metrics\\.spent_time/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] } + ], + "title": "Time Spent on Backup", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" }, - "version": "9.5.8" - } - } - }, - "panel-22": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "usage", - "dsType": "influxdb", - "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "container_name" - ], - "type": "tag" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Working Set", - "measurement": "memory/usage", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT max(\"value\") FROM \"memory/usage\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "sum" - } - ] - ], - "tags": [ - { - "key": "type", - "operator": "=", - "value": "pod_container" - }, - { - "condition": "AND", - "key": "namespace_name", - "operator": "=~", - "value": "/$namespace$/" - }, - { - "condition": "AND", - "key": "pod_name", - "operator": "=~", - "value": "/$podname$/" - } - ] - }, - "version": "v0" - }, - "refId": "A" + "description": "Shows the changes of activity status on the chart.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "working set", - "dsType": "influxdb", - "expr": "sum(container_spec_memory_limit_bytes{image!=\"\", namespace=\"$namespace\", pod=\"$namespace_pods\", cluster=~\"$cluster\"}) by (pod_name)", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "container_name" - ], - "type": "tag" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "limits", - "measurement": "memory/usage", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT max(\"value\") FROM \"memory/working_set\" WHERE \"type\" = 'pod_container' AND \"namespace_name\" = '$namespace' AND \"container_name\" = '$container_name' AND $timeFilter GROUP BY time($interval), pod_name fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "sum" - } - ] - ], - "tags": [ - { - "key": "type", - "operator": "=", - "value": "pod_container" - }, - { - "condition": "AND", - "key": "namespace_name", - "operator": "=~", - "value": "/$namespace$/" - }, - { - "condition": "AND", - "key": "pod_name", - "operator": "=~", - "value": "/$podname$/" - } - ] - }, - "version": "v0" - }, - "refId": "G" - } - }, - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", - "interval": "", - "legendFormat": "Memory Usage" - }, - "version": "v0" + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "refId": "B" - } + { + "color": "red", + "value": 80 + } + ] }, - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "expr": "sum(container_memory_cache{namespace=\"$namespace\", pod=\"$namespace_pods\", image!=\"\", container!=\"POD\", cluster=~\"$cluster\"}) by (pod_name)", - "interval": "", - "legendFormat": "Memory Cache" - }, - "version": "v0" - }, - "refId": "C" - } - } - ], - "queryOptions": { - "interval": "$inter" + "unit": "ms" }, - "transformations": [] - } - }, - "description": "Shows memory consumption in PostgreSQL pods based on metrics collected from docker. This section does not use collector metrics.", - "id": 22, - "links": [ - { - "targetBlank": true, - "title": "Kubernetes Pods", - "url": "dashboard/db/kubernetes-pods?$__url_time_range&$__all_variables" - } - ], - "title": "Memory Usage: $namespace_pods", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Memory", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 61 + }, + "id": 46, + "interval": "$inter", + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.0.7", + "targets": [ + { + "alias": "Time Spent on Each Backup", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" }, - "unit": "bytes" - }, - "overrides": [ { - "matcher": { - "id": "byRegexp", - "options": "/^limit/" + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Time in progress", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Backup Activity Status", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "Backup status shows the state of the backup daemon. The backup status can be one of following:\n \n* OK - There is at least one successful backup, and the latest backup is successful.\n* WARNING - There are no successful backups, or the last backup failed.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "0": { + "text": "OK" }, - { - "id": "custom.fillOpacity", - "value": 0 + "3": { + "text": "WARN" }, - { - "id": "custom.lineWidth", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/^request/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EF843C", - "mode": "fixed" - } + "6": { + "text": "FAILED" }, - { - "id": "custom.fillOpacity", - "value": 0 + "-1": { + "text": "N/A" } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/^usage/" }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#7EB26D", - "mode": "fixed" - } - } - ] + "type": "value" }, { - "matcher": { - "id": "byRegexp", - "options": "/^working set/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#6ED0E0", - "mode": "fixed" - } + "options": { + "match": "null", + "result": { + "text": "N/A" } - ] - } - ] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - } - }, - "version": "9.5.8" - } - } - }, - "panel-29": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "expr": "ma_status{namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /status/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" }, - "refId": "A" + "type": "special" } - } - ], - "queryOptions": { - "interval": "$inter", - "maxDataPoints": 100 - }, - "transformations": [] - } - }, - "description": "Backup status shows the state of the backup daemon. The backup status can be one of following:\n \n* OK - There is at least one successful backup, and the latest backup is successful.\n* WARNING - There are no successful backups, or the last backup failed.", - "id": 29, - "links": [], - "title": "Last Backup Status", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "0": { - "text": "OK" - }, - "3": { - "text": "WARN" - }, - "6": { - "text": "FAILED" - }, - "-1": { - "text": "N/A" - } - }, - "type": "value" + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)" }, { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 4 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 1 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 4 - } - ] - }, - "unit": "none" + ] }, - "overrides": [] + "unit": "none" }, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - } + "overrides": [] }, - "version": "11.2.1" - } - } - }, - "panel-3": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_metrics_df_pcent{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.metrics\\.df\\.pcent/ WHERE namespace='$namespace' and $timeFilter group by service_name", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": {}, - "transformations": [] - } - }, - "description": "Shows disk usage for PostgreSQL pods.", - "id": 3, - "links": [], - "title": "Disk Usage Percentage", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] + "gridPos": { + "h": 5, + "w": 4, + "x": 0, + "y": 76 + }, + "id": 29, + "interval": "$inter", + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - } + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, - "version": "11.5.2" - } - } - }, - "panel-31": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "", - "dsType": "influxdb", - "expr": "ma_storage_last_metrics_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Size", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM \"ma.storage.last.metrics.size\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_status{namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /status/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Last Backup Status", + "type": "stat" }, - "description": "Shows the size of the last backup.", - "id": 31, - "links": [], - "title": "Backup Last Version Size", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows the backup storage type.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "PV" } - ] - }, - "unit": "decbytes" + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [] + "unit": "none" }, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - } + "overrides": [] }, - "version": "9.0.7" - } - } - }, - "panel-32": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "Space Used", - "dsType": "influxdb", - "expr": "ma_storage_total_space{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Total Space", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /storage\\.size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + "gridPos": { + "h": 5, + "w": 5, + "x": 4, + "y": 76 + }, + "id": 40, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - }, - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "Total Volume Space", - "dsType": "influxdb", - "expr": "ma_storage_size{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Storage Size", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /storage\\.total_space/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.type", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM \"ma.storage.type\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" }, - "refId": "B" - } - } - ], - "queryOptions": { - "interval": "$inter" + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] }, - "transformations": [] - } + { + "datasource": { + "uid": "$datasource" + }, + "refId": "B" + } + ], + "title": "Storage Type", + "type": "stat" }, - "description": "Shows the space occupied by backups and the remaining amount of space. \nNot all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", - "id": 32, - "links": [], - "title": "Storage Size/Free Space", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows the current activity status of the backup daemon. The activity status can be one of following:\n* Not Active - There is no running backup process.\n* In Progress - The backup process is running.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "overrides": [ + "mappings": [ { - "matcher": { - "id": "byName", - "options": "Total Volume Space" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } + "options": { + "0": { + "text": "Not Active" }, - { - "id": "custom.fillOpacity", - "value": 0 + "1": { + "text": "In Progress" } - ] + }, + "type": "value" }, { - "matcher": { - "id": "byName", - "options": "Space Used" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#629E51", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 20 + "options": { + "match": "null", + "result": { + "text": "N/A" } - ] + }, + "type": "special" } - ] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 0.5 + } + ] }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - } + "unit": "none" + }, + "overrides": [] }, - "version": "9.0.7" - } - } - }, - "panel-33": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "Time Spent on Each Backup", - "dsType": "influxdb", - "expr": "ma_storage_lastSuccessful_metrics_spent_time{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Time Spent", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /storage\\.lastSuccessful\\.metrics\\.spent_time/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter" + "gridPos": { + "h": 5, + "w": 5, + "x": 9, + "y": 76 + }, + "id": 38, + "interval": "$inter", + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "transformations": [] - } - }, - "description": "Shows time spent on last backup.", - "id": 33, - "links": [], - "title": "Time Spent on Backup", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" }, - "unit": "ms" - }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.backup_is_in_progress", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] } + ], + "title": "Backup Activity Status", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" }, - "version": "9.0.7" - } - } - }, - "panel-37": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "expr": "ma_storage_last_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.last.metrics.end_timestamp", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.last.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - }, - "version": "v0" + "description": "Shows the period of time when the last successful backup process was ended.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } }, - "refId": "A" + "type": "special" } - } - ], - "queryOptions": { - "interval": "$inter", - "maxDataPoints": 100 - }, - "transformations": [] - } - }, - "description": "Shows the period of time when the last backup process was ended.", - "id": 37, - "links": [], - "title": "Time of Last Backup", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ms" + ] }, - "overrides": [] + "unit": "ms" }, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - } + "overrides": [] }, - "version": "11.2.1" - } - } - }, - "panel-38": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.backup_is_in_progress", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter", - "maxDataPoints": 100 + "gridPos": { + "h": 5, + "w": 5, + "x": 14, + "y": 76 + }, + "id": 41, + "interval": "$inter", + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "transformations": [] - } - }, - "description": "Shows the current activity status of the backup daemon. The activity status can be one of following:\n* Not Active - There is no running backup process.\n* In Progress - The backup process is running.", - "id": 38, - "links": [], - "title": "Backup Activity Status", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "text": "Not Active" - }, - "1": { - "text": "In Progress" - } - }, - "type": "value" + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_storage_lastSuccessful_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.last.metrics.end_timestamp", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.lastSuccessful.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" }, { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + "params": [], + "type": "last" } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(245, 54, 54, 0.9)" - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 0 - }, - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 0.5 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + ] + ], + "tags": [] } + ], + "title": "Time of Last Successful Backup", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" }, - "version": "11.2.1" - } - } - }, - "panel-40": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "expr": "", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.type", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM \"ma.storage.type\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - }, - "version": "v0" + "description": "Shows the period of time when the last backup process was ended.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } }, - "refId": "A" + "type": "special" } - }, - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": {}, - "version": "v0" + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "refId": "B" - } - } - ], - "queryOptions": { - "maxDataPoints": 100 - }, - "transformations": [] - } - }, - "description": "Shows the backup storage type.", - "id": 40, - "links": [], - "title": "Storage Type", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "PV" - } - }, - "type": "special" + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" + ] }, - "overrides": [] + "unit": "ms" }, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 19, + "y": 76 + }, + "id": 37, + "interval": "$inter", + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_storage_last_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.last.metrics.end_timestamp", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.last.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] } + ], + "title": "Time of Last Backup", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" }, - "version": "11.2.1" - } - } - }, - "panel-41": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "expr": "ma_storage_lastSuccessful_end_timestamp_ago{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.last.metrics.end_timestamp", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.lastSuccessful.end_timestamp_ago\" WHERE namespace='$namespace' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - }, - "version": "v0" + "description": "Shows the number of backups that will be evicted next time.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } }, - "refId": "A" + "type": "special" } - } - ], - "queryOptions": { - "interval": "$inter", - "maxDataPoints": 100 - }, - "transformations": [] - } - }, - "description": "Shows the period of time when the last successful backup process was ended.", - "id": 41, - "links": [], - "title": "Time of Last Successful Backup", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.5 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 1.5 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ms" + ] }, - "overrides": [] + "unit": "none" }, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 0, + "y": 104 + }, + "id": 45, + "interval": "$inter", + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_storage_outdated_backup_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.foul_backup_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.outdated_backup_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] } + ], + "title": "Outdated Backup Count", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" }, - "version": "11.2.1" - } - } - }, - "panel-42": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "expr": "ma_storage_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.dump_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - }, - "version": "v0" + "description": "Shows the time when backup and eviction will be started.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } }, - "refId": "A" + "type": "special" } - } - ], - "queryOptions": { - "interval": "$inter", - "maxDataPoints": 100 - }, - "transformations": [] - } - }, - "description": "Shows the amount of available backups.", - "id": 42, - "links": [], - "title": "Backup Versions Count", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" + ] }, - "overrides": [] + "unit": "s" }, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 4, + "y": 104 + }, + "id": 44, + "interval": "$inter", + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_backup_time_until_next_backup{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.dump_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.backup.time_until_next_backup\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] } + ], + "title": "Next Backup", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" }, - "version": "11.2.1" - } - } - }, - "panel-43": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "expr": "ma_storage_successful_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.dump_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.successful_dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - }, - "version": "v0" + "description": "Shows the amount of successful backups.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } }, - "refId": "A" + "type": "special" } - } - ], - "queryOptions": { - "interval": "$inter", - "maxDataPoints": 100 - }, - "transformations": [] - } - }, - "description": "Shows the amount of successful backups.", - "id": 43, - "links": [], - "title": "Successful Backup Versions Count", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" + ] }, - "overrides": [] + "unit": "none" }, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 9, + "y": 104 + }, + "id": 43, + "interval": "$inter", + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_storage_successful_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.dump_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.successful_dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] } + ], + "title": "Successful Backup Versions Count", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" }, - "version": "11.2.1" - } - } - }, - "panel-44": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "expr": "ma_backup_time_until_next_backup{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.dump_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.backup.time_until_next_backup\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] - }, - "version": "v0" + "description": "Shows the amount of available backups.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } }, - "refId": "A" + "type": "special" } - } - ], - "queryOptions": { - "interval": "$inter", - "maxDataPoints": 100 - }, - "transformations": [] - } - }, - "description": "Shows the time when backup and eviction will be started.", - "id": 44, - "links": [], - "title": "Next Backup", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" + ] }, - "overrides": [] + "unit": "none" }, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - } + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 14, + "y": 104 + }, + "id": 42, + "interval": "$inter", + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, - "version": "11.2.1" + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_storage_dump_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "measurement": "ma.storage.dump_count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM \"ma.storage.dump_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + ], + "title": "Backup Versions Count", + "type": "stat" } - } + ], + "title": "Backup", + "type": "row" }, - "panel-45": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "dsType": "influxdb", - "expr": "ma_storage_outdated_backup_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "", - "measurement": "ma.storage.foul_backup_count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.storage.outdated_backup_count\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "tags": [] + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 990, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "description": "If archive mode is on, then the WAL archive is enabled. Otherwise, the WAL archive is disabled.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "Off" }, - "version": "v0" + "1": { + "text": "On" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "text": "Off" + } }, - "refId": "A" + "type": "special" } - } - ], - "queryOptions": { - "interval": "$inter", - "maxDataPoints": 100 - }, - "transformations": [] - } - }, - "description": "Shows the number of backups that will be evicted next time.", - "id": 45, - "links": [], - "title": "Outdated Backup Count", - "vizConfig": { - "group": "stat", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "rgba(50, 172, 45, 0.97)" - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 0.5 - }, - { - "color": "rgba(245, 54, 54, 0.9)", - "value": 1.5 - } - ] - }, - "unit": "none" + ] }, - "overrides": [] + "unit": "none" }, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - } + "overrides": [] }, - "version": "11.2.1" - } - } - }, - "panel-46": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "Time Spent on Each Backup", - "dsType": "influxdb", - "expr": "ma_backup_is_in_progress{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Time in progress", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(\"value\") FROM \"ma.backup_is_in_progress\" WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": { - "interval": "$inter" + "gridPos": { + "h": 7, + "w": 4, + "x": 0, + "y": 62 + }, + "id": 1015, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false }, - "transformations": [] - } - }, - "description": "Shows the changes of activity status on the chart.", - "id": 46, - "links": [], - "title": "Backup Activity Status", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "exemplar": true, + "expr": "ma_pg_patroni_pg_metrics_archive_mode_prom{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" }, - "unit": "ms" - }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"value\") FROM /pg.$cluster_name.*.archive.mode/ WHERE namespace='$namespace' and $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] } + ], + "title": "Archive mode", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" }, - "version": "9.0.7" - } - } - }, - "panel-5": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_db_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+.*\\.pg_metrics\\.db_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + "description": "Shows the time in seconds since the last WAL file was archived. If rotation is disabled, and load on server is close to zero, this value can reach thousand of seconds.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Shows current DB count in PostgreSQL pods.", - "id": 5, - "links": [], - "title": "DataBases Count", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" }, - "overrides": [] + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 4, + "y": 62 + }, + "id": 81, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "11.5.2" - } - } - }, - "panel-6": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_current_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(\"value\") FROM /pg\\.$cluster_name\\.nodes\\.node\\d+\\..*\\.current_connections/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" + "pluginVersion": "9.0.7", + "targets": [ + { + "alias": "$6", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_pg_metrics_archive_delay{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "delay", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.delay$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" }, - "refId": "A" + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Archive Lag, s", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows the amount of failed attempts to flush WAL files to archive. If this value is greater than 0, the system checks whether backup daemon is running and has enough space to store files.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } }, - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "editorMode": "builder", - "expr": "ma_pg_metrics_postgres_max_connections{namespace=\"$namespace\"}", - "format": "table", - "legendFormat": "__auto", - "range": true - }, - "version": "v0" + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "refId": "B" - } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Shows the number of connections to PostgreSQL pods.", - "id": 6, - "links": [], - "title": "Current Connections", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" + { + "color": "red", + "value": 80 + } + ] }, - "overrides": [ + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 7, + "x": 10, + "y": 62 + }, + "id": 83, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.0.7", + "targets": [ + { + "alias": "$6", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "exemplar": true, + "expr": "ma_pg_patroni_pg_metrics_archive_failed_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "displayName", - "value": "Limits" - } - ] + "params": [ + "$interval" + ], + "type": "time" }, { - "matcher": { - "id": "byName", - "options": "Limits" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-red", - "mode": "fixed" - } - } - ] + "params": [ + "null" + ], + "type": "fill" } - ] - }, - "options": { - "legend": { - "calcs": [ - "min", - "max", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + ], + "interval": "", + "legendFormat": "count", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.failed_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] } + ], + "title": "Failed to archive", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" }, - "version": "9.5.8" - } - } - }, - "panel-7": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$4", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_metrics_running{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM /pg.$cluster_name.nodes.node.*.pg_metrics.running/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + "description": "Shows the space occupied by WAL archive and the remaining amount of space. Not all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "", - "id": 7, - "links": [], - "title": "Running Nodes (1 = OK)", - "vizConfig": { - "group": "state-timeline", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "axisPlacement": "auto", - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#F2495C" - }, - "1": { - "color": "#73BF69" - }, - "N/A": { - "color": "#CCC" - }, - "null": { - "text": "N/A" - } - }, - "type": "value" + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" + ] }, - "overrides": [] + "unit": "decbytes" }, - "options": { - "alignValue": "left", - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Total Volume Space" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#890F02", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" + { + "matcher": { + "id": "byName", + "options": "Space Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#629E51", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 20 + } + ] } + ] + }, + "gridPos": { + "h": 7, + "w": 7, + "x": 17, + "y": 62 + }, + "id": 84, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "13.0.6" + "pluginVersion": "9.0.7", + "targets": [ + { + "alias": "Space Used", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_storage_total_space{exported_namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "Total Space", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(value) FROM /storage\\.archive_size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Storage Size/Free Space", + "type": "timeseries" } - } + ], + "title": "Archive", + "type": "row" }, - "panel-8": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$tag_service_name", - "dsType": "influxdb", - "expr": "ma_status{namespace=\"$namespace\", cluster=~\"$cluster\"} + 1", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{ service_name }}", - "orderByTime": "ASC", - "policy": "default", - "query": "select 1 - ( max(\"value\") / 14 - max(\"value\") % 14 / 14) from /ma.status/ WHERE namespace='$namespace' and $timeFilter group by service_name, time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 991, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows the difference between the current XLOG location and the data that was sent to recipient.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Shows whether metric sources work. If the value is greater than 1, then the source returns error. If the value is zero, then the source is down.", - "id": 8, - "links": [], - "title": "Metric Sources (1 = OK)", - "vizConfig": { - "group": "state-timeline", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "axisPlacement": "auto", - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#F2495C", - "text": "ERROR" - }, - "1": { - "color": "#73BF69", - "text": "OK" - }, - "7": { - "color": "#FF9830", - "text": "PROBLEM" - }, - "N/A": { - "color": "#CCC" - }, - "null": { - "text": "N/A" - } - }, - "type": "value" + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" + ] }, - "overrides": [] + "unit": "decbytes" }, - "options": { - "alignValue": "left", - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 63 + }, + "id": 100, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "13.0.6" - } - } - }, - "panel-81": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$6", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_pg_metrics_archive_delay{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "delay", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.delay$/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + "pluginVersion": "10.1.5", + "targets": [ + { + "alias": "$7", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_pg_patroni_replication_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } + ], + "interval": "", + "legendFormat": "{{ hostname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Sent lag", + "type": "timeseries" }, - "description": "Shows the time in seconds since the last WAL file was archived. If rotation is disabled, and load on server is close to zero, this value can reach thousand of seconds.", - "id": 81, - "links": [], - "title": "Archive Lag, s", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" + { + "datasource": { + "uid": "$datasource" + }, + "description": "Shows the difference between the sent XLOG location and applied to the recipient XLOG location.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 63 + }, + "id": 101, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "9.0.7" + "pluginVersion": "10.1.5", + "targets": [ + { + "alias": "$7", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_pg_patroni_replication_state_sent_replay_lag{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ hostname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(value) FROM /pg\\.$cluster_name\\..*\\.pg_metrics\\.replication\\.(.*).sent_replay_lag/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Sent/Replay lag", + "type": "timeseries" } - } + ], + "title": "Replication state", + "type": "row" }, - "panel-83": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$6", - "dsType": "influxdb", - "exemplar": true, - "expr": "ma_pg_patroni_pg_metrics_archive_failed_count{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "count", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT mean(value) FROM/pg.$cluster_name.nodes.*.archive.failed_count/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 992, + "panels": [ + { + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Shows the amount of failed attempts to flush WAL files to archive. If this value is greater than 0, the system checks whether backup daemon is running and has enough space to store files.", - "id": 83, - "links": [], - "title": "Failed to archive", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" }, - "overrides": [] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 71 + }, + "id": 910, + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "9.0.7" + "pluginVersion": "10.1.5", + "targets": [ + { + "alias": "duration", + "datasource": { + "uid": "$datasource" + }, + "dsType": "influxdb", + "expr": "ma_collector_duration{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ host }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT value FROM /collector.duration/ WHERE namespace='$namespace' and $timeFilter fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Collector duration", + "type": "timeseries" } - } + ], + "title": "Collector status", + "type": "row" }, - "panel-84": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "Space Used", - "dsType": "influxdb", - "expr": "ma_storage_total_space{exported_namespace=\"$namespace\", service_name=\"postgres-backup-daemon\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "Total Space", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT last(value) FROM /storage\\.archive_size/ WHERE namespace='$namespace' and service_name='postgres-backup-daemon' and $timeFilter GROUP BY time($interval) fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 23 + }, + "id": 1080, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "This graph shows size for all of the logical databases in PostgreSQL cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "MiB", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - } - ], - "queryOptions": { - "interval": "$inter" - }, - "transformations": [] - } - }, - "description": "Shows the space occupied by WAL archive and the remaining amount of space. Not all storage supports total size, so \"Total Volume Space\" metrics can be zeroed.", - "id": 84, - "links": [], - "title": "Storage Size/Free Space", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" }, - "overrides": [ + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bits" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 1078, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.5.2", + "targets": [ + { + "alias": "$4", + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_size_by_database{namespace=\"$namespace\", datname=~\"$datname\"}", + "format": "time_series", + "groupBy": [ { - "matcher": { - "id": "byName", - "options": "Total Volume Space" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#890F02", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 0 - } - ] + "params": [ + "$interval" + ], + "type": "time" }, { - "matcher": { - "id": "byName", - "options": "Space Used" + "params": [ + "null" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "", + "legendFormat": "{{ datname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") / 1024 / 1024 FROM /pg.common.size_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#629E51", - "mode": "fixed" - } - }, - { - "id": "custom.fillOpacity", - "value": 20 - } - ] + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Size by database", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "This graph shows number of table in each of the logical databases.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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" } - ] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true }, - "tooltip": { - "mode": "multi", - "sort": "none" + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 1079, + "options": { + "legend": { + "calcs": [ + "max", + "last" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } }, - "version": "9.0.7" + "pluginVersion": "11.5.2", + "targets": [ + { + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count by (datname) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"})", + "interval": "", + "legendFormat": "{{ datname }}", + "range": true, + "refId": "A" + } + ], + "title": "Number of Tables", + "type": "timeseries" } - } + ], + "title": "Database Statistics", + "type": "row" }, - "panel-901": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "$7", - "dsType": "influxdb", - "editorMode": "code", - "exemplar": true, - "expr": "ma_pg_patroni_metrics_du_base{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{pg_node}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT /value/ FROM /pg\\.$cluster_name\\.nodes\\.$short_container_name\\.metrics\\.du\\.(.?)/ WHERE namespace='$namespace' and $timeFilter group by service_name", - "range": true, - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 1086, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Shows how many connections are in use right now. It shows max connections, used connections, reserved for regular, and superuser.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } - } - ], - "queryOptions": {}, - "transformations": [] - } - }, - "description": "Shows usage by well-known consumers, such as pg_xlog or base directories.", - "id": 901, - "links": [], - "title": "Disk Usage", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "ma_pg_patroni_metrics_du_base" + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, - "properties": [ - { - "id": "unit", - "value": "deckbytes" - } - ] - } - ] - }, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true + { + "color": "red", + "value": 80 + } + ] }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 73 + }, + "id": 1081, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false, + "width": 250 + }, + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "version": "10.3.3" - } - } - }, - "panel-910": { - "kind": "Panel", - "spec": { - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "hidden": false, - "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "alias": "duration", - "dsType": "influxdb", - "expr": "ma_collector_duration{namespace=\"$namespace\", cluster=~\"$cluster\"}", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "interval": "", - "legendFormat": "{{ host }}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT value FROM /collector.duration/ WHERE namespace='$namespace' and $timeFilter fill(null)", - "rawQuery": true, - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - "version": "v0" - }, - "refId": "A" - } - } - ], - "queryOptions": {}, - "transformations": [] - } - }, - "description": "", - "id": 910, - "links": [], - "title": "Collector duration", - "vizConfig": { - "group": "timeseries", - "kind": "VizConfig", - "spec": { - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "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": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + "pluginVersion": "10.2.3", + "targets": [ + { + "alias": "$4", + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_connection_count_stat_max_connections{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" }, - "unit": "ns" - }, - "overrides": [] + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "stat max connections", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.connection_count_stat.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "range": true, + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] }, - "options": { - "legend": { - "calcs": [ - "max", - "mean", - "lastNotNull" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + { + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "editorMode": "code", + "expr": "ma_pg_connection_count_stat_reserved_for_reg_users{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "reserved for reg_users", + "range": true, + "refId": "B" + }, + { + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "editorMode": "code", + "expr": "ma_pg_connection_count_stat_reserved_for_superuser{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "reserved for superuser", + "range": true, + "refId": "C" + }, + { + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "editorMode": "code", + "expr": "ma_pg_connection_count_stat_used{namespace=\"$namespace\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "used", + "range": true, + "refId": "D" } - }, - "version": "10.1.5" - } - } - } - }, - "layout": { - "kind": "RowsLayout", - "spec": { - "rows": [ + ], + "title": "Overall connection statistic", + "type": "timeseries" + }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": false, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-10" - }, - "height": 7, - "width": 4, - "x": 0, - "y": 0 - } - }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Shows the number of connections per database.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1077" - }, - "height": 7, - "width": 4, - "x": 4, - "y": 0 - } + "color": "green" }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1094" - }, - "height": 7, - "width": 2, - "x": 8, - "y": 0 - } - }, + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-7" - }, - "height": 7, - "width": 7, - "x": 10, - "y": 0 - } - }, + "id": "displayName", + "value": "Limits" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limits" + }, + "properties": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-8" - }, - "height": 7, - "width": 7, - "x": 17, - "y": 0 + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" } } ] } + ] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 73 + }, + "id": 1082, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 200 }, - "title": "Overview" - } + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.3", + "targets": [ + { + "alias": "$4", + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "dsType": "influxdb", + "editorMode": "code", + "exemplar": true, + "expr": "ma_pg_connection_by_database{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "", + "legendFormat": "{{ datname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Connection by database", + "type": "timeseries" }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1023" - }, - "height": 7, - "width": 24, - "x": 0, - "y": 0 - } + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Shows the number of connections per role.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } ] - } + }, + "unit": "short" }, - "title": "Patroni Status" - } + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 105 + }, + "id": 1083, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false, + "width": 200 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.3", + "targets": [ + { + "alias": "$4", + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "dsType": "influxdb", + "editorMode": "code", + "expr": "ma_pg_connection_by_role{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "instant": false, + "interval": "", + "legendFormat": "{{ usename }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.connection_by_database.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Connection by role", + "type": "timeseries" }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1" - }, - "height": 7, - "width": 8, - "x": 0, - "y": 0 - } - }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "Shows the number of not idle connections per database.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-16" - }, - "height": 7, - "width": 8, - "x": 8, - "y": 0 - } + "color": "green" }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-15" - }, - "height": 7, - "width": 8, - "x": 16, - "y": 0 - } + "color": "red", + "value": 80 } ] - } + }, + "unit": "short" }, - "title": "Smoke test" - } + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 105 + }, + "id": 1084, + "interval": "$inter", + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false, + "width": 200 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.2.3", + "targets": [ + { + "alias": "$4", + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "dsType": "influxdb", + "editorMode": "code", + "expr": "ma_pg_count_not_idle{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "interval": "", + "legendFormat": "{{ datname }}", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"value\") FROM /pg.common.count_not_idle.*/ WHERE namespace='$namespace' and $timeFilter group by time($interval) fill(previous)", + "range": true, + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "title": "Not idle connections by Database", + "type": "timeseries" }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-20" - }, - "height": 8, - "repeat": { - "direction": "h", - "mode": "variable", - "value": "namespace_pods" - }, - "width": 24, - "x": 0, - "y": 0 - } + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "This table shows number of Active Connections in current moment by role. Also shows Connection Limits that is set during Role create. Also, shows not idle connection by role.", + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } ] } }, - "title": "CPU Usage" - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-22" - }, - "height": 6, - "repeat": { - "direction": "h", - "mode": "variable", - "value": "namespace_pods" - }, - "width": 24, - "x": 0, - "y": 0 - } + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Not Idle Connections" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "None": { + "text": "0" + } + }, + "type": "value" + } + ] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Role" + }, + "properties": [ + { + "id": "custom.width", + "value": 358 } ] } + ] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 114 + }, + "id": 1085, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false }, - "title": "Memory Usage" - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1100" - }, - "height": 8, - "width": 12, - "x": 0, - "y": 0 - } + "frameIndex": 1, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "editorMode": "code", + "exemplar": false, + "expr": "last_over_time(ma_pg_connection_by_role_with_limit{namespace=\"$namespace\", usename=~\"$usename\", cluster=~\"$cluster\"}[$__range:])", + "format": "table", + "groupBy": [ + { + "params": [ + "queryid" + ], + "type": "tag" + } + ], + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Connections", + "measurement": "ma.pg.common.queries_stat", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", + "rawQuery": true, + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "mean_time" + ], + "type": "field" }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1102" - }, - "height": 8, - "width": 12, - "x": 12, - "y": 0 - } + "params": [ + "30" + ], + "type": "top" + } + ], + [ + { + "params": [ + "calls" + ], + "type": "field" + } + ], + [ + { + "params": [ + "short_query" + ], + "type": "field" + } + ], + [ + { + "params": [ + "datname" + ], + "type": "field" + } + ], + [ + { + "params": [ + "total_time" + ], + "type": "field" } ] + ], + "tags": [] + } + ], + "title": "Number of Active Connections by Role", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": false, + "__name__": true, + "endpoint": true, + "exported_namespace": true, + "host": true, + "instance": true, + "job": true, + "metric_name": true, + "name": true, + "namespace": true, + "pod": true, + "relid": true, + "service": true, + "short_query": false + }, + "indexByName": { + "Time": 1, + "Value": 12, + "__name__": 2, + "endpoint": 3, + "exported_namespace": 4, + "host": 5, + "instance": 6, + "job": 7, + "limit": 13, + "name": 8, + "namespace": 9, + "pod": 10, + "service": 11, + "usename": 0 + }, + "renameByName": { + "Value": "Connections", + "datname": "Database Name", + "idx_size": "Index Size", + "limit": "Connections Limit", + "name": "", + "namespace": "", + "not_idle_cnt": "Not Idle Connections", + "queryid": "Query Id", + "relname": "Relation Name", + "short_query": "", + "tot_size": "Total Size", + "usename": "Role" + } } - }, - "title": "PG Large Object Stats" - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-6" - }, - "height": 7, - "width": 8, - "x": 0, - "y": 0 - } - }, + } + ], + "type": "table" + } + ], + "title": "Connection Statistics", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 1096, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Temp File Size", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-11" - }, - "height": 7, - "width": 8, - "x": 8, - "y": 0 - } + "color": "green", + "value": null }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-14" - }, - "height": 7, - "width": 8, - "x": 16, - "y": 0 - } + "color": "red", + "value": 80 } ] } }, - "title": "Network" - } + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 26 + }, + "id": 1098, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_temp_file_size_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Temporary Files Size By Database", + "type": "timeseries" }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-3" - }, - "height": 7, - "width": 12, - "x": 0, - "y": 0 - } + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Temp File Size", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-901" - }, - "height": 7, - "repeat": { - "direction": "h", - "mode": "variable", - "value": "short_container_name" - }, - "width": 24, - "x": 0, - "y": 28 - } + "color": "red", + "value": 80 } ] } }, - "title": "Disk space" - } + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 26 + }, + "id": 1099, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_temp_file_size_by_query{namespace=~\"$namespace\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Temporary Files Size By Query", + "type": "timeseries" }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-5" - }, - "height": 7, - "width": 12, - "x": 0, - "y": 0 - } + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Queries Count", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-19" - }, - "height": 7, - "width": 12, - "x": 12, - "y": 0 - } + "color": "red", + "value": 80 } ] } }, - "title": "Data handing" - } + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 34 + }, + "id": 1095, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_active_temp_writes{namespace=~\"$namespace\", datname=~\"$datname\", usename=~\"$usename\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Active Temp Writes", + "type": "timeseries" }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-12" - }, - "height": 7, - "width": 12, - "x": 0, - "y": 0 - } + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Temp Files Count", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-13" - }, - "height": 7, - "width": 12, - "x": 12, - "y": 0 - } + "color": "red", + "value": 80 } ] } }, - "title": "Locks" - } - }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 34 + }, + "id": 1097, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.5.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PC3E95692D54ABCC0" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "ma_pg_temp_file_count_by_db{namespace=~\"$namespace\", datname=~\"$datname\"}", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": true, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Temporary Files Count By Database", + "type": "timeseries" + } + ], + "title": "Temporary File Statistics", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 1091, + "panels": [ { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-17" - }, - "height": 7, - "width": 12, - "x": 0, - "y": 0 - } + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "The table shows TOP tables filtered by the selected database name.", + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-18" - }, - "height": 7, - "width": 12, - "x": 12, - "y": 0 - } + "color": "red", + "value": 80 } ] } }, - "title": "Master Smoke Test" - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-31" - }, - "height": 8, - "width": 6, - "x": 0, - "y": 0 - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-32" - }, - "height": 8, - "width": 6, - "x": 6, - "y": 0 - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-33" - }, - "height": 8, - "width": 6, - "x": 12, - "y": 0 - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-46" - }, - "height": 8, - "width": 6, - "x": 18, - "y": 0 - } - }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Table Size" + }, + "properties": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-29" - }, - "height": 5, - "width": 4, - "x": 0, - "y": 15 - } - }, + "id": "unit", + "value": "bytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Total Size" + }, + "properties": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-40" - }, - "height": 5, - "width": 5, - "x": 4, - "y": 15 - } - }, + "id": "unit", + "value": "bytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Index Size" + }, + "properties": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-38" - }, - "height": 5, - "width": 5, - "x": 9, - "y": 15 - } - }, + "id": "unit", + "value": "bytes" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 74 + }, + "id": 1087, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Table Size" + } + ] + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "groupBy": [ + { + "params": [ + "queryid" + ], + "type": "tag" + } + ], + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "measurement": "ma.pg.common.queries_stat", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", + "rawQuery": true, + "refId": "A", + "resultFormat": "table", + "select": [ + [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-41" - }, - "height": 5, - "width": 5, - "x": 14, - "y": 15 - } + "params": [ + "mean_time" + ], + "type": "field" }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-37" - }, - "height": 5, - "width": 5, - "x": 19, - "y": 15 - } - }, + "params": [ + "30" + ], + "type": "top" + } + ], + [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-45" - }, - "height": 5, - "width": 4, - "x": 0, - "y": 43 - } - }, + "params": [ + "calls" + ], + "type": "field" + } + ], + [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-44" - }, - "height": 5, - "width": 5, - "x": 4, - "y": 43 - } - }, + "params": [ + "short_query" + ], + "type": "field" + } + ], + [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-43" - }, - "height": 5, - "width": 5, - "x": 9, - "y": 43 - } - }, + "params": [ + "datname" + ], + "type": "field" + } + ], + [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-42" - }, - "height": 5, - "width": 5, - "x": 14, - "y": 43 - } + "params": [ + "total_time" + ], + "type": "field" } ] + ], + "tags": [] + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_tot_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (relid, relname, datname, selector) (ma_pg_idx_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\", relname=~\"$top_tables_by_size\"})", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "D" + } + ], + "title": "TOP $limit tables by size", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "datname", + "relid", + "relname", + "selector", + "Value #A", + "Value #B", + "Value #C", + "Value #D" + ] + } } }, - "title": "Backup" - } + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false, + "Value #A": false, + "__name__": true, + "endpoint": true, + "exported_namespace": true, + "host": true, + "instance": true, + "job": true, + "metric_name": true, + "name": true, + "namespace": true, + "pod": true, + "relid": true, + "service": true, + "short_query": false + }, + "indexByName": { + "Value #A": 7, + "Value #B": 4, + "Value #C": 5, + "Value #D": 6, + "datname": 0, + "relid": 1, + "relname": 2, + "selector": 3 + }, + "renameByName": { + "Value": "VALUE", + "Value #A": "Table Size", + "Value #B": "Estimated Number Of Tuples", + "Value #C": "Total Size", + "Value #D": "Index Size", + "datname": "Database Name", + "idx_size": "Index Size", + "live_tuples": "Estimated Number Of Tuples", + "name": "", + "namespace": "", + "pod_name": "", + "queryid": "Query Id", + "relname": "Relation Name", + "service_name": "", + "short_query": "", + "tot_size": "Total Size" + } + } + } + ], + "type": "table" }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1015" - }, - "height": 7, - "width": 4, - "x": 0, - "y": 0 - } - }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "This Graph Shows size of the each table in all of the databases", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-81" - }, - "height": 7, - "width": 6, - "x": 4, - "y": 0 - } + "color": "green" }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-83" - }, - "height": 7, - "width": 7, - "x": 10, - "y": 0 - } - }, + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-84" - }, - "height": 7, - "width": 7, - "x": 17, - "y": 0 - } + "id": "unit", + "value": "bytes" } ] } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 106 + }, + "id": 1088, + "options": { + "legend": { + "calcs": [ + "max", + "last" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true }, - "title": "Archive" - } + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "editorMode": "code", + "exemplar": false, + "expr": "topk($table_limit, sort_desc(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", + "instant": false, + "interval": "", + "legendFormat": "{{ datname }}/{{ relname }}", + "range": true, + "refId": "A" + } + ], + "title": "Size by tables", + "type": "timeseries" }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-100" - }, - "height": 7, - "width": 12, - "x": 0, - "y": 0 - } + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "This graphs shows estimated number of rows in all of the tables, using `pg_stat_all_tables` system view.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "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": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-101" - }, - "height": 7, - "width": 12, - "x": 12, - "y": 0 - } + "color": "red", + "value": 80 } ] } }, - "title": "Replication state" - } + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 115 + }, + "id": 1089, + "options": { + "legend": { + "calcs": [ + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "editorMode": "code", + "exemplar": true, + "expr": "topk($table_limit, sort_desc(ma_pg_tuples_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}))", + "interval": "", + "legendFormat": "{{datname}}/{{ relname }}", + "range": true, + "refId": "A" + } + ], + "title": "Estimated Number of Rows per Table", + "type": "timeseries" }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-910" - }, - "height": 7, - "width": 24, - "x": 0, - "y": 0 - } + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "The table shows TOP queries filtered by the selected column and database name. For queries statistics `pg_stat_statements` view used. More info about columns could be find in official docs.\n\nAlso, it is possible to reset the statistics, by calling `pg_stat_statements_reset()` function.", + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 } ] } }, - "title": "Collector status" - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1078" - }, - "height": 9, - "width": 12, - "x": 0, - "y": 0 - } - }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "VALUE" + }, + "properties": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1079" - }, - "height": 9, - "width": 12, - "x": 12, - "y": 0 - } + "id": "displayName", + "value": "$column" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "short_query" + }, + "properties": [ + { + "id": "displayName", + "value": "Short Query" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Short Query" + }, + "properties": [ + { + "id": "custom.width", + "value": 633 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.width", + "value": 219 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "calls" + }, + "properties": [ + { + "id": "custom.width", + "value": 165 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Query Id" + }, + "properties": [ + { + "id": "custom.width", + "value": 322 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Database Name" + }, + "properties": [ + { + "id": "custom.width", + "value": 346 } ] } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 123 + }, + "id": 1090, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false }, - "title": "Database Statistics" - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1081" - }, - "height": 9, - "width": 12, - "x": 0, - "y": 0 - } - }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Database Name" + } + ] + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "0": "$", + "1": "d", + "2": "a", + "3": "t", + "4": "a", + "5": "s", + "6": "o", + "7": "u", + "8": "r", + "9": "c", + "10": "e" + }, + "editorMode": "code", + "exemplar": false, + "expr": "last_over_time(topk($limit,sort_desc(ma_pg_queries_stat{namespace=\"$namespace\", metric_name=\"$column\", datname=~\"$datname\", cluster=~\"$cluster\"}))[$__range:])", + "format": "table", + "groupBy": [ + { + "params": [ + "queryid" + ], + "type": "tag" + } + ], + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "measurement": "ma.pg.common.queries_stat", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT top(\"$column\", $limit) as \"$column\", \"short_query\", \"datname\", \"mean_time\", \"queryid\" FROM (SELECT LAST(\"queryid_val\"), * FROM \"ma.pg.common.queries_stat\" WHERE $timeFilter and (\"datname\" = '$datname' OR 'All' = '$datname' ) and \"namespace\" = '$namespace' GROUP BY \"queryid\" ORDER BY DESC LIMIT 1) ORDER BY DESC", + "rawQuery": true, + "refId": "A", + "resultFormat": "table", + "select": [ + [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1082" - }, - "height": 9, - "width": 12, - "x": 12, - "y": 0 - } + "params": [ + "mean_time" + ], + "type": "field" }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1083" - }, - "height": 9, - "width": 12, - "x": 0, - "y": 32 - } - }, + "params": [ + "30" + ], + "type": "top" + } + ], + [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1084" - }, - "height": 9, - "width": 12, - "x": 12, - "y": 32 - } - }, + "params": [ + "calls" + ], + "type": "field" + } + ], + [ + { + "params": [ + "short_query" + ], + "type": "field" + } + ], + [ + { + "params": [ + "datname" + ], + "type": "field" + } + ], + [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1085" - }, - "height": 9, - "width": 12, - "x": 0, - "y": 41 - } + "params": [ + "total_time" + ], + "type": "field" } ] + ], + "tags": [] + } + ], + "title": "TOP $limit queries by $column", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Value": false, + "__name__": true, + "endpoint": true, + "exported_namespace": true, + "host": true, + "instance": true, + "job": true, + "metric_name": true, + "name": true, + "namespace": true, + "pod": true, + "service": true, + "short_query": false + }, + "indexByName": { + "Time": 0, + "Value": 1, + "__name__": 2, + "endpoint": 4, + "exported_namespace": 5, + "host": 6, + "instance": 7, + "job": 8, + "metric_name": 14, + "name": 9, + "namespace": 10, + "pod": 11, + "queryid": 12, + "service": 13, + "short_query": 3 + }, + "renameByName": { + "Value": "VALUE", + "datname": "Database Name", + "name": "", + "queryid": "Query Id", + "rolname": "Role Name", + "short_query": "" + } } }, - "title": "Connection Statistics" - } + { + "id": "seriesToColumns", + "options": { + "byField": "Short Query" + } + } + ], + "type": "table" }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1098" - }, - "height": 8, - "width": 12, - "x": 0, - "y": 0 - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1099" - }, - "height": 8, - "width": 12, - "x": 12, - "y": 0 - } - }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "hue", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "percentage", + "steps": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1095" - }, - "height": 8, - "width": 12, - "x": 0, - "y": 8 - } + "color": "green", + "value": 0 }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1097" - }, - "height": 8, - "width": 12, - "x": 12, - "y": 8 - } + "color": "red", + "value": 80 } ] - } + }, + "unit": "decbytes" }, - "title": "Temporary File Statistics" - } + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 131 + }, + "id": 1103, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "builder", + "expr": "sum by(relname, datname) (ma_pg_default_partition_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\", relname=~\"$relname\", cluster=~\"$cluster\"})", + "legendFormat": "{{datname}}/{{ relname }}", + "range": true, + "refId": "B" + } + ], + "title": "Default Partition Size (bytes)", + "type": "timeseries" }, { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1087" - }, - "height": 9, - "width": 24, - "x": 0, - "y": 0 - } - }, - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1088" - }, - "height": 9, - "width": 24, - "x": 0, - "y": 9 - } - }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1089" - }, - "height": 8, - "width": 24, - "x": 0, - "y": 18 - } + "color": "green", + "value": 0 }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1090" - }, - "height": 8, - "width": 24, - "x": 0, - "y": 26 - } - }, + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 131 + }, + "id": 1104, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "builder", + "expr": "sum by(relname, datname) (ma_pg_default_partition_row_count{relname=~\"$relname\", datname=~\"$datname\", cluster=~\"$cluster\", namespace=\"$namespace\"})", + "legendFormat": "{{datname}}/{{ relname }}", + "range": true, + "refId": "A" + } + ], + "title": "Default Partition Row count", + "type": "timeseries" + } + ], + "title": "Tables Statistics", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 1093, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1103" - }, - "height": 8, - "width": 12, - "x": 0, - "y": 34 - } + "color": "green" }, { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1104" - }, - "height": 8, - "width": 12, - "x": 12, - "y": 34 - } + "color": "red", + "value": 80 } ] } }, - "title": "Tables Statistics" - } - }, - { - "kind": "RowsLayoutRow", - "spec": { - "collapse": true, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "element": { - "kind": "ElementReference", - "name": "panel-1092" - }, - "height": 9, - "width": 24, - "x": 0, - "y": 0 - } + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true } ] } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 75 + }, + "id": 1092, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": true, + "fields": "", + "reducer": [ + "sum" + ], + "show": false }, - "title": "DBaaS" - } + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "microservice" + } + ] + }, + "pluginVersion": "11.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (datname, db_namespace, microservice, tenant_id) (last_over_time(ma_pg_dbaas{namespace=\"$namespace\", cluster=~\"$cluster\"}[$__range:]))", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "DbaaS Mappings", + "type": "table" } - ] - } - }, - "links": [ - { - "asDropdown": false, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": [ - "Postgres_Performance" - ], - "targetBlank": false, - "title": "PostgreSQL Performance Metrics", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": false, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": [ - "Postgres_Exporter" ], - "targetBlank": false, - "title": "Postgres Exporter", - "tooltip": "", - "type": "dashboards", - "url": "" + "title": "DBaaS", + "type": "row" } ], - "liveNow": false, "preload": false, + "refresh": "", + "schemaVersion": 40, "tags": [], - "timeSettings": { - "autoRefresh": "", - "autoRefreshIntervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "fiscalYearStartMonth": 0, - "from": "now-5m", - "hideTimepicker": false, - "timezone": "browser", - "to": "now" - }, - "title": "PostgreSQL Cluster Prometheus Copy", - "variables": [ - { - "kind": "DatasourceVariable", - "spec": { - "allowCustomValue": true, + "templating": { + "list": [ + { "current": { "text": "Platform Monitoring Prometheus", "value": "PC3E95692D54ABCC0" }, - "hide": "dontHide", "includeAll": false, "label": "Cloud", - "multi": false, "name": "datasource", "options": [], - "pluginId": "prometheus", - "refresh": "onDashboardLoad", + "query": "prometheus", + "refresh": 1, "regex": "", - "skipUrlSync": false - } - }, - { - "kind": "QueryVariable", - "spec": { - "allowCustomValue": true, + "type": "datasource" + }, + { "current": { "text": "", "value": "" }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, "definition": "label_values(ma_status, cluster)", - "hide": "dontHide", "includeAll": false, "label": "Cluster", - "multi": false, "name": "cluster", "options": [], "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "query": "label_values(ma_status, cluster)", - "refId": "StandardVariableQuery" - }, - "version": "v0" + "query": "label_values(ma_status, cluster)", + "refId": "StandardVariableQuery" }, - "refresh": "onDashboardLoad", + "refresh": 1, "regex": "", - "regexApplyTo": "value", - "skipUrlSync": false, - "sort": "alphabeticalAsc" - } - }, - { - "kind": "QueryVariable", - "spec": { - "allowCustomValue": true, + "sort": 1, + "type": "query" + }, + { "current": { - "text": "postgres-svty", - "value": "postgres-svty" + "text": "test-perm7", + "value": "test-perm7" + }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" }, "definition": "label_values(ma_status{cluster=~\"$cluster\"},namespace)", - "hide": "dontHide", "includeAll": false, "label": "Project", - "multi": false, "name": "namespace", "options": [], "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "query": "label_values(ma_status{cluster=~\"$cluster\"},namespace)", - "refId": "StandardVariableQuery" - }, - "version": "v0" + "query": "label_values(ma_status{cluster=~\"$cluster\"},namespace)", + "refId": "StandardVariableQuery" }, - "refresh": "onDashboardLoad", + "refresh": 1, "regex": "", - "regexApplyTo": "value", - "skipUrlSync": false, - "sort": "disabled" - } - }, - { - "kind": "QueryVariable", - "spec": { - "allowCustomValue": true, + "type": "query" + }, + { "current": { "text": "All", "value": [ "$__all" ] }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, "definition": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "hide": "dontHide", "includeAll": true, "label": "PG Data Nodes", "multi": true, "name": "container_name", "options": [], "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "refId": "Platform Monitoring Prometheus-container_name-Variable-Query" - }, - "version": "v0" + "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", + "refId": "Platform Monitoring Prometheus-container_name-Variable-Query" }, - "refresh": "onDashboardLoad", + "refresh": 1, "regex": "", - "regexApplyTo": "value", - "skipUrlSync": false, - "sort": "alphabeticalAsc" - } - }, - { - "kind": "IntervalVariable", - "spec": { + "sort": 1, + "type": "query" + }, + { "auto": true, "auto_count": 30, "auto_min": "60s", @@ -11299,7 +9323,6 @@ "text": "$__auto", "value": "$__auto" }, - "hide": "dontHide", "label": "Sampling", "name": "inter", "options": [ @@ -11355,244 +9378,248 @@ } ], "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d", - "refresh": "onTimeRangeChanged", - "skipUrlSync": false - } - }, - { - "kind": "QueryVariable", - "spec": { - "allowCustomValue": true, + "refresh": 2, + "type": "interval" + }, + { "current": { "text": "All", "value": "$__all" }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, "definition": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "hide": "dontHide", "includeAll": true, - "multi": false, "name": "namespace_pods", "options": [], "query": { - "datasource": { - "name": "$datasource" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", - "refId": "Platform Monitoring Prometheus-namespace_pods-Variable-Query" - }, - "version": "v0" + "query": "label_values(kube_pod_info{exported_namespace=~\"^$namespace$\", cluster=~\"$cluster\"}, exported_pod)", + "refId": "Platform Monitoring Prometheus-namespace_pods-Variable-Query" }, - "refresh": "onDashboardLoad", + "refresh": 1, "regex": "", - "regexApplyTo": "value", - "skipUrlSync": false, - "sort": "alphabeticalAsc" - } - }, - { - "kind": "QueryVariable", - "spec": { + "sort": 1, + "type": "query" + }, + { "allValue": ".*", - "allowCustomValue": true, "current": { "text": "All", "value": [ "$__all" ] }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, "definition": "label_values(ma_pg_size_by_database{namespace=\"$namespace\", cluster=~\"$cluster\"},datname)", - "hide": "dontHide", "includeAll": true, "label": "Database Name", "multi": true, "name": "datname", "options": [], "query": { - "datasource": { - "name": "${datasource}" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "query": "label_values(ma_pg_size_by_database{namespace=\"$namespace\", cluster=~\"$cluster\"},datname)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "version": "v0" + "query": "label_values(ma_pg_size_by_database{namespace=\"$namespace\", cluster=~\"$cluster\"},datname)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "refresh": "onTimeRangeChanged", + "refresh": 2, "regex": "", - "regexApplyTo": "value", - "skipUrlSync": false, - "sort": "alphabeticalAsc" - } - }, - { - "kind": "CustomVariable", - "spec": { - "allowCustomValue": true, + "sort": 1, + "type": "query" + }, + { "current": { "text": "10", "value": "10" }, - "hide": "dontHide", "includeAll": false, "label": "Top", - "multi": false, "name": "limit", - "options": [], + "options": [ + { + "selected": false, + "text": "5", + "value": "5" + }, + { + "selected": true, + "text": "10", + "value": "10" + }, + { + "selected": false, + "text": "20", + "value": "20" + }, + { + "selected": false, + "text": "30", + "value": "30" + }, + { + "selected": false, + "text": "40", + "value": "40" + }, + { + "selected": false, + "text": "50", + "value": "50" + } + ], "query": "5, 10, 20, 30, 40, 50", - "skipUrlSync": false, - "valuesFormat": "csv" - } - }, - { - "kind": "CustomVariable", - "spec": { - "allowCustomValue": true, + "type": "custom" + }, + { "current": { "text": "500", "value": "500" }, - "hide": "dontHide", "includeAll": false, "label": "Table Limit", - "multi": false, "name": "table_limit", - "options": [], + "options": [ + { + "selected": false, + "text": "10", + "value": "10" + }, + { + "selected": false, + "text": "50", + "value": "50" + }, + { + "selected": false, + "text": "100", + "value": "100" + }, + { + "selected": true, + "text": "500", + "value": "500" + }, + { + "selected": false, + "text": "1000", + "value": "1000" + }, + { + "selected": false, + "text": "2000", + "value": "2000" + }, + { + "selected": false, + "text": "5000", + "value": "5000" + } + ], "query": "10,50,100,500,1000,2000,5000", - "skipUrlSync": false, - "valuesFormat": "csv" - } - }, - { - "kind": "QueryVariable", - "spec": { + "type": "custom" + }, + { "allValue": ".*", - "allowCustomValue": true, "current": { "text": "All", "value": [ "$__all" ] }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, "definition": "label_values(ma_pg_connection_by_role{namespace=\"$namespace\", cluster=~\"$cluster\"},usename)", - "hide": "dontHide", "includeAll": true, "label": "Role Name", "multi": true, "name": "usename", "options": [], "query": { - "datasource": { - "name": "${datasource}" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "query": "label_values(ma_pg_connection_by_role{namespace=\"$namespace\", cluster=~\"$cluster\"},usename)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "version": "v0" + "query": "label_values(ma_pg_connection_by_role{namespace=\"$namespace\", cluster=~\"$cluster\"},usename)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "refresh": "onTimeRangeChanged", + "refresh": 2, "regex": "", - "regexApplyTo": "value", - "skipUrlSync": false, - "sort": "disabled" - } - }, - { - "kind": "CustomVariable", - "spec": { - "allowCustomValue": true, + "type": "query" + }, + { "current": { "text": "calls", "value": "calls" }, - "hide": "dontHide", "includeAll": false, "label": "Top By Column", - "multi": false, "name": "column", - "options": [], + "options": [ + { + "selected": true, + "text": "calls", + "value": "calls" + }, + { + "selected": false, + "text": "max_time", + "value": "max_time" + }, + { + "selected": false, + "text": "min_time", + "value": "min_time" + }, + { + "selected": false, + "text": "mean_time", + "value": "mean_time" + }, + { + "selected": false, + "text": "total_time", + "value": "total_time" + } + ], "query": "calls, max_time, min_time, mean_time, total_time", - "skipUrlSync": false, - "valuesFormat": "csv" - } - }, - { - "kind": "QueryVariable", - "spec": { - "allowCustomValue": true, + "type": "custom" + }, + { "current": { "text": "All", "value": [ "$__all" ] }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, "definition": "query_result(topk($limit, sum by (relid, datname, relname) (last_over_time(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}[$__range:]))))", - "hide": "hideVariable", + "hide": 2, "includeAll": true, "multi": true, "name": "top_tables_by_size", "options": [], "query": { - "datasource": { - "name": "${datasource}" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "query": "query_result(topk($limit, sum by (relid, datname, relname) (last_over_time(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}[$__range:]))))", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "version": "v0" + "query": "query_result(topk($limit, sum by (relid, datname, relname) (last_over_time(ma_pg_table_size_by_db{namespace=\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}[$__range:]))))", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "refresh": "onDashboardLoad", + "refresh": 1, "regex": ".*relname=\"(.*)\".*", - "regexApplyTo": "value", - "skipUrlSync": false, - "sort": "disabled" - } - }, - { - "kind": "QueryVariable", - "spec": { - "allowCustomValue": false, - "current": { - "text": "All", - "value": [ - "$__all" - ] - }, - "definition": "label_values(ma_pg_default_partition_size_bytes{datname=~\"$datname\"},relname)", - "hide": "dontHide", - "includeAll": true, - "multi": true, - "name": "relname", - "options": [], - "query": { - "datasource": { - "name": "PC3E95692D54ABCC0" - }, - "group": "prometheus", - "kind": "DataQuery", - "spec": { - "qryType": 1, - "query": "label_values(ma_pg_default_partition_size_bytes{datname=~\"$datname\"},relname)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "version": "v0" - }, - "refresh": "onDashboardLoad", - "regex": "", - "regexApplyTo": "value", - "skipUrlSync": false, - "sort": "alphabeticalAsc" + "type": "query" } - } - ] + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "PostgreSQL Cluster Prometheus", + "uid": "bc9f739dee3fe919d1a280c6e2bbea5255ec26ff", + "version": 12, + "weekStart": "" } \ No newline at end of file From aa44b4361ac9df513e98d5d7f088d381ac7070db Mon Sep 17 00:00:00 2001 From: svetychkina Date: Thu, 1 Oct 2026 12:29:58 +0500 Subject: [PATCH 12/13] feat: [CPCAP-12620] Add a relname variable to the dashboard --- .../monitoring/grafana-dashboard.json | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/operator/charts/patroni-services/monitoring/grafana-dashboard.json b/operator/charts/patroni-services/monitoring/grafana-dashboard.json index e39bc471..ba3c079e 100644 --- a/operator/charts/patroni-services/monitoring/grafana-dashboard.json +++ b/operator/charts/patroni-services/monitoring/grafana-dashboard.json @@ -9430,6 +9430,33 @@ "sort": 1, "type": "query" }, + { + "allValue": ".*", + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(ma_pg_default_partition_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}, relname)", + "includeAll": true, + "label": "Partition Name", + "multi": true, + "name": "relname", + "options": [], + "query": { + "query": "label_values(ma_pg_default_partition_size_bytes{namespace=~\"$namespace\", datname=~\"$datname\", cluster=~\"$cluster\"}, relname)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 2, + "regex": "", + "sort": 1, + "type": "query" + }, { "current": { "text": "10", From 3b1441f7a6d1fc6cc1fc99c9c0cc875e7c7becdd Mon Sep 17 00:00:00 2001 From: svetychkina Date: Thu, 1 Oct 2026 15:07:33 +0500 Subject: [PATCH 13/13] feat: [CPCAP-12620] polishing --- .../charts/patroni-services/monitoring/grafana-dashboard.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operator/charts/patroni-services/monitoring/grafana-dashboard.json b/operator/charts/patroni-services/monitoring/grafana-dashboard.json index ba3c079e..23982723 100644 --- a/operator/charts/patroni-services/monitoring/grafana-dashboard.json +++ b/operator/charts/patroni-services/monitoring/grafana-dashboard.json @@ -58,7 +58,7 @@ ], "panels": [ { - "collapsed": true, + "collapsed": false, "gridPos": { "h": 1, "w": 24, @@ -1825,7 +1825,7 @@ "type": "row" }, { - "collapsed": false, + "collapsed": true, "gridPos": { "h": 1, "w": 24,