From 81608c291c8a9180057c03f47a1d6b3cf8edbd75 Mon Sep 17 00:00:00 2001 From: Demonic Date: Wed, 13 Apr 2022 16:10:20 +0200 Subject: [PATCH] Update check_mq.sh --- SHELL/NAGIOS/check_mq.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/SHELL/NAGIOS/check_mq.sh b/SHELL/NAGIOS/check_mq.sh index 7dd4b09..2c7885c 100644 --- a/SHELL/NAGIOS/check_mq.sh +++ b/SHELL/NAGIOS/check_mq.sh @@ -62,4 +62,17 @@ done ######################## ## PROGRAMME ## -######################## \ No newline at end of file +######################## + + +# MQINFO de la file MQ +echo "\nMQINFO de la file EDS.OCB.01 \n" +su - mqm -c "MQINFO.exe EDS.OCB.01" > $ficLogOCB + + + +# Récupération des valeurs (nb de message, nb de message max, taux) +echo "\nRECUPERATION DES VALEURS \n" +nbMess=`grep "Number of messages in queue" $ficLogOCB | sed 's/.* = (//g' | sed 's/).*//g'` +nbMax=`grep "Maximum number" $ficLogOCB | sed 's/.* = (//g' | sed 's/).*//g'` +tauxRemp=`grep "ratio" $ficLogOCB | sed 's/.* = (//g' | sed 's/).*//g'` \ No newline at end of file