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
Email: sales@nagios.com

Login

Remember Me

check_msmq.vbs

Rating
1 vote
Favoured:
2
Hits
149302
Files:
FileDescription
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)
Usage:
++++++

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.


Example:
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!

Disclaimer:
+++++++++++

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 (1)
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.