check_nrpe - CheckServiceState Exclusion Problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tbmay
Posts: 67
Joined: Wed Jan 22, 2014 6:23 pm

check_nrpe - CheckServiceState Exclusion Problem

Post by tbmay »

Installed Version: 2014R2.7

Host Centos6.6

Good morning,

This exclusion:

exclude="SQLAgent$DESTINY"

...is making trouble for me with check_nrpe CheckServiceState.

It works in "Test Check Command" and on the CLI, but it doesn't work where it matters.

I know from from running the test command escaping the $ sign when I was trying to make it work it was adding additional \ to the command in test.

What to do?

Best regards.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: check_nrpe - CheckServiceState Exclusion Problem

Post by jolson »

The dollar sign can be a difficult symbol. Can you please show us what you have configured on the Web GUI with regards to this service? Also, what does the error message say exactly?

You may need to escape it three times (\\\) for this check to work properly.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
tbmay
Posts: 67
Joined: Wed Jan 22, 2014 6:23 pm

Re: check_nrpe - CheckServiceState Exclusion Problem

Post by tbmay »

Please find the attachment.

The exclude= I have above was simply added to the end.

I just removed the quotes and escaped it 3 times and the check stopped working altogether.

Put it back but I'm still not excluding that service.

As I said, it works fine in the test command. Also on the cli both with quotes and a single escape (\$DESTINY). Just not working where it needs to work.

Thanks.
You do not have the required permissions to view the files attached to this post.
tbmay
Posts: 67
Joined: Wed Jan 22, 2014 6:23 pm

Re: check_nrpe - CheckServiceState Exclusion Problem

Post by tbmay »

BTW...there is no error message. It's just not excluding the service.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: check_nrpe - CheckServiceState Exclusion Problem

Post by jolson »

Have you tried changing exclude="SQLAgent$DESTINY" to exclude="SQLAgent\$DESTINY" on the Web GUI? The 'test this command' check may fail, but apply configuration and see if that works out for you.

Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
tbmay
Posts: 67
Joined: Wed Jan 22, 2014 6:23 pm

Re: check_nrpe - CheckServiceState Exclusion Problem

Post by tbmay »

No dice...

Could not construct return packet in NRPE handler check client side (nsclient.log) logs...
tbmay
Posts: 67
Joined: Wed Jan 22, 2014 6:23 pm

Re: check_nrpe - CheckServiceState Exclusion Problem

Post by tbmay »

...and when I escaped 3 times that was the error it gave.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: check_nrpe - CheckServiceState Exclusion Problem

Post by jdalrymple »

I'm curious about what you see in the Nagios Core interface after creating various derivatives of the check.

Go to http://<nagios IP>/nagios - put in your username and password

Configuration in the left pane
Services in the dropdown
Continue
Find your service, then click on the check command column to view the command expansion

Can you take a look at it from that angle? Note that you *WILL* have to apply config to make the view in the Nagios Core Configuration change. I'm afraid the next step after that would be to spin up the debug log which can be absolutely terrible to sift through.
tbmay
Posts: 67
Joined: Wed Jan 22, 2014 6:23 pm

Re: check_nrpe - CheckServiceState Exclusion Problem

Post by tbmay »

Sorry about the delay. I've been tied up. While I haven't SPECIFICALLY looked at the core interface, I'm using clients on my phone and pc that look at core and they had the same issue when I applied the check the last couple of times.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_nrpe - CheckServiceState Exclusion Problem

Post by ssax »

Try it with:

Code: Select all

exclude='SQLAgent$DESTINY'
Locked