File tree Expand file tree Collapse file tree 4 files changed +15
-0
lines changed
Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ cd test/endtoend/operator || exit 1
3131get_started " operator-latest.yaml" " 101_initial_cluster_backup.yaml"
3232verifyVtGateVersion " 24.0.0"
3333checkSemiSyncSetup
34+ checkMysqldExporterMetrics
3435takeBackup " commerce/-"
3536verifyListBackupsOutput
3637takedownShard
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ cd test/endtoend/operator || exit 1
3434get_started " operator-latest.yaml" " 101_initial_cluster_backup_schedule.yaml"
3535verifyVtGateVersion " 24.0.0"
3636checkSemiSyncSetup
37+ checkMysqldExporterMetrics
3738verifyListBackupsOutputWithSchedule
3839
3940# Teardown
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ get_started "operator-latest.yaml" "101_initial_cluster_autoscale.yaml"
3737verifyVtGateVersion " 24.0.0"
3838checkSemiSyncSetup
3939
40+ checkMysqldExporterMetrics
4041verifyHpaCount 0
4142
4243echo " Apply cluster_autoscale.yaml"
Original file line number Diff line number Diff line change @@ -517,3 +517,15 @@ function checkVitessBackupScheduleStatusWithTimeout() {
517517 echo -e " ERROR: checkPodStatusWithTimeout timeout to find pod matching:\ngot:\n$out \nfor regex: $regex "
518518 exit 1
519519}
520+
521+ function checkMysqldExporterMetrics() {
522+ for vttablet in $( kubectl get pods -n example --no-headers -o custom-columns=" :metadata.name" | grep " vttablet" ) ; do
523+ echo " Confirming that the mysqld_exporter is working in ${vttablet} "
524+ open_files=$( kubectl -n example exec -it " ${vttablet} " -c vttablet -- curl localhost:9104/metrics | grep -E " ^mysql_global_status_open_files" | awk ' {print $2}' | bc)
525+ if [[ ${open_files} -lt 1 ]]; then
526+ echo -e " ERROR: mysqld metrics do not appear to be successfully exported from the ${vttablet} pod (open_files result: ${open_files} )"
527+ exit 1
528+ fi
529+ echo " Confirmed working mysqld_exporter metrics: mysql_global_status_open_files = ${open_files} "
530+ done
531+ }
You can’t perform that action at this time.
0 commit comments