Page 2 of 2

Re: check_nrpe -> check_pdh issue

Posted: Mon Jun 12, 2017 10:05 am
by dwhitfield
Do you have the same issue with NSClient .4.4? It's the only version we truly support. That's not to say we can't continue to help with your issue, but we don't test against any other versions, so it's hard to know if it will work.

Re: check_nrpe -> check_pdh issue

Posted: Tue Jun 13, 2017 1:46 am
by stefanmadsen
version 4.x was in my mind fairly buggy, so if this is the case - perhaps you should update your supportability :)

and no we went for a newer 5.x version as these are much leaner and bug free.

now, please address the elephant in the room here - instead of going around it.
why is it, when i pull the value from Linux commandline it Works.. and even in the nagiosxi command tester thing it Works... but it doesnt when scheduled as a check?

also please bare in mind, that we have many other check_pdh checks that Works just fine

Re: check_nrpe -> check_pdh issue

Posted: Tue Jun 13, 2017 10:29 am
by tgriep
It all has to do with how the string is escaped in the check whether it will run in the Nagios GUI or not.
Having single quotes, double quotes, dollar signs and slashes in the names can be difficult sometimes.

Setting your argument to the following should work for you. Can you update your command to the following and also post it's settings?

Code: Select all

-a "counter:Memory Manager SQL Cache Memory (KB)=\MSSQL$"$"MSSQL2014:Memory Manager\SQL Cache Memory (KB)"
Also, can you login to the MSSQL server and check the nsclient.log file for any errors when the check it run?
There might be something in it that will help troubleshoot the issue.

Re: check_nrpe -> check_pdh issue

Posted: Wed Jun 14, 2017 1:48 am
by stefanmadsen
I appreciate that you're trying, but please go back and read the entire topic - We've already gone through this example.
But just for kicks - i copy pasted your example - and nope it doesnt Work. - the value is 0

as I've also previously stated, i dont have access to the machine so i cannot check the nsclient log file nor can i rdp through to it. - however i will try and find someone that can.

I still see no answer as to why nagiosxi is not parsing the returned message properly

Re: check_nrpe -> check_pdh issue

Posted: Wed Jun 14, 2017 10:01 am
by tgriep
I understand your frustration in this but the argument should work for you.
It is either passing the argument incorrectly to the Windows system and the nsclient.log file should show that.
I know you cannot login to the server but we will need to see that file to troubleshoot the issue. It should show an error if the counter is getting sent to the NSClient service incorrectly.
What version of the check_nrpe plugin are you running?
Run the following on the Nagios server and post the version number. You may want to upgrade to the latest.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -V
https://github.com/NagiosEnterprises/nrpe

One thing to try, copy the service check in the Core Config Manager and give it a different name and see if that fails as well.
It could be a corrupted setting in the check causing it.

Re: check_nrpe -> check_pdh issue

Posted: Thu Jun 15, 2017 1:42 am
by stefanmadsen
stefanmadsen wrote:note that we are running NRPE v3
I'm working on getting the nsclient log file.

Re: check_nrpe -> check_pdh issue

Posted: Thu Jun 15, 2017 9:06 am
by tgriep
Ok, post the nsclient.log file when you have the chance.
Are you using NRPE version 3.0, 3.0.1, 3.1.0 or 3.1.1?

Re: check_nrpe -> check_pdh issue

Posted: Fri Jun 16, 2017 2:08 am
by stefanmadsen

Code: Select all

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: nrpe-3.0
Last Modified: 07-12-2016
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: OpenSSL 0.9.6 or higher required

Re: check_nrpe -> check_pdh issue

Posted: Fri Jun 16, 2017 10:11 am
by tgriep
You may want to upgrade to the latest version of NRPE but I don't think it will help.
https://support.nagios.com/kb/article/n ... ource.html

Can you run the following on the Nagios server and post the output?

Code: Select all

grep MSSQL2014 /usr/local/nagios/var/objects.cache
This will show that the Nagios server will use for the check command.
Also, can you open the /usr/local/nagios/var/status.dat file, find that service check and post the full output here so we can see what the current status of the check is?