NSClient++ Help (#1) - check_msmq over check_nrpe (#1019) - Message List

check_msmq over check_nrpe

Hello all,

I have a problem with check_nrpe + check_msmq over Icinga on Centos 6.2.

I am using the NSClient++ 0.3.9 on a windows Server 2008 R2 Standard 64bit.

I want to check some mail queue´s over nrpe with msmq on the windows server.

The problem is when I try to run the following command :

check_nrpe -H 10.0.0.1 -c check_msmq -a ListQueueNames

directly from the Icinga server I get the following response:

DIRECT=OS:server01.domain.de\private$\queue1
DIRECT=OS:server01.domain.de\private$\queue2
DIRECT=OS:server01.domain.de\private$\queue3
DIRECT=OS:server01.domain.de\private$\queue4

When I try to run the following command:

check_nrpe -H 10.0.0.1 -c check_msmq -a MessageCount DIRECT=OS:server01.domain.de\\private$\\queue1 100 200

I get the following response:

MessageCount OK - DIRECT=OS:server01.domain.de\\private$\\queue1: 0|MessageCount=0;100;200

For me this looks ok, so that the commands and responses are doing well. I have edited the following 2 config files at the Icinga server: Commands.cfg & windows.cfg

Commands.cfg:

# 'check_msmq' command definition
define command {
	command_name 	check_msmq
	command_line 	$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 30 -c check_msmq -a $ARG1$ $ARG2$ $ARG3$ $ARG4$
}

Windows.cfg:

define service{
	use			generic-service
	host_name		server01.domain.de
	service_description	MessageCount
	check_command		check_msmq!MessageCount DIRECT=OS:server01.domain.de\\private$$\\queue1 1000 4000
	}

When I try to run the command with Icinga I get the following response in the webfrontend.

Status: Critical
Status Information: Critical – Queue ‘DIRECT=OS:server01.domain.deprivate$queue4’ not found DIRECT=OS:server01.domain.deprivate$queue1

I tried a lot of things but nothing really helped, what I am doing wrong? Thanks for your help

  • Message #2688

    First off since there is a $ there I would be careful to make sure it is escaped properly (but you are using $$ so I assume you have validated this already). Might be a good idea to write a batch wrapper script without the arguments just to make sure that is not the case.

    Also it is a bit puzzling that the last example you post is for BOTH queue1 and queue4 whereas all the others are only for queue1?

Subscriptions