Anyone have a plugin or recommendation for monitoring MSMQ queue size?
Thanks, Marcus
Need Nagios xi Plugin for MSMQ monitoring
-
- Posts: 238
- Joined: Fri May 04, 2012 11:20 am
- Location: Heart of America
-
- Posts: 115
- Joined: Tue Aug 16, 2011 2:43 pm
Re: Need Nagios xi Plugin for MSMQ monitoring
Yup, we do much of this. Here's how we do it from the windows server back to the nagios server.
Windows, running nsclient++
Get the script online called check_msmq.vbs (more details below). It's on the Nagios Exchange. Put it in the scripts folder.
We put this entry in the nsc.ini file:
check_msmq=cscript.exe //T:30 //NoLogo scripts\check_msmq.vbs $ARG1$
Then we create a command check called check_msmq
$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 30 -c check_msmq -a $ARG1$
Then we create a service check called MSMQ CallLogSample MessageCount and put this as ARG1 (quotes included)
"MessageCount DIRECT=OS:$HOSTNAME$.domain\\private$\\CallLogSample 5000 10000"
Note: my queue name is "CallLogSample", the "domain" should be your domain and should match your queue names. I use the MACRO $HOSTNAME$ so that you can use this check with many hosts that have the CallLogSample queue. 5000 and 10000 are my warning and critical levels.
Second Note: the script online has a bug (if you want high warning and crit thresholds). Everywhere in the script you find CInt, you should replace with CDbl. Otherwise you can't put high thresholds on your queues.
That's about it.
Windows, running nsclient++
Get the script online called check_msmq.vbs (more details below). It's on the Nagios Exchange. Put it in the scripts folder.
We put this entry in the nsc.ini file:
check_msmq=cscript.exe //T:30 //NoLogo scripts\check_msmq.vbs $ARG1$
Then we create a command check called check_msmq
$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 30 -c check_msmq -a $ARG1$
Then we create a service check called MSMQ CallLogSample MessageCount and put this as ARG1 (quotes included)
"MessageCount DIRECT=OS:$HOSTNAME$.domain\\private$\\CallLogSample 5000 10000"
Note: my queue name is "CallLogSample", the "domain" should be your domain and should match your queue names. I use the MACRO $HOSTNAME$ so that you can use this check with many hosts that have the CallLogSample queue. 5000 and 10000 are my warning and critical levels.
Second Note: the script online has a bug (if you want high warning and crit thresholds). Everywhere in the script you find CInt, you should replace with CDbl. Otherwise you can't put high thresholds on your queues.
That's about it.
-
- Posts: 238
- Joined: Fri May 04, 2012 11:20 am
- Location: Heart of America
Re: Need Nagios xi Plugin for MSMQ monitoring
Thanks CGraham. I'll give it a try.
-
- Posts: 238
- Joined: Fri May 04, 2012 11:20 am
- Location: Heart of America
Re: Need Nagios xi Plugin for MSMQ monitoring
Just following up to thank you CGraham for the suggestion. I successfully implemented the MSMQ monitoring and your second note tip was on the money. It was a solid fit for what we needed.
Marcus
Marcus