How monitor MSMQ

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
azam101
Posts: 50
Joined: Fri Mar 18, 2016 6:01 am

Re: How monitor MSMQ

Post by azam101 »

what do you mean?

it is already uncommented

if you mean try the below then I have already done this and it was the same:

;# COMMAND ARGUMENT PROCESSING
; This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
allow_arguments=0
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How monitor MSMQ

Post by rkennedy »

No, it's not.
You do not have the required permissions to view the files attached to this post.
Former Nagios Employee
azam101
Posts: 50
Joined: Fri Mar 18, 2016 6:01 am

Re: How monitor MSMQ

Post by azam101 »

Hi,

I have made the changes but still same issue, see the current on config file.

I have also attached the current log file
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How monitor MSMQ

Post by rkennedy »

What version of NSClient++ are you running? The configuration file looks a bit different -

Mine -

Code: Select all

[/settings/external scripts]
;check_ms_win_disk_load = cmd /c echo scripts\powershell\check_ms_win_disk_load.ps1 $ARG1$; exit $LastExitCode | powershell.exe /noprofile -command -
;topcpu = powershell.exe scripts\powershell\topcpu.ps1

; COMMAND TIMEOUT - The maximum time in seconds that a command can execute. (if more then this execution will be aborted). NOTICE this only affects external commands not internal ones.
timeout = 60

; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow nasty characters = 1

; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = 1
Yours -

Code: Select all

[NRPE]
;# NRPE PORT NUMBER
;  This is the port the NRPEListener.dll will listen to.
;port=5666
;
;# COMMAND TIMEOUT
;  This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off.
;command_timeout=60
;
;# COMMAND ARGUMENT PROCESSING
;  This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
allow_arguments=0
Just wondering with the differences there as your formatting isn't the same.

One thing I noticed - you'll need to change allow_arguments=0 to allow_arguments=1 - even though they are uncommented, 0 means no, and 1 means yes. Change this in all applicable places and try once again.
Former Nagios Employee
azam101
Posts: 50
Joined: Fri Mar 18, 2016 6:01 am

Re: How monitor MSMQ

Post by azam101 »

NsClient++ version 0.3.9.328

I have uncommented the below:

CheckExternalScripts.dll
NRPEClient.dll

In the allowed Hosts I have entered the nagios server ip address

allow_arguments are all set to 1
and also allow_nasty_meta_chars all set to 1

I have also uncommented:
Check_vbs_sample and Check_powershell_warn in the External Scripts

ini file and log file attached

Now im getting the error :

2016-05-18 09:42:42: message:NSClient++.cpp:1195: No handler for command: 'ommand'
2016-05-18 09:42:42: message:include\NSCHelper.cpp:238: No handler for command 'ommand'.
2016-05-18 09:42:45: message:NSClient++.cpp:1195: No handler for command: 'ommand'
2016-05-18 09:42:45: message:include\NSCHelper.cpp:238: No handler for command 'ommand'.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: How monitor MSMQ

Post by tgriep »

The nsc.ini file looks like is should work. The errors in the nsclient.log file could be caused by a mis-configured check on the XI server.
Can you post the service config from the XI server so we can review it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
azam101
Posts: 50
Joined: Fri Mar 18, 2016 6:01 am

Re: How monitor MSMQ

Post by azam101 »

Where is the service config file located? and how can I export it from the nagios xi server?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: How monitor MSMQ

Post by rkennedy »

Navigate to Home -> Configure -> Core Config Manager -> Click 'Services' on the left -> Find the service that's failing, then click the floppy disk icon (View Text Config) and paste that output here.
Former Nagios Employee
azam101
Posts: 50
Joined: Fri Mar 18, 2016 6:01 am

Re: How monitor MSMQ

Post by azam101 »

Code: Select all

###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date:	      2016-05-19 16:32:46
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND --- 
# Nagios CCM will overwrite all manual settings during the next update if you 
# would like to edit files manually, place them in the 'static' directory or 
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define service {
	host_name			jus2k8app02
	service_description		CPU Usage
	use				xiwizard_windowsserver_nsclient_service
	check_command			check_xi_service_nsclient!Killerd0g!CPULOAD!-l 5,80,90
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	contacts			nagiosadmin
	_xiwizard			windowsserver
	register			1
	}	

define service {
	host_name			jus2k8app02
	service_description		Drive C: Disk Usage
	use				xiwizard_windowsserver_nsclient_service
	check_command			check_xi_service_nsclient!Killerd0g!USEDDISKSPACE!-l C -w 80 -c 95
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	contacts			nagiosadmin
	_xiwizard			windowsserver
	register			1
	}	

define service {
	host_name			jus2k8app02
	service_description		Memory Usage
	use				xiwizard_windowsserver_nsclient_service
	check_command			check_xi_service_nsclient!Killerd0g!MEMUSE!-w 80 -c 90
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	contacts			nagiosadmin
	_xiwizard			windowsserver
	register			1
	}	

define service {
	host_name			jus2k8app02
	service_description		MSMQ MessageCount
	check_command			check_msmq!MessageCount DIRECT=OS:jus2k8app02\private$\CRMHistory_2 100 200!!!!!!!
	max_check_attempts		2
	check_interval			1
	retry_interval			1
	check_period			24x7
	notification_interval		60
	notification_options		w,c,u,r,f,s,
	notifications_enabled		1
	contacts			nagiosadmin
	register			1
	}	

define service {
	host_name			jus2k8app02
	service_description		Ping
	use				xiwizard_windowsserver_ping_service
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	contacts			nagiosadmin
	_xiwizard			windowsserver
	register			1
	}	

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
Last edited by tmcdonald on Thu May 19, 2016 4:41 pm, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: How monitor MSMQ

Post by ssax »

I'm pretty sure it's the $ in your command, in XI put single quotes around your $ARG1$ on the service:

Code: Select all

'MessageCount DIRECT=OS:jus2k8app02\private$\CRMHistory_2 100 200'
Let us know the results.
Locked