Add the file as well...
This commit is contained in:
parent
2d5c316846
commit
c37d6addad
1 changed files with 20 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
status_file=/opt/baas2/validate-backup-status
|
||||
nrpe_ok=0
|
||||
nrpe_critical=2
|
||||
|
||||
if ! [ -f $status_file ]; then
|
||||
echo "CRITICAL: unable to find status file: $status_file"
|
||||
exit $nrpe_critical
|
||||
fi
|
||||
|
||||
if grep -q "^ok$" $status_file; then
|
||||
echo "OK: all restore tests passed"
|
||||
exit $nrpe_ok
|
||||
fi
|
||||
|
||||
if grep -q "^critical$" $status_file; then
|
||||
echo "CRITICAL: restore test failed, see scriptherder output for details"
|
||||
exit $nrpe_critical
|
||||
fi
|
Loading…
Add table
Reference in a new issue