Page 1 of 2
check_nrpe - CheckServiceState Exclusion Problem
Posted: Thu Jul 16, 2015 9:45 am
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.
Re: check_nrpe - CheckServiceState Exclusion Problem
Posted: Thu Jul 16, 2015 1:36 pm
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.
Re: check_nrpe - CheckServiceState Exclusion Problem
Posted: Thu Jul 16, 2015 2:27 pm
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.
Re: check_nrpe - CheckServiceState Exclusion Problem
Posted: Thu Jul 16, 2015 2:28 pm
by tbmay
BTW...there is no error message. It's just not excluding the service.
Re: check_nrpe - CheckServiceState Exclusion Problem
Posted: Thu Jul 16, 2015 3:08 pm
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!
Re: check_nrpe - CheckServiceState Exclusion Problem
Posted: Thu Jul 16, 2015 3:55 pm
by tbmay
No dice...
Could not construct return packet in NRPE handler check client side (nsclient.log) logs...
Re: check_nrpe - CheckServiceState Exclusion Problem
Posted: Thu Jul 16, 2015 3:56 pm
by tbmay
...and when I escaped 3 times that was the error it gave.
Re: check_nrpe - CheckServiceState Exclusion Problem
Posted: Thu Jul 16, 2015 4:06 pm
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.
Re: check_nrpe - CheckServiceState Exclusion Problem
Posted: Thu Jul 23, 2015 3:21 pm
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.
Re: check_nrpe - CheckServiceState Exclusion Problem
Posted: Thu Jul 23, 2015 5:10 pm
by ssax