useful_scripts/check_innodb.sh
Arif Ali ab9f68b8e5
many modifications
* Add script to check innodb status
* Add check_mongo for when juju controllers are not working
* Add script to fix group replication
* Add script that fixes logrotate on nova-compute units
* Fine tuning other scripts
2023-02-22 14:16:27 +00:00

17 lines
386 B
Bash
Executable File

#!/bin/bash
check_controller()
{
controller=$1
model="cpe-focal"
juju run-action -m "${controller}":${model} mysql-innodb-cluster/leader --wait cluster-status --format json | jq -rc '.[].results."cluster-status"' | jq
}
if [[ -z "$1" ]] ; then
check_controller "$(juju controllers --format json | jq -r .\"current-controller\")"
else
check_controller "${1}"
fi