Script to check all services once.
This commit is contained in:
23
tools/monitoring_check_all_once.sh
Executable file
23
tools/monitoring_check_all_once.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd -P "$(dirname "$(readlink -f "$0")" )"
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
INFRA_ROOT="$PWD"
|
||||||
|
|
||||||
|
RC=0
|
||||||
|
|
||||||
|
function fail_one()
|
||||||
|
{
|
||||||
|
echo >&2 "FAILURE on: " "$@"
|
||||||
|
RC=$(( RC + 1 ))
|
||||||
|
}
|
||||||
|
|
||||||
|
while IFS="" read -u 3 -r MONITOR_SCRIPT_PATH
|
||||||
|
do
|
||||||
|
"$MONITOR_SCRIPT_PATH" || { fail_one "$MONITOR_SCRIPT_PATH" ; }
|
||||||
|
done 3< <( find . -iname "monitor_check_once.sh" )
|
||||||
|
|
||||||
|
echo "Overall result: $RC"
|
||||||
|
exit "$RC"
|
||||||
Reference in New Issue
Block a user