"MaJ expl_check_all_nrpe.sh"
This commit is contained in:
parent
7f4cf9af4b
commit
8dc4d4eb70
@ -129,10 +129,12 @@ function check_all
|
||||
do
|
||||
CRITICAL=1
|
||||
if [ "${HOST}" == "${INFRA_SERVER}" ]; then
|
||||
fct_message "Contrôle ${CHECK} sur ${HOST}" -color jaune
|
||||
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
|
||||
RESULT=$(${NRPE_CHECK_BIN} -H ${HOST} -c ${CHECK} | cut -d'|' -f1)
|
||||
CRITICAL=$(echo ${RESULT} | grep OK | wc -l)
|
||||
fi
|
||||
@ -145,9 +147,12 @@ function check_all
|
||||
|
||||
function send_message
|
||||
{
|
||||
if [ ${#MESSAGE} -gt 0 ]; then
|
||||
${IRC_BOT} "${MESSAGE}"
|
||||
if [ ${#MESSAGE} -eq 0 ]; then
|
||||
fct_message "Aucun message à envoyer" -color jaune
|
||||
fct_erreur 0
|
||||
fi
|
||||
fct_message "Envoi du message ${MESSAGE}" -color jaune
|
||||
${IRC_BOT} "${MESSAGE}"
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -5,6 +5,6 @@ INFRA_SERVER=sousetsuken.local.tetalab.org
|
||||
TETALAB_VM[0]=sousetsuken.local.tetalab.org
|
||||
TETALAB_VM[1]=jimmy.local.tetalab.org
|
||||
TETALAB_VM[2]=billy.local.tetalab.org
|
||||
TETALAB_VM[3]=marian.local.tetalab.org
|
||||
TETALAB_VM[4]=sonny.local.tetalab.org
|
||||
TETALAB_VM[5]=web.local.tetalab.org
|
||||
TETALAB_VM[3]=sonny.local.tetalab.org
|
||||
TETALAB_VM[4]=web.local.tetalab.org
|
||||
# ATTENTION: Marian n'est *volontairement* pas monitorée
|
||||
|
Loading…
Reference in New Issue
Block a user