From 5caf5d752a2dd07553bfae015f831ffe2c1603a7 Mon Sep 17 00:00:00 2001 From: Vitaly Zhuravlev Date: Fri, 16 Dec 2022 15:24:50 +0300 Subject: [PATCH 1/4] Chain dashboard jon and instance vars Signed-off-by: Vitaly Zhuravlev --- mysqld-mixin/dashboards/mysql-overview.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysqld-mixin/dashboards/mysql-overview.json b/mysqld-mixin/dashboards/mysql-overview.json index 089d6536..aed926ec 100644 --- a/mysqld-mixin/dashboards/mysql-overview.json +++ b/mysqld-mixin/dashboards/mysql-overview.json @@ -3739,14 +3739,14 @@ ] }, "datasource": "$datasource", - "definition": "label_values(mysql_up, instance)", + "definition": "label_values(mysql_up{job=~\"$job\"}, instance)", "hide": 0, "includeAll": true, "label": "instance", "multi": true, "name": "instance", "options": [], - "query": "label_values(mysql_up, instance)", + "query": "label_values(mysql_up{job=~\"$job\"}, instance)", "refresh": 1, "regex": "", "skipUrlSync": false, From b4aa7810ea3d88998d25b1c4db02772508386899 Mon Sep 17 00:00:00 2001 From: Vitaly Zhuravlev Date: Fri, 16 Dec 2022 15:36:11 +0300 Subject: [PATCH 2/4] Switch to orientation 'auto' for top stat panels Otherwise metrics' values could be too small to see. Signed-off-by: Vitaly Zhuravlev --- mysqld-mixin/dashboards/mysql-overview.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysqld-mixin/dashboards/mysql-overview.json b/mysqld-mixin/dashboards/mysql-overview.json index aed926ec..c73159d5 100644 --- a/mysqld-mixin/dashboards/mysql-overview.json +++ b/mysqld-mixin/dashboards/mysql-overview.json @@ -85,7 +85,7 @@ }, "graphMode": "none", "justifyMode": "auto", - "orientation": "horizontal", + "orientation": "auto", "reduceOptions": { "calcs": [ "mean" @@ -169,7 +169,7 @@ }, "graphMode": "area", "justifyMode": "auto", - "orientation": "horizontal", + "orientation": "auto", "reduceOptions": { "calcs": [ "mean" @@ -253,7 +253,7 @@ }, "graphMode": "none", "justifyMode": "auto", - "orientation": "horizontal", + "orientation": "auto", "reduceOptions": { "calcs": [ "mean" From f30fecb6c035252725b126f6461dae02620db09b Mon Sep 17 00:00:00 2001 From: Vitaly Zhuravlev Date: Fri, 16 Dec 2022 15:42:09 +0300 Subject: [PATCH 3/4] Rename mixin's dashboard Signed-off-by: Vitaly Zhuravlev --- mysqld-mixin/dashboards/mysql-overview.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysqld-mixin/dashboards/mysql-overview.json b/mysqld-mixin/dashboards/mysql-overview.json index c73159d5..9cf9c32f 100644 --- a/mysqld-mixin/dashboards/mysql-overview.json +++ b/mysqld-mixin/dashboards/mysql-overview.json @@ -3795,7 +3795,7 @@ "type": "timepicker" }, "timezone": "", - "title": "MySQL", + "title": "MySQL overview", "uid": "549c2bf8936f7767ea6ac47c47b00f2a", "version": 1 } From 9e7d758e78222e4630330233204dfed4c1f35d4c Mon Sep 17 00:00:00 2001 From: Vitaly Zhuravlev Date: Fri, 16 Dec 2022 16:45:36 +0300 Subject: [PATCH 4/4] Fix MySQLGaleraNotReady alert Signed-off-by: Vitaly Zhuravlev --- mysqld-mixin/alerts/galera.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysqld-mixin/alerts/galera.yaml b/mysqld-mixin/alerts/galera.yaml index 31016b5f..7c4d4cee 100644 --- a/mysqld-mixin/alerts/galera.yaml +++ b/mysqld-mixin/alerts/galera.yaml @@ -10,7 +10,8 @@ groups: - name: GaleraAlerts rules: - alert: MySQLGaleraNotReady - expr: mysql_global_status_wsrep_ready != 1 + # check mysql_galera_status_info is present to avoid false positives with non-galera setups. + expr: mysql_global_status_wsrep_ready != 1 and on (job, instance) mysql_galera_status_info for: 5m labels: severity: warning