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

Directory Tree

check_msmq.vbs

Rating
2 votes
Favoured:
3
Hits
153888
Files:
FileDescription
check_msmq-0.2.zipVersion 0.2
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
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 (2)
byDrRask, September 19, 2021
How should the spaces be handled in the msmq name?

example:
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.