From b7c84cc9fea792394f2c9917e837c775599bb014 Mon Sep 17 00:00:00 2001 From: souravbiswassanto Date: Fri, 26 Jan 2024 18:58:32 +0600 Subject: [PATCH] Added split brain alert Signed-off-by: souravbiswassanto --- .../postgres/postgres_summary_dashboard.json | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json index edb1022f8..925580f2a 100644 --- a/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json +++ b/charts/kubedb-grafana-dashboards/dashboards/postgres/postgres_summary_dashboard.json @@ -5071,6 +5071,143 @@ "align": false, "alignLevel": null } + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 1 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "1h", + "now" + ] + }, + "reducer": { + "params": [], + "type": "last" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "10s", + "frequency": "30s", + "handler": 1, + "name": "Postgresql split brain alert", + "noDataState": "no_data", + "notifications": [] + }, + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "More than one primary server online", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 157 + }, + "hiddenSeries": false, + "id": 185, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "{{ .Values.grafana.version }}", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "count by (pod) (pg_replication_is_replica{job=\"$app-stats\",namespace=\"$namespace\",service=\"$app-stats\"} == 0)", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 1, + "visible": true + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Postgresql split brain ", + "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 + } } {{- end }} ],