Hi,
We are trying to use check_msmq plugin to monitor message queue count as described in below link
https://exchange.nagios.org/directory/P ... bs/details
We were able to run the plugin from Nagios server command line and able to get the output
[nagios@XXXX ~]$ /usr/local/nagios/libexec/check_nrpe -H XXXX -p 5666 -t 30 -c check_msmq -a "MessageCount DIRECT=OS:s930a3703.group.rwe.com\private$\previewjob 50 60"
MessageCount OK - DIRECT=OS: XXXX\\private$\\previewjob: 40
|'MessageCount'=40;50;60
[nagios@ XXXX ~]$
But we are getting the below error while running from Nagios console
C:\Program Files\NSClient++\scripts\check_msmq.vbs(68, 4) Microsoft VBScript runtime error: Type mismatch: 'CInt'
Nagios Service definition
define service {
host_name XXXX
service_description Monitoring_PROD_MSMQ_Queue
check_command check_win_msmq!'MessageCount DIRECT=OS:XXXX\private$\previewjob 50 60'!!!!!!!
max_check_attempts 3
check_interval 2
retry_interval 2
check_period xi_timeperiod_24x7
notification_interval 0
notification_period xi_timeperiod_24x7
notification_options c,
notifications_enabled 0
register 1
}
Kindly help us on how to resolve this error ?
Need help on check_msmq plugin
Re: Need help on check_msmq plugin
Please try changing this:
To this:
Or this:
Note: Note the wrapping ' have been changed to doublequotes as well
See here for more information:
https://support.nagios.com/kb/article/n ... s-580.html
Let us know the results.
Thank you!
Code: Select all
'MessageCount DIRECT=OS:XXXX\private$\previewjob 50 60'Code: Select all
'MessageCount DIRECT=OS:XXXX\private\$$\previewjob 50 60'Code: Select all
"MessageCount DIRECT=OS:XXXX\private$"$"\previewjob 50 60"See here for more information:
https://support.nagios.com/kb/article/n ... s-580.html
Let us know the results.
Thank you!
Re: Need help on check_msmq plugin
Thanks for the update. I am able to resolve this issue after removing PInt variables from script and hardcoded the threshold values.
From
valMaxWarn = CInt(objArgs(2))
valMaxCrit = CInt(objArgs(3))
To
valMaxWarn = 20
valMaxCrit =30
Kindly let us know if there is any way to find out how many messages are received per day ?
From
valMaxWarn = CInt(objArgs(2))
valMaxCrit = CInt(objArgs(3))
To
valMaxWarn = 20
valMaxCrit =30
Kindly let us know if there is any way to find out how many messages are received per day ?
Re: Need help on check_msmq plugin
That's great to hear!
Unfortunately I was unable to find a plugin that would get you the total messages per day, you would likely need to write one yourself if that information is available.
Let us know if you have any questions.
Thank you
Unfortunately I was unable to find a plugin that would get you the total messages per day, you would likely need to write one yourself if that information is available.
Let us know if you have any questions.
Thank you