From 55cdc5ac3e8afcd7beb2e76d21ff47d6f594c3e0 Mon Sep 17 00:00:00 2001 From: Stephane Gourichon Date: Sun, 24 Mar 2024 17:13:45 +0100 Subject: [PATCH] Script to check all services once. --- tools/monitoring_check_all_once.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 tools/monitoring_check_all_once.sh diff --git a/tools/monitoring_check_all_once.sh b/tools/monitoring_check_all_once.sh new file mode 100755 index 0000000..88b39f4 --- /dev/null +++ b/tools/monitoring_check_all_once.sh @@ -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"