NRDP - NO REQUEST HANDLER
-
ssa_nagios
- Posts: 38
- Joined: Fri Jun 13, 2014 12:52 pm
NRDP - NO REQUEST HANDLER
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?
[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
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
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
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
Finally, could you attach this file from your server
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=**************Code: Select all
/usr/local/nagiosxi/html/includes/components/nrdsconfigmanager/nrdsconfigmanager.php-
ssa_nagios
- Posts: 38
- Joined: Fri Jun 13, 2014 12:52 pm
Re: NRDP - NO REQUEST HANDLER
Scott,
For the first one I get
For the first one I get
Code: Select all
-bash: http://***.***.***.***/nrdp/?cmd=nrdsgetclient: No such file or directoryCode: Select all
I have also attached a copy of the nrdsconfigmanager.php file as you have requestedYou 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
Sorry, the first one was supposed to read
the error you saw from nrdsconfigmanager.php in inconsequential.
Code: Select all
curl http://***.***.***.***/nrdp/?cmd=hello&token=**************-
ssa_nagios
- Posts: 38
- Joined: Fri Jun 13, 2014 12:52 pm
Re: NRDP - NO REQUEST HANDLER
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>
[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
It looks like you still are running the old command. Please run the following:
Make sure the command is "hello" and not "nrdsgetclient". You should see output like this:
Code: Select all
curl http://***.***.***.***/nrdp/?cmd=hello&token=**************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
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
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