2023-02-13 09:44:56 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-03-10 09:05:21 +00:00
|
|
|
result="$(docker exec mariadb_backup_mariadb_backup_1 mysql -p<%= @mysql_root_password %> -BN -e 'show status like "slave_running"')"
|
2023-02-13 09:44:56 +00:00
|
|
|
if [[ "${result}" == "Slave_running ON" ]]; then
|
|
|
|
echo "OK: Replica running"
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
echo "CRITICAL: Replica not running"
|
|
|
|
exit 2
|
|
|
|
fi
|