Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1


Remember Me

Directory Tree


2 votes
check_msmq-0.2.zipVersion 0.2
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
VBScript to check MSMQ metrics via NRPE (NSClient++ with NRPE Listener)

For use with NSClient++ please add the following line to your NSC.INI [NRPE Handlers]:

check_msmq=cscript.exe //T:30 //NoLogo scriptscheck_msmq.vbs $ARG1$

and copy "check_msmq.vbs" into "scripts" folder. Refer to NSClient++ Documentation for using remote checks via NRPE.

###command definition###

define command {
command_name check_msmq
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 30 -c check_msmq -a $ARG1$

###service definition###

define service{
use generic-service
host_name WINSVR01
service_description MSMQ MessageCount MSMQSVR01
process_perf_data 1
check_command check_msmq!"MessageCount DIRECT=OS:MSMQSVR01\Private$\ServiceFooBar 50 200"

What it does:

At the moment there are 3 functions available: "ListQueueNames", "MessageCount" and "BytesInQueue".

cscript //nologo check_msmq.vbs ListQueueNames

delivers a list of found message queues as to be used in following functions.

cscript //nologo check_msmq.vbs MessageCount [QueuName] [warn] [crit]

shows the number of messages in given queue.

cscript //nologo check_msmq.vbs BytesInQueue [QueuName] [warn] [crit]

shows the amount of bytes in given queue.

cscript //nologo check_msmq.vbs MessageCount DIRECT=OS:MSMQSVR01\Private$\ServiceFooBar 50 200

cscript //nologo check_msmq.vbs --help

will give you brief syntax help.

ATTENTION: Upgrade from version 0.1 needs argument change since it differs!


This software comes without any warranty and has to be treated "as is". Feel free to change it to fit your needs or contact me for any kind of comment.
Reviews (2)
byDrRask, September 19, 2021
How should the spaces be handled in the msmq name?

Have a queue name called "transfer points day"

the readme says:
"MessageCount DIRECT=OS:MSMQSVR01\Private$\transfer points day 50 200"

and it fails with bad command argument.

Please advice?
bycgraham, September 14, 2012
0 of 1 people found this review helpful
If you're wanting to set high thresholds for your queues you'll need to edit the script and change all the CInt to CDbl.