NRDP - NO REQUEST HANDLER

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ssa_nagios
Posts: 38
Joined: Fri Jun 13, 2014 12:52 pm

NRDP - NO REQUEST HANDLER

Post 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?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: NRDP - NO REQUEST HANDLER

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
ssa_nagios
Posts: 38
Joined: Fri Jun 13, 2014 12:52 pm

Re: NRDP - NO REQUEST HANDLER

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

Re: NRDP - NO REQUEST HANDLER

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ssa_nagios
Posts: 38
Joined: Fri Jun 13, 2014 12:52 pm

Re: NRDP - NO REQUEST HANDLER

Post 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
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRDP - NO REQUEST HANDLER

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ssa_nagios
Posts: 38
Joined: Fri Jun 13, 2014 12:52 pm

Re: NRDP - NO REQUEST HANDLER

Post 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>
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRDP - NO REQUEST HANDLER

Post 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>
Former Nagios employee
ssa_nagios
Posts: 38
Joined: Fri Jun 13, 2014 12:52 pm

Re: NRDP - NO REQUEST HANDLER

Post by ssa_nagios »

Same result:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<result>
  <status>-1</status>
  <message>NO TOKEN</message>
</result>
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRDP - NO REQUEST HANDLER

Post 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.
Former Nagios employee
Locked