Page 1 of 1

NSClient - ERROR: No performance data from command: check_pd

Posted: Mon May 11, 2020 6:13 am
by DennisPR
Hi,

I am currently moving some hosts and service from an old to a new Nagios XI setup and I'm having some trouble with certain services.
* Old Server : CentOS 6 with Nagios XI 5.6.12
* New Server : CentOS 7 with Nagios XI 5.6.14
* Monitored server is running nsclient 0.5.2.35
When I run the service with the "run check command" from the CCM on the Old Server I get the following :

Code: Select all

[nagios@oldserver ~]$ /usr/local/nagios/libexec/check_nt -H 10.5.133.20 -s "MyPasswd" -p 12489 -v COUNTER  -l "\\Web Service(_Total)\\Current connections","Current Connections %.0f" 
Current Connections 0 | 'Current Connections %.0f'=0.000000%;0.000000;0.000000;
When I run the same service with the "run check command" from the CCM on the NewServer I get the following :

Code: Select all

[nagios@newserver ~]$ /usr/local/nagios/libexec/check_nt -H 10.5.133.20 -s "MyPasswd" -p 12489 -v COUNTER -l "\\Web Service(_Total)\\Current connections","Current Connections %.0f" 
NSClient - ERROR: No performance data from command: check_pdh
When I run it from the new server I get the following error in nsclient.log

Code: Select all

2020-05-11 12:57:01: error:c:\source\master\service\plugin_manager.cpp:475: Unknown command(s): MyPasswd available commands: commands 
All other NRPE or NSCLIENT services are running correct on both servers.
Running the command from the commandline as root on the new server works perfect

Code: Select all

[root@newserver ~]# /usr/local/nagios/libexec/check_nt -H 10.5.133.20 -s "MyPasswd" -p 12489 -v COUNTER -l "\\Web Service(_Total)\\Current connections","Current Connections %.0f"
Current Connections 3 | 'Current Connections %.0f'=3.000000%;0.000000;0.000000;
Running the command from the commandline as nagios user on the new server works perfect as well!

Code: Select all

[root@newserver  ~]# su nagios
[nagios@newserver  root]$ /usr/local/nagios/libexec/check_nt -H 10.5.133.20 -s "MyPasswd" -p 12489 -v COUNTER -l "\\Web Service(_Total)\\Current connections","Current Connections %.0f"
Current Connections 2 | 'Current Connections %.0f'=2.000000%;0.000000;0.000000;
Check_nt is the same version on both server but the file size is different

Code: Select all

[nagios@newserver root]$ /usr/local/nagios/libexec/check_nt --version
check_nt v2.2.1 (nagios-plugins 2.2.1)
[nagios@newserver root]$ ll /usr/local/nagios/libexec/check_nt
-rwxrwxr-x. 1 apache nagios 219488 May 11 12:00 /usr/local/nagios/libexec/check_nt

Code: Select all

[root@oldserver ~]# /usr/local/nagios/libexec/check_nt --version
check_nt v2.2.1 (nagios-plugins 2.2.1)
[root@oldserver  ~]# ll /usr/local/nagios/libexec/check_nt
-rwxrwxr-x 1 apache nagios 186451 Aug  7  2018 /usr/local/nagios/libexec/check_nt
Moving the check_nt binary to the new server doesn't solve the issue

It seems like a rights issue on the new server but I can't seem to find it.
Can someone help me out here pls ?

Re: NSClient - ERROR: No performance data from command: chec

Posted: Mon May 11, 2020 3:11 pm
by cdienger
It looks like it isn't parsing properly and is seeing "MyPasswd" as a command for some reason. Does "MyPasswd" contain special characters? If so, try making a simple password to see if that works and check out https://support.nagios.com/kb/article.php?id=580 which covers using special characters.

Re: NSClient - ERROR: No performance data from command: chec

Posted: Tue May 12, 2020 2:15 am
by DennisPR
MyPasswd only uses letters and numbers

Re: NSClient - ERROR: No performance data from command: chec

Posted: Tue May 12, 2020 12:03 pm
by cdienger
Is the dashboard showing the "No performance" message for this check as well?

Run the following from the command line:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
and then let this run while you run the test in the CCM and provide the output.

Re: NSClient - ERROR: No performance data from command: chec

Posted: Tue May 12, 2020 4:51 pm
by DennisPR
Here's the output

New Server

Code: Select all

CMDLINE=/usr/local/nagios/libexec/check_nt -H 10.5.133.20 -s "MyPasswd" -p 12489 -v COUNTER  -l "\\\\Web Service\(_Total\)\\\\Current connections","Current Connections %.0f"
OUTPUT=NSClient - ERROR: No performance data from command: check_pdh
Old Server

Code: Select all

CMDLINE=/usr/local/nagios/libexec/check_nt -H 10.5.133.20 -s "MyPasswd" -p 12489 -v COUNTER  -l "\\Web Service(_Total)\\Current connections","Current Connections %.0f"
OUTPUT=Current Connections 3 | 'Current Connections %.0f'=3.000000%;0.000000;0.000000;
I suppose that the 4 x \ in the command is causing the error but I don't know why the old server shows less \

Re: NSClient - ERROR: No performance data from command: chec

Posted: Wed May 13, 2020 11:09 am
by cdienger
Try using "\Web Service(_Total)\Current connections" instead in the web UI. This seems generate the correct format in the log this way.

Re: NSClient - ERROR: No performance data from command: chec

Posted: Sun May 31, 2020 7:24 am
by DennisPR
Problem was solved by removing the service from CCM and adding it again.
Something probably went wrong with the config files due to case sensitivity.
I can't see any other logical explanation why it would work that after re-adding exactlyt the same service.

Re: NSClient - ERROR: No performance data from command: chec

Posted: Mon Jun 01, 2020 8:52 am
by scottwilkerson
DennisPR wrote:Problem was solved by removing the service from CCM and adding it again.
Something probably went wrong with the config files due to case sensitivity.
I can't see any other logical explanation why it would work that after re-adding exactlyt the same service.
Glad to hear you were able to get the issue resolved!

Locking thread