NSClient - ERROR: No performance data from command: check_pd

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
DennisPR
Posts: 149
Joined: Mon May 07, 2012 10:34 am

NSClient - ERROR: No performance data from command: check_pd

Post 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 ?
Last edited by DennisPR on Tue May 12, 2020 2:13 am, edited 1 time in total.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
DennisPR
Posts: 149
Joined: Mon May 07, 2012 10:34 am

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

Post by DennisPR »

MyPasswd only uses letters and numbers
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
DennisPR
Posts: 149
Joined: Mon May 07, 2012 10:34 am

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

Post 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 \
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
DennisPR
Posts: 149
Joined: Mon May 07, 2012 10:34 am

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

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked