From 7dba2a9182194d415afe75eae85c4d911725f4ea Mon Sep 17 00:00:00 2001 From: leandrorichardtoledo <169929015+leandrorichardtoledo@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:58:56 -0300 Subject: [PATCH] Update dashboard. (#367) --- .../files/grafana-dashboard.json | 927 +++++++++--------- .../databasecontroller_migrate_test.go | 4 +- 2 files changed, 471 insertions(+), 460 deletions(-) diff --git a/helm/db-controller/files/grafana-dashboard.json b/helm/db-controller/files/grafana-dashboard.json index c3d8813a..48e13176 100644 --- a/helm/db-controller/files/grafana-dashboard.json +++ b/helm/db-controller/files/grafana-dashboard.json @@ -1,8 +1,8 @@ { "__inputs": [ { - "name": "DS_PROMETHEUS", - "label": "Prometheus", + "name": "DS_APPINFRA-PROMETHEUS", + "label": "appinfra-prometheus", "description": "", "type": "datasource", "pluginId": "prometheus", @@ -88,7 +88,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -135,7 +135,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "exemplar": false, @@ -152,7 +152,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -260,7 +260,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "exemplar": false, @@ -277,7 +277,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "description": "", "fieldConfig": { @@ -326,7 +326,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "exemplar": false, @@ -343,7 +343,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -355,13 +355,9 @@ "thresholds": { "mode": "absolute", "steps": [ - { - "color": "green", - "value": null - }, { "color": "red", - "value": 80 + "value": null } ] }, @@ -411,7 +407,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "expr": "sum by(env) (dbcontroller_error_state_claims{app_kubernetes_io_instance=\"db-controller\"})", @@ -439,7 +435,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "description": "Calculates the total rate of reconciliations per minute for the databaseclaim controller.", "fieldConfig": { @@ -536,7 +532,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "expr": "sum(rate(controller_runtime_reconcile_total{controller=\"databaseclaim\"}[1m])) * 60", @@ -551,7 +547,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "description": "Displays the 95th percentile of reconciliation duration for the databaseclaim controller over a 5-minute window.", "fieldConfig": { @@ -647,7 +643,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "exemplar": false, @@ -664,7 +660,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "description": "Calculates the percentage of successful reconciliations over the total number of reconciliations for the databaseclaim controller.", "fieldConfig": { @@ -740,7 +736,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "expr": "sum(rate(controller_runtime_reconcile_total{controller=\"databaseclaim\", result=\"success\"}[1m])) * 60", @@ -755,7 +751,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "description": "Calculates the total rate of reconciliation errors per minute for the databaseclaim controller.", "fieldConfig": { @@ -867,7 +863,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "expr": "sum(rate(controller_runtime_reconcile_errors_total{controller=\"databaseclaim\"}[1m])) * 60", @@ -895,7 +891,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "description": "Shows the current depth of the work queue for the databaseclaim controller.", "fieldConfig": { @@ -946,7 +942,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "exemplar": false, @@ -963,7 +959,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "description": "Displays the 95th percentile of time items spend in the work queue for the databaseclaim controller.", "fieldConfig": { @@ -1073,7 +1069,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "expr": "histogram_quantile(0.95, sum(rate(workqueue_queue_duration_seconds_bucket[1m])) by (le))", @@ -1088,7 +1084,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "description": "Displays the 95th percentile of time taken to process items in the work queue for the databaseclaim controller.", "fieldConfig": { @@ -1131,7 +1127,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1197,7 +1194,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "expr": "histogram_quantile(0.95, sum(rate(workqueue_work_duration_seconds_bucket[1m])) by (le))", @@ -1212,7 +1209,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "description": "Shows the maximum time that any item has been waiting in the work queue for the databaseclaim controller.", "fieldConfig": { @@ -1255,7 +1252,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1307,7 +1305,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "exemplar": true, @@ -1324,7 +1322,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "description": "Calculates the rate of work queue retries per minute for the databaseclaim controller.", "fieldConfig": { @@ -1368,7 +1366,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1434,7 +1433,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "editorMode": "code", "expr": "sum(rate(workqueue_retries_total{name=\"databaseclaim\"}[1m])) * 60", @@ -1462,7 +1461,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -1504,7 +1503,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1539,7 +1539,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "exemplar": true, "expr": "avg(rate(process_cpu_seconds_total[2m]))", @@ -1554,7 +1554,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "fieldConfig": { "defaults": { @@ -1566,7 +1566,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null } ] }, @@ -1600,7 +1601,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, "exemplar": true, "expr": "avg(process_resident_memory_bytes)", @@ -1613,7 +1614,7 @@ "type": "stat" }, { - "collapsed": true, + "collapsed": false, "gridPos": { "h": 1, "w": 24, @@ -1621,192 +1622,202 @@ "y": 68 }, "id": 52, - "panels": [ - { - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + "panels": [], + "title": "Databases", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 0, - "y": 37 - }, - "id": 46, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "9.5.10", - "targets": [ - { - "expr": "sum(databases_created_total)", - "legendFormat": "Total Databases Created", - "refId": "A" - } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 69 + }, + "id": 46, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "title": "Total Databases Created", - "type": "stat" + "fields": "", + "values": false }, + "textMode": "auto" + }, + "pluginVersion": "9.5.10", + "targets": [ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 37 - }, - "id": 47, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "9.5.10", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "builder", - "expr": "count(kube_customresource{kind=\"DatabaseClaim\"})", - "legendFormat": "Active Database Claims", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "hide": false, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "expr": "sum(databases_created_total)", + "legendFormat": "Total Databases Created", + "refId": "A" + } + ], + "title": "Total Databases Created", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null }, - "hide": false, - "refId": "C" - } + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 69 + }, + "id": 47, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "title": "Active Database Claims", - "type": "stat" + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.10", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "count(kube_customresource{kind=\"DatabaseClaim\"})", + "legendFormat": "Active Database Claims", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "hide": false, + "refId": "B" }, { - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] + "datasource": { + "type": "prometheus", + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "hide": false, + "refId": "C" + } + ], + "title": "Active Database Claims", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 12, - "y": 37 - }, - "id": 50, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "9.5.10", - "targets": [ - { - "expr": "sum(database_creation_errors_total)", - "legendFormat": "Creation Errors", - "refId": "A" - } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 69 + }, + "id": 50, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "title": "Database Creation Errors", - "type": "stat" + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.10", + "targets": [ + { + "expr": "sum(database_creation_errors_total)", + "legendFormat": "Creation Errors", + "refId": "A" } ], - "title": "Databases", - "type": "row" + "title": "Database Creation Errors", + "type": "stat" }, { - "collapsed": true, + "collapsed": false, "datasource": { "type": "prometheus", "uid": "000000001" @@ -1815,276 +1826,276 @@ "h": 1, "w": 24, "x": 0, - "y": 69 + "y": 72 }, "id": 26, - "panels": [ + "panels": [], + "targets": [ { "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" + "uid": "000000001" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] + "refId": "A" + } + ], + "title": "Password rotation", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 3, - "x": 0, - "y": 22 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.5.10", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "increase(password_rotated_total[$__range])", - "interval": "", - "legendFormat": "", - "range": true, - "refId": "A" - } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 0, + "y": 73 + }, + "id": 22, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "title": "Passwords rotated total", - "type": "stat" + "fields": "", + "values": false }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.5.10", + "targets": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 6, - "x": 3, - "y": 22 - }, - "hiddenSeries": false, - "id": 37, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": true, - "expr": "password_rotation_time_seconds_sum / password_rotation_time_seconds_count", - "hide": true, - "interval": "", - "legendFormat": "Avg password rotation time", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "increase(password_rotation_time_seconds_sum[24h]) / increase(password_rotation_time_seconds_count[24h])\n", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Avg password rotation time", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:113", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:114", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(password_rotated_total[$__range])", + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Passwords rotated total", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 6, + "x": 3, + "y": 73 + }, + "hiddenSeries": false, + "id": 37, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.10", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "password_rotation_time_seconds_sum / password_rotation_time_seconds_count", + "hide": true, + "interval": "", + "legendFormat": "Avg password rotation time", + "range": true, + "refId": "A" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 14, - "x": 9, - "y": 22 - }, - "hiddenSeries": false, - "id": 33, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.5.10", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "exemplar": true, - "expr": "sum(rate(password_rotation_time_seconds_bucket[5m])) by (reason)", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Password rotation errors rate", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2077", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:2078", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "editorMode": "code", + "expr": "increase(password_rotation_time_seconds_sum[24h]) / increase(password_rotation_time_seconds_count[24h])\n", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Avg password rotation time", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:113", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:114", + "format": "short", + "logBase": 1, + "show": true } ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "${DS_APPINFRA-PROMETHEUS}" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 14, + "x": 9, + "y": 73 + }, + "hiddenSeries": false, + "id": 33, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.5.10", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", - "uid": "000000001" + "uid": "${DS_APPINFRA-PROMETHEUS}" }, + "exemplar": true, + "expr": "sum(rate(password_rotation_time_seconds_bucket[5m])) by (reason)", + "interval": "", + "legendFormat": "", "refId": "A" } ], - "title": "Password rotation", - "type": "row" + "thresholds": [], + "timeRegions": [], + "title": "Password rotation errors rate", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:2077", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:2078", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } } ], "refresh": "5m", @@ -2102,6 +2113,6 @@ "timezone": "", "title": "Database Controller Metrics", "uid": "b237b85a-5ea2-4bc3-8411-504e07e0e4f3", - "version": 26, + "version": 39, "weekStart": "" } \ No newline at end of file diff --git a/internal/controller/databasecontroller_migrate_test.go b/internal/controller/databasecontroller_migrate_test.go index 05fcf079..148884e0 100644 --- a/internal/controller/databasecontroller_migrate_test.go +++ b/internal/controller/databasecontroller_migrate_test.go @@ -308,11 +308,11 @@ var _ = Describe("claim migrate", func() { Expect(activeDB.ConnectionInfo).NotTo(BeNil()) Expect(activeDB.ConnectionInfo.Uri()).To(Equal(compareDSN)) - By(fmt.Sprintf("Verify owner of migrated DB is %s", migratedowner+"_a")) + By(fmt.Sprintf("Verify owner of migrated DB is %s", migratedowner)) row := fakeCli.QueryRowContext(ctxLogger, "select tableowner from pg_tables where tablename = 'users' AND schemaname = 'public';") var owner string Expect(row.Scan(&owner)).NotTo(HaveOccurred()) - Expect(owner).To(Equal(migratedowner + "_a")) + Expect(owner).To(Equal(migratedowner)) })