Page 1 of 2

NRDP - NO REQUEST HANDLER

Posted: Thu Jul 31, 2014 12:46 pm
by ssa_nagios
I've been trying to setup NRDP to perform passive checks but when trying to perform the Client install instructions on the remote host I get the following error:

[root@nsc-prd-nagiosim-008 ~]# wget -O linuxgroup.tar.gz "http://***.***.***.***/nrdp/?cmd=nrdsgetclient&token=*****************&configname=linuxgroup"
--2014-07-31 13:43:10-- http://***.***.***.***/nrdp/?cmd=nrdsgetclient&token=*********************&configname=linuxgroup
Connecting to ***.***.***.***:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18 [text/html]
Saving to: “linuxgroup.tar.gz”

100%[===============================================================================================================>] 18 --.-K/s in 0s

2014-07-31 13:43:10 (3.18 MB/s) - “linuxgroup.tar.gz” saved [18/18]

The file doesn't appear to be downloading to the remote host.

Looking at the /var/log/httpd/error_log I see the following:

PHP Notice: Undefined index: HOSTNAME in /usr/local/nagiosxi/html/includes/components/nrdsconfigmanager/nrdsconfigmanager.php on line 559, referer: http://****************************/nagiosxi/includes/components/nrdsconfigmanager/nrdsconfigmanager.php

Any ideas as to how and resolve this?

Re: NRDP - NO REQUEST HANDLER

Posted: Fri Aug 01, 2014 11:51 am
by sreinhardt
Have you configured either service via the Admin page in XI? Otherwise your url request looks fine, I think you are just missing a few config steps here.

Re: NRDP - NO REQUEST HANDLER

Posted: Tue Aug 05, 2014 7:44 am
by ssa_nagios
Yes I have configured nrdp via the admin page. NRDP has a token assigned to allow access to the API. What other steps are there?

Re: NRDP - NO REQUEST HANDLER

Posted: Tue Aug 05, 2014 4:59 pm
by scottwilkerson
not to expose your token, but by chance does it have a & in it?

Also, what do you get if you run the following from the remote client and post the output

Code: Select all

http://***.***.***.***/nrdp/?cmd=hello&token=**************
Finally, could you attach this file from your server

Code: Select all

/usr/local/nagiosxi/html/includes/components/nrdsconfigmanager/nrdsconfigmanager.php

Re: NRDP - NO REQUEST HANDLER

Posted: Wed Aug 06, 2014 6:24 am
by ssa_nagios
Scott,

For the first one I get

Code: Select all

-bash: http://***.***.***.***/nrdp/?cmd=nrdsgetclient: No such file or directory

Code: Select all

I have also attached a copy of the nrdsconfigmanager.php file as you have requested

Re: NRDP - NO REQUEST HANDLER

Posted: Wed Aug 06, 2014 7:58 am
by scottwilkerson
Sorry, the first one was supposed to read

Code: Select all

curl http://***.***.***.***/nrdp/?cmd=hello&token=**************
the error you saw from nrdsconfigmanager.php in inconsequential.

Re: NRDP - NO REQUEST HANDLER

Posted: Thu Aug 07, 2014 11:45 am
by ssa_nagios
curl http://***.***.***.***/nrdp/?cmd=nrdsgetclient&token=****************
[1] 8596
[2] 8597
[<?xml version="1.0" encoding="utf-8"?>
<result>
<status>-1</status>
<message>NO TOKEN</message>
</result>

Re: NRDP - NO REQUEST HANDLER

Posted: Thu Aug 07, 2014 4:42 pm
by tmcdonald
It looks like you still are running the old command. Please run the following:

Code: Select all

curl http://***.***.***.***/nrdp/?cmd=hello&token=**************
Make sure the command is "hello" and not "nrdsgetclient". You should see output like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<response>
  <status>0</status>
  <message>OK</message>
  <product>nrdp</product>
  <version>1.1</version>
</response>

Re: NRDP - NO REQUEST HANDLER

Posted: Fri Aug 08, 2014 6:05 am
by ssa_nagios
Same result:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<result>
  <status>-1</status>
  <message>NO TOKEN</message>
</result>

Re: NRDP - NO REQUEST HANDLER

Posted: Fri Aug 08, 2014 2:52 pm
by tmcdonald
Just so we can verify, could you please post both the command you are running and the output? And are you populating both the IP address *and* the token? Sorry if this sounds basic, but we need to make sure that you are typing exactly what you should be.