Browse Source

"MaJ expl_check_all_nrpe.sh"

master
Doug Le Tough 5 years ago
parent
commit
9053325637
  1. 5
      bin/expl_check_all_nrpe.sh

5
bin/expl_check_all_nrpe.sh

@ -125,16 +125,17 @@ function check_all @@ -125,16 +125,17 @@ function check_all
{
for CHECK in $(find ${NRPE_CHECK_PATH} -type f -executable -exec basename {} .cfg \; | sort )
do
fct_message "Contrôle ${CHECK}:" -color jaune
for HOST in ${TETALAB_VM[@]}
do
CRITICAL=1
if [ "${HOST}" == "${INFRA_SERVER}" ]; then
fct_message "Contrôle ${CHECK} sur ${HOST}" -color jaune
fct_message " * ${HOST}"
RESULT=$(${NRPE_CHECK_BIN} -H ${HOST} -c ${CHECK} | cut -d'|' -f1)
CRITICAL=$(echo ${RESULT} | grep OK | wc -l)
elif [ $(echo ${CHECK} | grep "check_http_" | wc -l) -eq 0 ]; then
# On ne fait pas les checks HTTP sur les autres VM que le serveur d'infra (sousetsuken)
fct_message "Contrôle ${CHECK} sur ${HOST}" -color jaune
fct_message " * ${HOST}"
RESULT=$(${NRPE_CHECK_BIN} -H ${HOST} -c ${CHECK} | cut -d'|' -f1)
CRITICAL=$(echo ${RESULT} | grep OK | wc -l)
fi

Loading…
Cancel
Save