From 1e453d38565449ca8c31ffe95ebb3f1282ce09be Mon Sep 17 00:00:00 2001 From: Bill Franklin Date: Mon, 14 Oct 2024 20:27:38 +0100 Subject: [PATCH] Update Grafana dashboards to latest spec These Grafana dashboards needed fixes in order to work in the latest versions of Grafana. Changes: - Fixed variable syntax, from `[[cluster]]` to $cluster - Fixed template config format - Removed references to a hard-coded uid:PROMETHEUS datasource --- .../grafana/dashboards/pgbackrest.json | 1018 +++++---- .../grafana/dashboards/pod_details.json | 1813 ++++++++++------- .../dashboards/postgresql_details.json | 1269 ++++++------ .../dashboards/postgresql_overview.json | 132 +- .../dashboards/postgresql_service_health.json | 768 ++++--- .../grafana/dashboards/prometheus_alerts.json | 272 ++- .../grafana/dashboards/query_statistics.json | 479 +++-- 7 files changed, 3114 insertions(+), 2637 deletions(-) diff --git a/kustomize/monitoring/grafana/dashboards/pgbackrest.json b/kustomize/monitoring/grafana/dashboards/pgbackrest.json index d50f5c31..34f5b388 100644 --- a/kustomize/monitoring/grafana/dashboards/pgbackrest.json +++ b/kustomize/monitoring/grafana/dashboards/pgbackrest.json @@ -1,45 +1,12 @@ { - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "PROMETHEUS", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - } - ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -48,11 +15,10 @@ } ] }, - "editable": false, - "gnetId": null, + "editable": true, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": null, - "iteration": 1625069660860, + "id": 113, "links": [ { "asDropdown": false, @@ -68,13 +34,11 @@ ], "panels": [ { - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -101,6 +65,7 @@ "graphMode": "area", "justifyMode": "auto", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "last" @@ -108,15 +73,20 @@ "fields": "/^Value$/", "values": false }, + "showPercentChange": false, "text": { "valueSize": 45 }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "time()-ccp_backrest_oldest_full_backup_time_seconds{pg_cluster=\"[[cluster]]\", role=\"master\"}", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "time()-ccp_backrest_oldest_full_backup_time_seconds{pg_cluster=\"$cluster\", role=\"master\"}", "format": "table", "instant": true, "interval": "", @@ -128,66 +98,181 @@ "type": "stat" }, { - "aliasColors": { - "Differential": "dark-blue", - "Differential Backup": "dark-blue", - "Full": "dark-green", - "Full Backup": "dark-green", - "Incremental": "light-blue", - "Incremental Backup": "light-blue" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Differential" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Differential Backup" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Full" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Full Backup" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Incremental" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Incremental Backup" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 3 }, - "hiddenSeries": false, "id": 2, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": false + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "min(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\", role=\"master\"}) without(deployment,instance,ip,pod)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "min(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"$cluster\", role=\"master\"}) without(deployment,instance,ip,pod)", "format": "time_series", "instant": false, "interval": "", @@ -196,128 +281,170 @@ "refId": "A" }, { - "expr": "min(ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\", role=\"master\"}) without(deployment, instance,ip,pod)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "min(ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"$cluster\", role=\"master\"}) without(deployment, instance,ip,pod)", "hide": false, "interval": "", "legendFormat": "Differential Backup", "refId": "B" }, { - "expr": "min(ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\", role=\"master\"}) without(deployment, instance,ip,pod)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "min(ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"$cluster\", role=\"master\"}) without(deployment, instance,ip,pod)", "hide": false, "interval": "", "legendFormat": "Full Backup", "refId": "C" }, { - "expr": "min(ccp_archive_command_status_seconds_since_last_archive{pg_cluster=\"[[cluster]]\", role=\"master\"}) without(deployment, instance,ip,pod)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "min(ccp_archive_command_status_seconds_since_last_archive{pg_cluster=\"$cluster\", role=\"master\"}) without(deployment, instance,ip,pod)", "hide": false, "interval": "", "legendFormat": "WAL Archive", "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Time Since", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Differential": "dark-blue", - "Full": "dark-green", - "Incremental": "light-blue" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Differential" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Full" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Incremental" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 3 }, - "hiddenSeries": false, "id": 4, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "min(ccp_backrest_last_info_backup_runtime_seconds{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"incr\"}) without (deployment,instance,pod,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "min(ccp_backrest_last_info_backup_runtime_seconds{pg_cluster=\"$cluster\", role=\"master\", backup_type=\"incr\"}) without (deployment,instance,pod,ip)", "format": "time_series", "instant": false, "interval": "", @@ -326,122 +453,161 @@ "refId": "A" }, { - "expr": "min(ccp_backrest_last_info_backup_runtime_seconds{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"diff\"}) without (deployment,instance,pod,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "min(ccp_backrest_last_info_backup_runtime_seconds{pg_cluster=\"$cluster\", role=\"master\", backup_type=\"diff\"}) without (deployment,instance,pod,ip)", "hide": false, "interval": "", "legendFormat": "Differential", "refId": "B" }, { - "expr": "min(ccp_backrest_last_info_backup_runtime_seconds{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"full\"}) without (deployment,instance,pod,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "min(ccp_backrest_last_info_backup_runtime_seconds{pg_cluster=\"$cluster\", role=\"master\", backup_type=\"full\"}) without (deployment,instance,pod,ip)", "hide": false, "interval": "", "legendFormat": "Full", "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Backup Runtimes", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 2, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Differential": "dark-blue", - "Full": "dark-green", - "Incremental": "light-blue" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Differential" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Full" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Incremental" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 10 }, - "hiddenSeries": false, "id": 5, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "min(ccp_backrest_last_info_repo_backup_size_bytes{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"incr\"}) without (deployment, instance,pod,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "min(ccp_backrest_last_info_repo_backup_size_bytes{pg_cluster=\"$cluster\", role=\"master\", backup_type=\"incr\"}) without (deployment, instance,pod,ip)", "format": "time_series", "instant": false, "interval": "", @@ -450,125 +616,207 @@ "refId": "A" }, { - "expr": "min(ccp_backrest_last_info_repo_backup_size_bytes{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"diff\"}) without (deployment,instance,pod,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "min(ccp_backrest_last_info_repo_backup_size_bytes{pg_cluster=\"$cluster\", role=\"master\", backup_type=\"diff\"}) without (deployment,instance,pod,ip)", "hide": false, "interval": "", "legendFormat": "Differential", "refId": "B" }, { - "expr": "min(ccp_backrest_last_info_repo_backup_size_bytes{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"full\"}) without (deployment,instance,pod,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "min(ccp_backrest_last_info_repo_backup_size_bytes{pg_cluster=\"$cluster\", role=\"master\", backup_type=\"full\"}) without (deployment,instance,pod,ip)", "hide": false, "interval": "", "legendFormat": "Full", "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Backup Size", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 2, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Archive age": "blue", - "Archive count": "green", - "Differential": "dark-blue", - "Failed count": "red", - "Full": "dark-green", - "Incremental": "light-blue" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 30, + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Archive age" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Archive count" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Differential" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Failed count" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Full" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Incremental" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 3, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 10 }, - "hiddenSeries": false, "id": 6, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "avg(idelta(ccp_archive_command_status_failed_count{pg_cluster=\"[[cluster]]\", role=\"master\"}[1m])) without (instance,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(idelta(ccp_archive_command_status_failed_count{pg_cluster=\"$cluster\", role=\"master\"}[1m])) without (instance,ip)", "format": "time_series", "instant": false, "interval": "", @@ -577,89 +825,50 @@ "refId": "A" }, { - "expr": "avg(idelta(ccp_archive_command_status_archived_count{pg_cluster=\"[[cluster]]\", role=\"master\"}[1m])) without (instance,pod, ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(idelta(ccp_archive_command_status_archived_count{pg_cluster=\"$cluster\", role=\"master\"}[1m])) without (instance,pod, ip)", "hide": false, "interval": "", "legendFormat": "Archive count", "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "WAL Stats", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "5m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], "templating": { "list": [ { - "allValue": null, - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values(pg_cluster)", - "description": null, - "error": null, - "hide": 0, + "allValue": "", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(pg_static,pg_cluster)", + "hide": 1, "includeAll": false, "label": "cluster", "multi": false, "name": "cluster", "options": [], "query": { - "query": "label_values(pg_cluster)", - "refId": "PROMETHEUS-cluster-Variable-Query" + "qryType": 1, + "query": "label_values(pg_static,pg_cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" } ] }, @@ -683,5 +892,6 @@ "timezone": "browser", "title": "pgBackRest", "uid": "2fcFZ6PGk", - "version": 1 -} + "version": 5, + "weekStart": "" +} \ No newline at end of file diff --git a/kustomize/monitoring/grafana/dashboards/pod_details.json b/kustomize/monitoring/grafana/dashboards/pod_details.json index 8ce6d395..d5cd4725 100644 --- a/kustomize/monitoring/grafana/dashboards/pod_details.json +++ b/kustomize/monitoring/grafana/dashboards/pod_details.json @@ -1,39 +1,12 @@ { - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "PROMETHEUS", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - } - ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -42,11 +15,10 @@ } ] }, - "editable": false, - "gnetId": null, + "editable": true, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": null, - "iteration": 1625069717503, + "id": 114, "links": [ { "icon": "external link", @@ -60,71 +32,159 @@ ], "panels": [ { - "aliasColors": { - "% Throttled": "yellow", - "% Used": "blue", - "Limit": "red", - "Process count": "blue" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "color": {}, - "custom": {}, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Percent", + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, "thresholds": { "mode": "absolute", "steps": [] }, "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "% Throttled" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "% Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Process count" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + } + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 11, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Limit", - "dashes": true - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "avg((idelta(ccp_nodemx_cpuacct_usage{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[30s])/1000000000)/idelta(ccp_nodemx_cpuacct_usage_ts{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[30s])*100) without(instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg((idelta(ccp_nodemx_cpuacct_usage{pg_cluster=\"$cluster\",pod=\"$pod\"}[30s])/1000000000)/idelta(ccp_nodemx_cpuacct_usage_ts{pg_cluster=\"$cluster\",pod=\"$pod\"}[30s])*100) without(instance,ip,role)", "format": "time_series", "hide": false, "interval": "", @@ -133,7 +193,10 @@ "refId": "A" }, { - "expr": "avg((ccp_nodemx_cpucfs_quota_us{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}*100/ccp_nodemx_cpucfs_period_us{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"})) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg((ccp_nodemx_cpucfs_quota_us{pg_cluster=\"$cluster\",pod=\"$pod\"}*100/ccp_nodemx_cpucfs_period_us{pg_cluster=\"$cluster\",pod=\"$pod\"})) without (instance,ip,role)", "format": "time_series", "hide": false, "interval": "", @@ -142,118 +205,179 @@ "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "CPU usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "Percent", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": "Process count", - "logBase": 1, - "max": null, - "min": "0", - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "% Throttled": "yellow", - "% Used": "blue", - "Limit": "red", - "Process count": "blue" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "color": {}, - "custom": {}, + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, "thresholds": { "mode": "absolute", "steps": [] }, "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "% Throttled" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "% Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Process count" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Process count" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisLabel", + "value": "Process count" + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 8, "y": 0 }, - "hiddenSeries": false, "id": 15, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Limit", - "dashes": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - { - "alias": "Process count", - "yaxis": 2 + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "7.4.5", "targets": [ { - "expr": "avg(ccp_nodemx_process_count{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_process_count{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "hide": false, "interval": "", @@ -262,7 +386,10 @@ "refId": "B" }, { - "expr": "avg((idelta(ccp_nodemx_cpustat_throttled_time{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[30s])/1000000000)/idelta(ccp_nodemx_cpustat_snap_ts{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[30s])*100) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg((idelta(ccp_nodemx_cpustat_throttled_time{pg_cluster=\"$cluster\",pod=\"$pod\"}[30s])/1000000000)/idelta(ccp_nodemx_cpustat_snap_ts{pg_cluster=\"$cluster\",pod=\"$pod\"}[30s])*100) without (instance,ip,role)", "format": "time_series", "hide": false, "interval": "", @@ -271,113 +398,190 @@ "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "CPU Throttle", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": "Process count", - "logBase": 1, - "max": null, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Inactive anon": "super-light-purple", - "Limit": "red", - "Mem free": "green", - "Request": "blue" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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": "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 + } + ] + }, + "unit": "bytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Inactive anon" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Mem free" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Request" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Request" + }, + "properties": [ + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + } + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 16, "y": 0 }, - "hiddenSeries": false, "id": 6, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Limit", - "dashes": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - { - "alias": "Request", - "dashes": true + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "7.4.5", "targets": [ { - "expr": "avg(ccp_nodemx_mem_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_limit{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -385,7 +589,10 @@ "refId": "A" }, { - "expr": "avg(ccp_nodemx_mem_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_request{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -393,7 +600,10 @@ "refId": "B" }, { - "expr": "avg(ccp_nodemx_mem_usage_in_bytes{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_usage_in_bytes{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -401,7 +611,10 @@ "refId": "J" }, { - "expr": "avg(clamp_min((ccp_nodemx_mem_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"} - ccp_nodemx_mem_usage_in_bytes{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}),0)) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(clamp_min((ccp_nodemx_mem_limit{pg_cluster=\"$cluster\",pod=\"$pod\"} - ccp_nodemx_mem_usage_in_bytes{pg_cluster=\"$cluster\",pod=\"$pod\"}),0)) without (instance,ip,role)", "format": "time_series", "hide": false, "interval": "", @@ -410,103 +623,106 @@ "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Memory", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/tx bytes/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 0, "y": 6 }, - "hiddenSeries": false, "id": 8, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/tx bytes/", - "transform": "negative-Y" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "avg(rate(ccp_nodemx_network_rx_bytes{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\", interface!=\"tunl0\"}[1m])) without(instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(rate(ccp_nodemx_network_rx_bytes{pg_cluster=\"$cluster\",pod=\"$pod\", interface!=\"tunl0\"}[1m])) without(instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -514,7 +730,10 @@ "refId": "A" }, { - "expr": "avg(rate(ccp_nodemx_network_tx_bytes{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\", interface!=\"tunl0\"}[1m])) without(instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(rate(ccp_nodemx_network_tx_bytes{pg_cluster=\"$cluster\",pod=\"$pod\", interface!=\"tunl0\"}[1m])) without(instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -522,98 +741,95 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Network", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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" + } + }, + "links": [], + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 8, "y": 6 }, - "hiddenSeries": false, "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "avg((ccp_nodemx_data_disk_total_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}-ccp_nodemx_data_disk_available_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})*100/ccp_nodemx_data_disk_total_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg((ccp_nodemx_data_disk_total_bytes{pg_cluster=\"$cluster\",pod=~\"$pod\"}-ccp_nodemx_data_disk_available_bytes{pg_cluster=\"$cluster\",pod=~\"$pod\"})*100/ccp_nodemx_data_disk_total_bytes{pg_cluster=\"$cluster\",pod=~\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -621,7 +837,10 @@ "refId": "A" }, { - "expr": "avg((ccp_nodemx_data_disk_total_file_nodes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}-ccp_nodemx_data_disk_free_file_nodes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})*100/ccp_nodemx_data_disk_total_file_nodes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) without(instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg((ccp_nodemx_data_disk_total_file_nodes{pg_cluster=\"$cluster\",pod=~\"$pod\"}-ccp_nodemx_data_disk_free_file_nodes{pg_cluster=\"$cluster\",pod=~\"$pod\"})*100/ccp_nodemx_data_disk_total_file_nodes{pg_cluster=\"$cluster\",pod=~\"$pod\"}) without(instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -629,103 +848,106 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Disk Usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": "100", - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Reads/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 16, "y": 6 }, - "hiddenSeries": false, "id": 12, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/Reads/", - "transform": "negative-Y" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "avg(rate(ccp_nodemx_disk_activity_sectors_read{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m])*512) without(instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(rate(ccp_nodemx_disk_activity_sectors_read{pg_cluster=\"$cluster\",pod=\"$pod\"}[1m])*512) without(instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -733,7 +955,10 @@ "refId": "A" }, { - "expr": "avg(rate(ccp_nodemx_disk_activity_sectors_written{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m])*512) without(instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(rate(ccp_nodemx_disk_activity_sectors_written{pg_cluster=\"$cluster\",pod=\"$pod\"}[1m])*512) without(instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -741,105 +966,140 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Disk Activity", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Inactive anon": "super-light-purple", - "Limit": "red", - "Request": "green" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Inactive anon" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Request" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 12 }, - "hiddenSeries": false, "id": 14, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "avg(ccp_nodemx_mem_cache{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_cache{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -847,7 +1107,10 @@ "refId": "C" }, { - "expr": "avg(ccp_nodemx_mem_dirty{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_dirty{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -855,7 +1118,10 @@ "refId": "D" }, { - "expr": "avg(ccp_nodemx_mem_shmem{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_shmem{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -863,7 +1129,10 @@ "refId": "E" }, { - "expr": "avg(ccp_nodemx_mem_rss{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_rss{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -871,7 +1140,10 @@ "refId": "F" }, { - "expr": "avg(ccp_nodemx_mem_mapped_file{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_mapped_file{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -879,7 +1151,10 @@ "refId": "G" }, { - "expr": "avg(ccp_nodemx_mem_kmem_usage_in_bytes{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_kmem_usage_in_bytes{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -887,7 +1162,10 @@ "refId": "H" }, { - "expr": "avg(ccp_nodemx_mem_inactive_anon{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_inactive_anon{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -895,7 +1173,10 @@ "refId": "I" }, { - "expr": "avg(ccp_nodemx_mem_active_file{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_active_file{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -903,7 +1184,10 @@ "refId": "J" }, { - "expr": "avg(ccp_nodemx_mem_inactive_file{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_inactive_file{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -911,112 +1195,195 @@ "refId": "K" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Memory Breakdown", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "CPU limit": "red", - "CPU request": "blue", - "Memory limit": "dark-red", - "Memory request": "dark-green" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Memory", + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "CPU limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU request" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Memory limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Memory request" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU request" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisLabel", + "value": "CPU (millicores)" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU limit" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisLabel", + "value": "CPU (millicores)" + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 12 }, - "hiddenSeries": false, "id": 13, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "CPU request", - "yaxis": 2 + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - { - "alias": "CPU limit", - "yaxis": 2 + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "7.4.5", "targets": [ { - "expr": "avg(ccp_nodemx_cpu_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_cpu_limit{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -1024,7 +1391,10 @@ "refId": "A" }, { - "expr": "avg(ccp_nodemx_cpu_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_cpu_request{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -1032,7 +1402,10 @@ "refId": "B" }, { - "expr": "avg(ccp_nodemx_mem_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_limit{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -1040,7 +1413,10 @@ "refId": "C" }, { - "expr": "avg(ccp_nodemx_mem_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_nodemx_mem_request{pg_cluster=\"$cluster\",pod=\"$pod\"}) without (instance,ip,role)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -1048,63 +1424,23 @@ "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Container resources", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "Memory", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": "CPU (millicores)", - "logBase": 1, - "max": null, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "5s", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], "templating": { "list": [ { - "allValue": null, - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values(pg_cluster)", - "description": null, - "error": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(pg_static,pg_cluster)", "hide": 0, "includeAll": false, "label": "cluster", @@ -1112,26 +1448,27 @@ "name": "cluster", "options": [], "query": { - "query": "label_values(pg_cluster)", - "refId": "PROMETHEUS-cluster-Variable-Query" + "qryType": 1, + "query": "label_values(pg_static,pg_cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" }, { - "allValue": null, - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)", - "description": null, - "error": null, + "current": { + "selected": false, + "text": "pg-instance1-hlvx-0", + "value": "pg-instance1-hlvx-0" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(ccp_nodemx_cpuacct_usage,pod)", "hide": 0, "includeAll": false, "label": "pod", @@ -1139,18 +1476,15 @@ "name": "pod", "options": [], "query": { - "query": "label_values({pg_cluster=\"[[cluster]]\"},pod)", - "refId": "PROMETHEUS-pod-Variable-Query" + "qryType": 1, + "query": "label_values(ccp_nodemx_cpuacct_usage,pod)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "refresh": 1, + "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" } ] }, @@ -1174,5 +1508,6 @@ "timezone": "browser", "title": "Pod Details", "uid": "4auP6Mk7k", - "version": 1 -} + "version": 3, + "weekStart": "" +} \ No newline at end of file diff --git a/kustomize/monitoring/grafana/dashboards/postgresql_details.json b/kustomize/monitoring/grafana/dashboards/postgresql_details.json index 548b973b..b9e9b474 100644 --- a/kustomize/monitoring/grafana/dashboards/postgresql_details.json +++ b/kustomize/monitoring/grafana/dashboards/postgresql_details.json @@ -1,51 +1,12 @@ { - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "PROMETHEUS", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - } - ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -54,11 +15,10 @@ } ] }, - "editable": false, - "gnetId": null, + "editable": true, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": null, - "iteration": 1625069813048, + "id": 115, "links": [ { "asDropdown": false, @@ -74,14 +34,11 @@ ], "panels": [ { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "links": [ { "title": "pgBackrest", @@ -90,11 +47,13 @@ ], "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -125,7 +84,6 @@ "y": 0 }, "id": 27, - "interval": null, "links": [ { "title": "pgBackRest", @@ -138,6 +96,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "min" @@ -145,13 +104,18 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "min(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} < ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} < ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"}) ", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "min(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"$cluster\"} < ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"$cluster\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"$cluster\"} < ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"$cluster\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"$cluster\"}) ", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -159,27 +123,24 @@ "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "[[cluster]] : Backup Status", + "title": "$cluster : Backup Status", "type": "stat" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 100, @@ -212,10 +173,10 @@ "y": 2 }, "id": 8, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -226,12 +187,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "sum(pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\", state=\"active\"})*100 /sum(pg_settings_max_connections{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(pg_stat_activity_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\", state=\"active\"})*100 /sum(pg_settings_max_connections{pg_cluster=\"$cluster\",pod=~\"$pod\"})", "format": "time_series", "hide": false, "instant": true, @@ -247,21 +212,20 @@ "type": "gauge" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 100, @@ -294,10 +258,10 @@ "y": 2 }, "id": 2, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -308,12 +272,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "sum(pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle in transaction\"})/sum(pg_settings_max_connections{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(pg_stat_activity_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\",state=\"idle in transaction\"})/sum(pg_settings_max_connections{pg_cluster=\"$cluster\",pod=~\"$pod\"})", "format": "time_series", "instant": true, "interval": "", @@ -326,22 +294,21 @@ "type": "gauge" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 1200, @@ -374,10 +341,10 @@ "y": 2 }, "id": 34, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -388,12 +355,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "max(abs(ccp_connection_stats_max_idle_in_txn_time{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "max(abs(ccp_connection_stats_max_idle_in_txn_time{pg_cluster=\"$cluster\",pod=~\"$pod\"}))", "format": "time_series", "instant": true, "interval": "", @@ -406,21 +377,20 @@ "type": "gauge" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 100, @@ -453,10 +423,10 @@ "y": 2 }, "id": 3, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -467,12 +437,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "sum(pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle\"})*100/sum(pg_settings_max_connections{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(pg_stat_activity_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\",state=\"idle\"})*100/sum(pg_settings_max_connections{pg_cluster=\"$cluster\",pod=~\"$pod\"})", "format": "time_series", "instant": true, "interval": "", @@ -487,21 +461,20 @@ "type": "gauge" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 100, @@ -534,10 +507,10 @@ "y": 2 }, "id": 32, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -548,12 +521,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "max(ccp_transaction_wraparound_percent_towards_wraparound{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "max(ccp_transaction_wraparound_percent_towards_wraparound{pg_cluster=\"$cluster\",pod=~\"$pod\"})", "format": "time_series", "instant": true, "interval": "", @@ -568,22 +545,21 @@ "type": "gauge" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 100, @@ -616,10 +592,10 @@ "y": 2 }, "id": 33, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -630,12 +606,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "sum(ccp_stat_database_blks_hit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})*100/sum(ccp_stat_database_blks_hit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}+ccp_stat_database_blks_read{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(ccp_stat_database_blks_hit{pg_cluster=\"$cluster\",pod=~\"$pod\"})*100/sum(ccp_stat_database_blks_hit{pg_cluster=\"$cluster\",pod=~\"$pod\"}+ccp_stat_database_blks_read{pg_cluster=\"$cluster\",pod=~\"$pod\"})", "format": "time_series", "instant": true, "interval": "", @@ -650,58 +630,91 @@ "type": "gauge" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 7 }, - "hiddenSeries": false, "id": 24, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "sum(irate(ccp_stat_database_xact_commit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m])) + sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_stat_database_xact_commit{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m])) + sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m]))", "format": "time_series", "hide": false, "interval": "", @@ -712,7 +725,10 @@ "step": 2 }, { - "expr": "sum(irate(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m]))", "format": "time_series", "hide": false, "interval": "", @@ -723,100 +739,95 @@ "step": 2 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Activity - [[pod]]-[[datname]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Activity - $pod-$datname", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 7 }, - "hiddenSeries": false, "id": 26, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\",state=\"idle\"})", "format": "time_series", "hide": false, "interval": "", @@ -827,7 +838,10 @@ "step": 2 }, { - "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle in transaction\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\",state=\"idle in transaction\"})", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -835,228 +849,257 @@ "refId": "B" }, { - "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"active\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\",state=\"active\"})", "format": "time_series", "intervalFactor": 1, "legendFormat": "active", "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Connections - [[pod]]-[[datname]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Connections - $pod-$datname", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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": { + "log": 2, + "type": "log" + }, + "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 + } + ] + }, + "unit": "decmbytes" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 13 }, - "hiddenSeries": false, "id": 12, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "sum(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})/(1024*1024)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(ccp_database_size_bytes{pg_cluster=\"$cluster\",pod=~\"$pod\"})/(1024*1024)", "format": "time_series", "hide": false, "intervalFactor": 2, - "legendFormat": "Total : [[cluster]]-[[pod]]", + "legendFormat": "Total : $cluster-$pod", "refId": "B" }, { - "expr": "ccp_database_size_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}/(1024*1024)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "ccp_database_size_bytes{pg_cluster=\"$cluster\",pod=~\"$pod\",dbname=~\"$datname\"}/(1024*1024)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{dbname}} ({{pod}})", "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "database size - [[pod]]-[[datname]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "decmbytes", - "label": null, - "logBase": 2, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "database size - $pod-$datname", + "type": "timeseries" }, { - "aliasColors": { - "Max: ccp_monitoring(postgres)": "red" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] + "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" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max: ccp_monitoring(postgres)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/Max:/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#FF9830", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/Avg:/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#5794F2", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 13 }, - "hiddenSeries": false, "id": 31, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/Max:/", - "color": "#FF9830" - }, - { - "alias": "/Avg:/", - "color": "#5794F2" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "max(ccp_pg_stat_statements_total_mean_exec_time_ms{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\", dbname=~\"[[datname]]\"}) without (instance,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "max(ccp_pg_stat_statements_total_mean_exec_time_ms{pg_cluster=\"$cluster\",pod=~\"$pod\", dbname=~\"$datname\"}) without (instance,ip)", "format": "time_series", "hide": false, "interval": "", @@ -1067,7 +1110,10 @@ "step": 2 }, { - "expr": "max(ccp_pg_stat_statements_top_max_exec_time_ms{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}) without (instance,ip,query,queryid)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "max(ccp_pg_stat_statements_top_max_exec_time_ms{pg_cluster=\"$cluster\",pod=~\"$pod\",dbname=~\"$datname\"}) without (instance,ip,query,queryid)", "format": "time_series", "hide": false, "interval": "", @@ -1078,53 +1124,15 @@ "step": 2 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Query Duration - [[pod]]-[[datname]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Query Duration - $pod-$datname", + "type": "timeseries" }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "custom": {}, @@ -1172,7 +1180,10 @@ "steppedLine": false, "targets": [ { - "expr": "sum(irate(ccp_stat_database_tup_fetched{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_stat_database_tup_fetched{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m]))", "format": "time_series", "hide": false, "interval": "", @@ -1183,7 +1194,10 @@ "step": 2 }, { - "expr": "sum(irate(ccp_stat_database_tup_inserted{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_stat_database_tup_inserted{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m]))", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -1193,7 +1207,10 @@ "step": 2 }, { - "expr": "sum(irate(ccp_stat_database_tup_updated{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_stat_database_tup_updated{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m]))", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -1203,7 +1220,10 @@ "step": 2 }, { - "expr": "sum(irate(ccp_stat_database_tup_deleted{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_stat_database_tup_deleted{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "Deleted", @@ -1212,7 +1232,10 @@ "step": 2 }, { - "expr": "sum(irate(ccp_stat_database_tup_returned{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_stat_database_tup_returned{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m]))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -1223,52 +1246,42 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Row activity - [[pod]]-[[datname]]", + "title": "Row activity - $pod-$datname", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", - "label": null, "logBase": 2, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "custom": {}, @@ -1300,7 +1313,6 @@ }, "lines": true, "linewidth": 1, - "links": [], "nullPointMode": "null", "options": { "alertThreshold": true @@ -1316,7 +1328,10 @@ "steppedLine": false, "targets": [ { - "expr": "ccp_wal_activity_total_size_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}/(1024*1024)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "ccp_wal_activity_total_size_bytes{pg_cluster=\"$cluster\",pod=~\"$pod\"}/(1024*1024)", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -1325,52 +1340,41 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "WAL size MB - [[cluster]]-[[pod]]", + "title": "WAL size MB - $cluster-$pod", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "decmbytes", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "custom": {}, @@ -1402,7 +1406,6 @@ }, "lines": true, "linewidth": 1, - "links": [], "nullPointMode": "null", "options": { "alertThreshold": true @@ -1435,7 +1438,10 @@ "steppedLine": false, "targets": [ { - "expr": "sum(rate(ccp_stat_database_deadlocks{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(rate(ccp_stat_database_deadlocks{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m]))", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -1445,7 +1451,10 @@ "step": 2 }, { - "expr": "sum(rate(ccp_stat_database_conflicts{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(rate(ccp_stat_database_conflicts{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "DeadLocks", @@ -1454,7 +1463,10 @@ "step": 2 }, { - "expr": "sum(irate(ccp_stat_database_xact_commit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_stat_database_xact_commit{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m]))", "format": "time_series", "hide": false, "interval": "", @@ -1465,7 +1477,10 @@ "step": 2 }, { - "expr": "sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\"}[5m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\"}[5m]))", "format": "time_series", "hide": false, "interval": "", @@ -1477,52 +1492,42 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Key Counters - [[pod]] - [[datname]]", + "title": "Key Counters - $pod - $datname", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { @@ -1557,7 +1562,6 @@ }, "lines": true, "linewidth": 1, - "links": [], "nullPointMode": "null", "options": { "alertThreshold": true @@ -1578,8 +1582,11 @@ "steppedLine": false, "targets": [ { + "datasource": { + "uid": "PROMETHEUS" + }, "exemplar": false, - "expr": "ccp_replication_lag_size_bytes{pg_cluster=\"[[cluster]]\", role!=\"replica\"}", + "expr": "ccp_replication_lag_size_bytes{pg_cluster=\"$cluster\", role!=\"replica\"}", "format": "time_series", "hide": false, "instant": false, @@ -1589,7 +1596,10 @@ "refId": "B" }, { - "expr": "ccp_replication_lag_replay_time{pg_cluster=\"[[cluster]]\", role=\"replica\"}", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "ccp_replication_lag_replay_time{pg_cluster=\"$cluster\", role=\"replica\"}", "format": "time_series", "hide": false, "interval": "", @@ -1599,20 +1609,16 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Replication Lag - [[cluster]]", + "title": "Replication Lag - $cluster", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -1621,7 +1627,6 @@ "format": "short", "label": "Lag bytes", "logBase": 1, - "max": null, "min": 0, "show": true }, @@ -1629,22 +1634,20 @@ "format": "dtdhms", "label": "Lag time (hh:mm:ss)", "logBase": 1, - "max": null, "min": 0, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "custom": {}, @@ -1676,7 +1679,6 @@ }, "lines": true, "linewidth": 1, - "links": [], "nullPointMode": "null", "options": { "alertThreshold": true @@ -1692,7 +1694,10 @@ "steppedLine": false, "targets": [ { - "expr": "sum(ccp_stat_bgwriter_buffers_alloc{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(ccp_stat_bgwriter_buffers_alloc{pg_cluster=\"$cluster\",pod=~\"$pod\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "Allocated", @@ -1701,7 +1706,10 @@ "step": 2 }, { - "expr": "sum(ccp_stat_bgwriter_buffers_backend{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(ccp_stat_bgwriter_buffers_backend{pg_cluster=\"$cluster\",pod=~\"$pod\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "Backend", @@ -1710,7 +1718,10 @@ "step": 2 }, { - "expr": "sum(ccp_stat_bgwriter_buffers_backend_fsync{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(ccp_stat_bgwriter_buffers_backend_fsync{pg_cluster=\"$cluster\",pod=~\"$pod\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "FSync", @@ -1719,7 +1730,10 @@ "step": 2 }, { - "expr": "sum(ccp_stat_bgwriter_buffers_checkpoint{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(ccp_stat_bgwriter_buffers_checkpoint{pg_cluster=\"$cluster\",pod=~\"$pod\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "CheckPoint", @@ -1728,7 +1742,10 @@ "step": 2 }, { - "expr": "sum(ccp_stat_bgwriter_buffers_clean{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(ccp_stat_bgwriter_buffers_clean{pg_cluster=\"$cluster\",pod=~\"$pod\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "Clean", @@ -1738,52 +1755,42 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Buffers - [[pod]]", + "title": "Buffers - $pod", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "custom": {}, @@ -1815,7 +1822,6 @@ }, "lines": true, "linewidth": 1, - "links": [], "nullPointMode": "null", "options": { "alertThreshold": true @@ -1831,7 +1837,10 @@ "steppedLine": false, "targets": [ { - "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"accessexclusivelock\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\",mode=\"accessexclusivelock\"})", "format": "time_series", "hide": false, "interval": "", @@ -1841,7 +1850,10 @@ "step": 2 }, { - "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"exclusivelock\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\",mode=\"exclusivelock\"})", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -1850,7 +1862,10 @@ "step": 2 }, { - "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"rowexclusivelock\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\",mode=\"rowexclusivelock\"})", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -1859,7 +1874,10 @@ "step": 2 }, { - "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"sharerowexclusivelock\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\",mode=\"sharerowexclusivelock\"})", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -1868,7 +1886,10 @@ "step": 2 }, { - "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"shareupdateexclusivelock\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\",mode=\"shareupdateexclusivelock\"})", "format": "time_series", "hide": false, "intervalFactor": 2, @@ -1877,7 +1898,10 @@ "step": 2 }, { - "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",mode=\"accesssharelock\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"$cluster\",pod=~\"$pod\",datname=~\"$datname\",mode=\"accesssharelock\"})", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{mode}}", @@ -1885,52 +1909,42 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Locks - [[pod]]-[[datname]]", + "title": "Locks - $pod-$datname", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "custom": {}, @@ -1962,7 +1976,6 @@ }, "lines": true, "linewidth": 1, - "links": [], "nullPointMode": "null", "options": { "alertThreshold": true @@ -1978,7 +1991,10 @@ "steppedLine": false, "targets": [ { - "expr": "ccp_stat_database_blks_hit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\", dbname!~\"template0\", dbname!~\"template1\"}*100/(ccp_stat_database_blks_hit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\", dbname!~\"template0\", dbname!~\"template1\"} + ccp_stat_database_blks_read{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname!~\"template0\", dbname!~\"template1\"})", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "ccp_stat_database_blks_hit{pg_cluster=\"$cluster\",pod=~\"$pod\", dbname!~\"template0\", dbname!~\"template1\"}*100/(ccp_stat_database_blks_hit{pg_cluster=\"$cluster\",pod=~\"$pod\", dbname!~\"template0\", dbname!~\"template1\"} + ccp_stat_database_blks_read{pg_cluster=\"$cluster\",pod=~\"$pod\",dbname!~\"template0\", dbname!~\"template1\"})", "format": "time_series", "hide": false, "interval": "", @@ -1988,28 +2004,22 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Cache Hit Ratio - [[pod]]-[[datname]]", + "title": "Cache Hit Ratio - $pod-$datname", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "decimals": null, "format": "percent", - "label": null, "logBase": 1, "max": "100", "min": "0", @@ -2017,35 +2027,28 @@ }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], "refresh": "5s", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], "templating": { "list": [ { - "allFormat": "glob", - "allValue": null, - "current": {}, - "datasource": "PROMETHEUS", - "definition": "", - "description": null, - "error": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(pg_static,pg_cluster)", "hide": 0, "includeAll": false, "label": "cluster", @@ -2053,74 +2056,71 @@ "name": "cluster", "options": [], "query": { - "query": "label_values(pg_cluster)", - "refId": "PROMETHEUS-cluster-Variable-Query" + "qryType": 1, + "query": "label_values(pg_static,pg_cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "refresh": 1, + "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" }, { - "allFormat": "glob", - "allValue": ".*", - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values({pg_cluster=\"[[cluster]]\"},pod)", - "description": null, - "error": null, + "current": { + "selected": false, + "text": "pg-instance1-hlvx-0", + "value": "pg-instance1-hlvx-0" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"$cluster\"},pod)", "hide": 0, - "includeAll": true, + "includeAll": false, "label": "pod", - "multi": true, + "multi": false, "name": "pod", "options": [], "query": { - "query": "label_values({pg_cluster=\"[[cluster]]\"},pod)", - "refId": "PROMETHEUS-pod-Variable-Query" + "qryType": 1, + "query": "label_values(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"$cluster\"},pod)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 0, + "type": "query" }, { - "allFormat": "glob", - "allValue": ".*", - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values({pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"},dbname)", - "description": null, - "error": null, + "current": { + "selected": false, + "text": "postgres", + "value": "postgres" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(pg_stat_activity_count{pg_cluster=\"$cluster\", pod=\"$pod\"},datname)", "hide": 0, - "includeAll": true, + "includeAll": false, "label": "Database", - "multi": true, + "multi": false, "name": "datname", "options": [], "query": { - "query": "label_values({pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"},dbname)", - "refId": "PROMETHEUS-datname-Variable-Query" + "qryType": 1, + "query": "label_values(pg_stat_activity_count{pg_cluster=\"$cluster\", pod=\"$pod\"},datname)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "refresh": 1, + "refresh": 2, "regex": "", "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 0, + "type": "query" } ] }, @@ -2144,5 +2144,6 @@ "timezone": "browser", "title": "PostgreSQLDetails", "uid": "fMip0cuMk", - "version": 1 -} + "version": 3, + "weekStart": "" +} \ No newline at end of file diff --git a/kustomize/monitoring/grafana/dashboards/postgresql_overview.json b/kustomize/monitoring/grafana/dashboards/postgresql_overview.json index 61c2486f..3895625b 100644 --- a/kustomize/monitoring/grafana/dashboards/postgresql_overview.json +++ b/kustomize/monitoring/grafana/dashboards/postgresql_overview.json @@ -1,39 +1,12 @@ { - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "PROMETHEUS", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - } - ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -42,22 +15,18 @@ } ] }, - "editable": false, - "gnetId": null, + "editable": true, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": null, - "iteration": 1625069480601, + "id": 116, "links": [], "panels": [ { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "links": [ { "targetBlank": true, @@ -87,25 +56,34 @@ ], "mappings": [ { - "from": "0", - "id": 0, - "text": "DOWN", - "to": "99", - "type": 2 + "options": { + "from": 0, + "result": { + "text": "DOWN" + }, + "to": 99 + }, + "type": "range" }, { - "from": "100", - "id": 1, - "text": "Standalone Cluster", - "to": "199", - "type": 2 + "options": { + "from": 100, + "result": { + "text": "Standalone Cluster" + }, + "to": 199 + }, + "type": "range" }, { - "from": "200", - "id": 2, - "text": "HA CLUSTER", - "to": "1000", - "type": 2 + "options": { + "from": 200, + "result": { + "text": "HA CLUSTER" + }, + "to": 1000 + }, + "type": "range" } ], "thresholds": { @@ -131,13 +109,11 @@ }, "gridPos": { "h": 2, - "w": 12, + "w": 24, "x": 0, "y": 0 }, "id": 1, - "interval": null, - "links": [], "maxDataPoints": 100, "maxPerRow": 2, "options": { @@ -145,6 +121,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" @@ -152,12 +129,14 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": { "valueSize": 30 }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "repeat": "cluster", "repeatDirection": "h", "targets": [ @@ -178,38 +157,32 @@ } ], "refresh": "5m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { - "allFormat": "glob", - "allValue": null, - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values(pg_cluster)", - "description": null, - "error": null, - "hide": 1, - "includeAll": true, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(pg_static,pg_cluster)", + "hide": 0, + "includeAll": false, "label": "cluster", - "multi": true, + "multi": false, "name": "cluster", "options": [], "query": { - "query": "label_values(pg_cluster)", - "refId": "PROMETHEUS-cluster-Variable-Query" + "qryType": 1, + "query": "label_values(pg_static,pg_cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" } ] }, @@ -233,5 +206,6 @@ "timezone": "browser", "title": "PostgreSQL Overview", "uid": "D2X39SlGk", - "version": 1 -} + "version": 4, + "weekStart": "" +} \ No newline at end of file diff --git a/kustomize/monitoring/grafana/dashboards/postgresql_service_health.json b/kustomize/monitoring/grafana/dashboards/postgresql_service_health.json index 2bee1d0b..60116d9c 100644 --- a/kustomize/monitoring/grafana/dashboards/postgresql_service_health.json +++ b/kustomize/monitoring/grafana/dashboards/postgresql_service_health.json @@ -1,39 +1,12 @@ { - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "PROMETHEUS", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - } - ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -42,11 +15,10 @@ } ] }, - "editable": false, - "gnetId": null, + "editable": true, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": null, - "iteration": 1625069909806, + "id": 117, "links": [ { "asDropdown": false, @@ -62,59 +34,92 @@ ], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 50, + "gradientMode": "opacity", + "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" + } + }, + "links": [], + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 5, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 6, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "sum(ccp_connection_stats_total{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip) / sum(ccp_connection_stats_max_connections{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(ccp_connection_stats_total{pg_cluster=\"$cluster\",role=\"$role\"}) without (pod,instance,ip) / sum(ccp_connection_stats_max_connections{pg_cluster=\"$cluster\",role=\"$role\"}) without (pod,instance,ip)", "format": "time_series", "instant": false, "interval": "", @@ -123,7 +128,10 @@ "refId": "C" }, { - "expr": "100 - 100 * avg(ccp_nodemx_data_disk_available_bytes{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip) / avg(ccp_nodemx_data_disk_total_bytes{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "100 - 100 * avg(ccp_nodemx_data_disk_available_bytes{pg_cluster=\"$cluster\",role=\"$role\"}) without (pod,instance,ip) / avg(ccp_nodemx_data_disk_total_bytes{pg_cluster=\"$cluster\",role=\"$role\"}) without (pod,instance,ip)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -131,104 +139,96 @@ "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Saturation (pct used)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "percent", - "label": null, - "logBase": 1, - "max": "100", - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 50, + "gradientMode": "opacity", + "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" + } + }, + "links": [], + "mappings": [], + "min": 0.001, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 5, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 0 }, - "hiddenSeries": false, "id": 18, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "uid": "PROMETHEUS" + }, "exemplar": false, - "expr": " sum(irate(ccp_stat_database_xact_commit{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m])) \n+ sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m]))", + "expr": " sum(irate(ccp_stat_database_xact_commit{pg_cluster=\"$cluster\",role=\"$role\"}[1m])) \n+ sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"$cluster\",role=\"$role\"}[1m]))", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -236,7 +236,10 @@ "refId": "A" }, { - "expr": "max(ccp_connection_stats_active{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip,dbname)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "max(ccp_connection_stats_active{pg_cluster=\"$cluster\",role=\"$role\"}) without (pod,instance,ip,dbname)", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -244,7 +247,10 @@ "refId": "C" }, { - "expr": "sum(irate(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m]))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"$cluster\",role=\"$role\"}[1m]))", "format": "time_series", "hide": false, "interval": "", @@ -253,102 +259,96 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Traffic", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": "0.001", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "description": "Errors", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 50, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "log": 2, + "type": "log" + }, + "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 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 5, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 7 }, - "hiddenSeries": false, "id": 4, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m]) without(pod,instance,ip))", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"$cluster\",role=\"$role\"}[1m]) without(pod,instance,ip))", "format": "time_series", "hide": true, "interval": "", @@ -357,7 +357,10 @@ "refId": "A" }, { - "expr": "sum(irate(ccp_stat_database_deadlocks{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m])) without(pod,instance,ip,dbname)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_stat_database_deadlocks{pg_cluster=\"$cluster\",role=\"$role\"}[1m])) without(pod,instance,ip,dbname)", "format": "time_series", "hide": false, "interval": "", @@ -366,7 +369,10 @@ "refId": "D" }, { - "expr": "sum(irate(ccp_stat_database_conflicts{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m])) without(pod,instance,ip,dbname)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_stat_database_conflicts{pg_cluster=\"$cluster\",role=\"$role\"}[1m])) without(pod,instance,ip,dbname)", "format": "time_series", "hide": false, "interval": "", @@ -375,7 +381,10 @@ "refId": "B" }, { - "expr": "max(pg_exporter_last_scrape_error{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without(pod,instance,ip,dbname)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "max(pg_exporter_last_scrape_error{pg_cluster=\"$cluster\",role=\"$role\"}) without(pod,instance,ip,dbname)", "format": "time_series", "hide": false, "interval": "", @@ -384,7 +393,10 @@ "refId": "C" }, { - "expr": "max(clamp_max(ccp_archive_command_status_seconds_since_last_fail{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"},1)) without (instance,pod,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "max(clamp_max(ccp_archive_command_status_seconds_since_last_fail{pg_cluster=\"$cluster\",role=\"$role\"},1)) without (instance,pod,ip)", "format": "time_series", "hide": false, "interval": "", @@ -393,112 +405,127 @@ "refId": "E" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Errors", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "", - "logBase": 2, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "log": 2, + "type": "log" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Max:/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#E02F44", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/Avg:/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#8AB8FF", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 1, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 7 }, - "hiddenSeries": false, "id": 10, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/Max:/", - "color": "#E02F44", - "nullPointMode": "null as zero" + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 }, - { - "alias": "/Avg:/", - "color": "#8AB8FF" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "7.4.5", "targets": [ { - "expr": "max(ccp_pg_stat_statements_total_mean_exec_time_ms{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "max(ccp_pg_stat_statements_total_mean_exec_time_ms{pg_cluster=\"$cluster\",role=\"$role\"}) without (pod,instance,ip)", "format": "time_series", "hide": false, "instant": false, @@ -508,7 +535,10 @@ "refId": "A" }, { - "expr": "max(ccp_pg_stat_statements_top_max_exec_time_ms{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip,query,queryid)", + "datasource": { + "uid": "PROMETHEUS" + }, + "expr": "max(ccp_pg_stat_statements_top_max_exec_time_ms{pg_cluster=\"$cluster\",role=\"$role\"}) without (pod,instance,ip,query,queryid)", "format": "time_series", "hide": false, "instant": false, @@ -518,110 +548,65 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Query Duration", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "ms", - "label": null, - "logBase": 2, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "5m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], "templating": { "list": [ { - "allValue": null, - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values(pg_cluster)", - "description": null, - "error": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(pg_static,pg_cluster)", "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "cluster", "options": [], "query": { - "query": "label_values(pg_cluster)", - "refId": "PROMETHEUS-cluster-Variable-Query" + "qryType": 1, + "query": "label_values(pg_static,pg_cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "refresh": 1, + "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" }, { - "allValue": null, - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values({pg_cluster=\"[[cluster]]\"},role)", - "description": null, - "error": null, + "current": { + "selected": true, + "text": "replica", + "value": "replica" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(ccp_connection_stats_total{pg_cluster=\"$cluster\"},role)", "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "role", "options": [], "query": { - "query": "label_values({pg_cluster=\"[[cluster]]\"},role)", - "refId": "PROMETHEUS-role-Variable-Query" + "qryType": 1, + "query": "label_values(ccp_connection_stats_total{pg_cluster=\"$cluster\"},role)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" } ] }, @@ -645,5 +630,6 @@ "timezone": "browser", "title": "PostgreSQL Service Health", "uid": "dhG1wgsMz", - "version": 1 -} + "version": 3, + "weekStart": "" +} \ No newline at end of file diff --git a/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json b/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json index ef8fb41a..8cba5792 100644 --- a/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json +++ b/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json @@ -1,45 +1,12 @@ { - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "PROMETHEUS", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -49,10 +16,11 @@ ] }, "description": "Show current firing and pending alerts, and severity alert counts.", - "editable": false, + "editable": true, + "fiscalYearStartMonth": 0, "gnetId": 4181, "graphTooltip": 0, - "id": null, + "id": 118, "links": [ { "icon": "external link", @@ -65,7 +33,6 @@ "panels": [ { "collapsed": false, - "datasource": "PROMETHEUS", "gridPos": { "h": 1, "w": 24, @@ -74,27 +41,25 @@ }, "id": 10, "panels": [], - "repeat": null, "title": "Environment Summary", "type": "row" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -117,23 +82,24 @@ "y": 1 }, "id": 6, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [], "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { "expr": "count(count by (kubernetes_namespace) (pg_up))", @@ -149,22 +115,21 @@ "type": "stat" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -187,14 +152,13 @@ "y": 1 }, "id": 13, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -202,10 +166,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { "expr": "count(count by (pg_cluster) (pg_up))", @@ -221,22 +187,21 @@ "type": "stat" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -259,14 +224,13 @@ "y": 1 }, "id": 14, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -274,10 +238,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { "expr": "count(pg_up)", @@ -294,7 +260,6 @@ }, { "collapsed": false, - "datasource": "PROMETHEUS", "gridPos": { "h": 1, "w": 24, @@ -303,26 +268,24 @@ }, "id": 11, "panels": [], - "repeat": null, "title": "Alert Summary", "type": "row" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -352,14 +315,13 @@ "y": 4 }, "id": 2, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -367,10 +329,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { "bucketAggs": [ @@ -405,21 +369,20 @@ "type": "stat" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -442,23 +405,24 @@ "y": 4 }, "id": 5, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [], "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { "expr": "sum(ALERTS{alertstate=\"firing\",severity=\"warning\"} > 0) OR on() vector(0)", @@ -474,21 +438,20 @@ "type": "stat" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -511,14 +474,13 @@ "y": 4 }, "id": 9, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -526,10 +488,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { "expr": "sum(ALERTS{alertstate=\"firing\",severity=\"info\"} > 0) OR on() vector(0)", @@ -545,7 +509,6 @@ }, { "collapsed": false, - "datasource": "PROMETHEUS", "gridPos": { "h": 1, "w": 24, @@ -554,32 +517,33 @@ }, "id": 12, "panels": [], - "repeat": null, "title": "Alerts", "type": "row" }, { - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { - "align": null, - "displayMode": "auto", - "filterable": true + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "decimals": 2, "displayName": "", "mappings": [ { - "from": "", - "id": 1, - "text": "", - "to": "", - "type": 1, - "value": "" + "options": { + "": { + "text": "" + } + }, + "type": "value" } ], "thresholds": { @@ -613,8 +577,11 @@ }, "properties": [ { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "custom.width", @@ -679,12 +646,20 @@ "y": 7 }, "id": 1, - "links": [], "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, "showHeader": true, "sortBy": [] }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { "expr": "ALERTS{alertstate='firing'} > 0", @@ -753,15 +728,18 @@ "type": "table" }, { - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { - "align": null, - "filterable": true + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "decimals": 2, "displayName": "", @@ -797,8 +775,7 @@ "value": 2 }, { - "id": "custom.align", - "value": null + "id": "custom.align" } ] }, @@ -809,8 +786,7 @@ }, "properties": [ { - "id": "custom.width", - "value": null + "id": "custom.width" } ] }, @@ -871,12 +847,20 @@ "y": 12 }, "id": 3, - "links": [], "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, "showHeader": true, "sortBy": [] }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { "expr": "ALERTS{alertstate=\"pending\"}", @@ -929,8 +913,7 @@ } ], "refresh": "15m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], @@ -957,5 +940,6 @@ "timezone": "browser", "title": "Prometheus Alerts", "uid": "lwxXsZsMk", - "version": 1 -} + "version": 4, + "weekStart": "" +} \ No newline at end of file diff --git a/kustomize/monitoring/grafana/dashboards/query_statistics.json b/kustomize/monitoring/grafana/dashboards/query_statistics.json index a17b06ed..b7e49497 100644 --- a/kustomize/monitoring/grafana/dashboards/query_statistics.json +++ b/kustomize/monitoring/grafana/dashboards/query_statistics.json @@ -1,51 +1,12 @@ { - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "PROMETHEUS", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -55,11 +16,10 @@ ] }, "description": "", - "editable": false, - "gnetId": null, + "editable": true, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": null, - "iteration": 1625070004605, + "id": 119, "links": [ { "icon": "external link", @@ -71,10 +31,8 @@ ], "panels": [ { - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -101,34 +59,33 @@ "graphMode": "area", "justifyMode": "auto", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [], "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "sum(sum_over_time(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod,dbname,exported_role)", + "expr": "sum(sum_over_time(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"$cluster\", role=\"$role\",dbname=~\"$dbname\",exported_role=~\"$dbuser\"}[$__range])) without(instance, ip, deployment,pod,dbname,exported_role)", "instant": false, "interval": "", "legendFormat": "", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Queries Executed", "type": "stat" }, { - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -155,18 +112,21 @@ "graphMode": "area", "justifyMode": "auto", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [], "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "sum(sum_over_time(ccp_pg_stat_statements_total_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod,dbname,exported_role)", + "expr": "sum(sum_over_time(ccp_pg_stat_statements_total_exec_time_ms{pg_cluster=\"$cluster\", role=\"$role\",dbname=~\"$dbname\",exported_role=~\"$dbuser\"}[$__range])) without(instance, ip, deployment,pod,dbname,exported_role)", "format": "time_series", "instant": false, "interval": "", @@ -174,16 +134,12 @@ "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Query Runtime ", "type": "stat" }, { - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -210,6 +166,7 @@ "graphMode": "area", "justifyMode": "auto", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -217,13 +174,15 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "avg(sum_over_time(ccp_pg_stat_statements_total_mean_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod,dbname,exported_role)", + "expr": "avg(sum_over_time(ccp_pg_stat_statements_total_mean_exec_time_ms{pg_cluster=\"$cluster\", role=\"$role\",dbname=~\"$dbname\",exported_role=~\"$dbuser\"}[$__range])) without(instance, ip, deployment,pod,dbname,exported_role)", "format": "time_series", "instant": false, "interval": "", @@ -231,16 +190,12 @@ "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Query Mean Runtime", "type": "stat" }, { - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -267,6 +222,7 @@ "graphMode": "area", "justifyMode": "auto", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -274,13 +230,15 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "sum(sum_over_time(ccp_pg_stat_statements_total_row_count{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment, pod,dbname,exported_role)", + "expr": "sum(sum_over_time(ccp_pg_stat_statements_total_row_count{pg_cluster=\"$cluster\", role=\"$role\",dbname=~\"$dbname\",exported_role=~\"$dbuser\"}[$__range])) without(instance, ip, deployment, pod,dbname,exported_role)", "format": "time_series", "instant": false, "interval": "", @@ -288,118 +246,108 @@ "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Rows Retrieved or Affected", "type": "stat" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {} + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 23, "x": 0, "y": 3 }, - "hiddenSeries": false, "id": 2, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": null, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "sum(irate(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment, pod)", + "expr": "sum(irate(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"$cluster\", role=\"$role\",dbname=~\"$dbname\",exported_role=~\"$dbuser\"}[$__range])) without(instance, ip, deployment, pod)", "instant": false, "interval": "", "legendFormat": "db: {{dbname}}, user: {{exported_role}}", "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Query Executions", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "custom": { - "align": null, - "displayMode": "auto", - "filterable": false + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false }, "mappings": [], "thresholds": { @@ -428,8 +376,11 @@ "value": "ms" }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -511,6 +462,15 @@ }, "id": 4, "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, "showHeader": true, "sortBy": [ { @@ -519,10 +479,10 @@ } ] }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "avg(avg_over_time(ccp_pg_stat_statements_top_mean_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod)", + "expr": "avg(avg_over_time(ccp_pg_stat_statements_top_mean_exec_time_ms{pg_cluster=\"$cluster\", role=\"$role\",dbname=~\"$dbname\",exported_role=~\"$dbuser\"}[$__range])) without(instance, ip, deployment,pod)", "format": "table", "hide": false, "instant": true, @@ -531,8 +491,6 @@ "refId": "B" } ], - "timeFrom": null, - "timeShift": null, "title": "Query Mean Runtime (Top N)", "transformations": [ { @@ -569,13 +527,15 @@ "type": "table" }, { - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "custom": { - "align": null, - "displayMode": "auto", - "filterable": false + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false }, "mappings": [], "thresholds": { @@ -604,8 +564,11 @@ "value": "ms" }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -687,6 +650,15 @@ }, "id": 6, "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, "showHeader": true, "sortBy": [ { @@ -695,10 +667,10 @@ } ] }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "max(max_over_time(ccp_pg_stat_statements_top_max_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod)", + "expr": "max(max_over_time(ccp_pg_stat_statements_top_max_exec_time_ms{pg_cluster=\"$cluster\", role=\"$role\",dbname=~\"$dbname\",exported_role=~\"$dbuser\"}[$__range])) without(instance, ip, deployment,pod)", "format": "table", "hide": false, "instant": true, @@ -707,8 +679,6 @@ "refId": "B" } ], - "timeFrom": null, - "timeShift": null, "title": "Query Max Runtime (Top N)", "transformations": [ { @@ -745,12 +715,15 @@ "type": "table" }, { - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "custom": { - "align": null, - "filterable": false + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false }, "mappings": [], "thresholds": { @@ -779,8 +752,11 @@ "value": "ms" }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -862,6 +838,15 @@ }, "id": 5, "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, "showHeader": true, "sortBy": [ { @@ -870,10 +855,10 @@ } ] }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.2.1", "targets": [ { - "expr": "sum(irate(ccp_pg_stat_statements_top_total_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod)", + "expr": "sum(irate(ccp_pg_stat_statements_top_total_exec_time_ms{pg_cluster=\"$cluster\", role=\"$role\",dbname=~\"$dbname\",exported_role=~\"$dbuser\"}[$__range])) without(instance, ip, deployment,pod)", "format": "table", "instant": true, "interval": "", @@ -881,8 +866,6 @@ "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Query Total Runtime (Top N)", "transformations": [ { @@ -919,11 +902,13 @@ "type": "table" }, { - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { "custom": { - "displayMode": "auto", + "align": "auto", + "cellOptions": { + "type": "auto" + }, "filterable": false, "inspect": false }, @@ -954,8 +939,10 @@ "value": "bytes" }, { - "id": "custom.displayMode", - "value": "auto" + "id": "custom.cellOptions", + "value": { + "type": "auto" + } } ] } @@ -969,7 +956,9 @@ }, "id": 12, "options": { + "cellHeight": "sm", "footer": { + "countRows": false, "fields": "", "reducer": [ "sum" @@ -984,11 +973,10 @@ } ] }, - "pluginVersion": "8.5.15", + "pluginVersion": "11.2.1", "targets": [ { - "datasource": "PROMETHEUS", - "expr": "ccp_pg_stat_statements_top_wal_bytes{pg_cluster=\"[[cluster]]\", dbname=~\"[[dbname]]\", role=\"[[role]]\"}", + "expr": "ccp_pg_stat_statements_top_wal_bytes{pg_cluster=\"$cluster\", dbname=~\"$dbname\", role=\"$role\"}", "format": "table", "instant": true, "interval": "", @@ -1030,20 +1018,18 @@ } ], "refresh": "15m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], "templating": { "list": [ { - "allValue": null, - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values(pg_cluster)", - "description": null, - "error": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(pg_static,pg_cluster)", "hide": 0, "includeAll": false, "label": "cluster", @@ -1051,26 +1037,27 @@ "name": "cluster", "options": [], "query": { - "query": "label_values(pg_cluster)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(pg_static,pg_cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 0, + "type": "query" }, { - "allValue": null, - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values({pg_cluster=\"[[cluster]]\"},role)", - "description": null, - "error": null, + "current": { + "selected": false, + "text": "master", + "value": "master" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"$cluster\"},role)", "hide": 0, "includeAll": false, "label": "service", @@ -1078,72 +1065,71 @@ "name": "role", "options": [], "query": { - "query": "label_values({pg_cluster=\"[[cluster]]\"},role)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"$cluster\"},role)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 2, "regex": "", "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 0, + "type": "query" }, { - "allValue": null, - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\"},dbname)", - "description": null, - "error": null, + "current": { + "selected": false, + "text": "postgres", + "value": "postgres" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"$cluster\", role=\"$role\"},dbname)", "hide": 0, - "includeAll": true, + "includeAll": false, "label": "dbname", "multi": false, "name": "dbname", "options": [], "query": { - "query": "label_values(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\"},dbname)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"$cluster\", role=\"$role\"},dbname)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "refresh": 1, + "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" }, { - "allValue": null, - "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\", dbname=~\"[[dbname]]\"},exported_role)", - "description": null, - "error": null, + "current": { + "selected": false, + "text": "ccp_monitoring", + "value": "ccp_monitoring" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(ccp_pg_stat_statements_total_calls_count{role=\"$role\", pg_cluster=\"$cluster\", dbname=\"$dbname\"},exported_role)", "hide": 0, - "includeAll": true, + "includeAll": false, "label": "dbuser", "multi": false, "name": "dbuser", "options": [], "query": { - "query": "label_values(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\", dbname=~\"[[dbname]]\"},exported_role)", - "refId": "StandardVariableQuery" + "qryType": 1, + "query": "label_values(ccp_pg_stat_statements_total_calls_count{role=\"$role\", pg_cluster=\"$cluster\", dbname=\"$dbname\"},exported_role)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" }, - "refresh": 1, + "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" } ] }, @@ -1167,5 +1153,6 @@ "timezone": "browser", "title": "Query Statistics", "uid": "ZKoTOHDGk", - "version": 1 -} + "version": 3, + "weekStart": "" +} \ No newline at end of file