diff --git a/scripts/backup-status.sh b/scripts/backup-status.sh index 24e6917..8b6043a 100755 --- a/scripts/backup-status.sh +++ b/scripts/backup-status.sh @@ -61,7 +61,9 @@ write_status() { # shellcheck disable=SC1090 source "${status_dir}/last-job.env" fi - if [[ -n "${local_complete}" && -n "${remote_complete}" && -n "${binlog_file}" ]]; then + if [[ "${job_status}" == 'failed' ]]; then + health='warning' + elif [[ -n "${local_complete}" && -n "${remote_complete}" && -n "${binlog_file}" ]]; then health='healthy' else health='warning'