Created
September 28, 2022 08:49
-
-
Save ylacancellera/8f5729f19ed18592b82dcc5b6cc09d31 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat << 'EOF' >> /tmp/ptstalk_trigger_non_primary.sh | |
#!/bin/bash | |
trg_plugin() { | |
mysql $EXT_ARGV -sN -e "select case when variable_value = 'Primary' then 0 else 1 end from information_schema.global_status where variable_name ='wsrep_cluster_status';" | |
} | |
EOF | |
chmod +x /tmp/ptstalk_trigger_non_primary.sh | |
sudo ./pt-stalk --stalk --function=/tmp/ptstalk_trigger_non_primary.sh --threshold=0 --cycles=1 --dest="${PTDEST}" -- --user=root --password=<mysql-root-pass>; & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment