Page 1 of 2

NRDP

Posted: Fri Oct 14, 2011 1:14 pm
by SDohmen
I have installed the nagiosxi 1.7 on a centos 6 machine. Later on i added (official) ssl certificates and am currently running the ssl version of the website.

The problem i am facing is that when i try to reach nrdp from a customer it just errors out. With the manual browsing to the nrdp link it works fine btw.

The errors i recieve are the following:

Code: Select all

root@nagios[pts/0]:/etc/nagios3 # /usr/bin/php /usr/local/nrdp/clients/send_nrdp.php  --url=central.**/nrdp --token=** --host=$HOSTNAME$ --service='$SERVICEDESC$' --state=$SERVICESTATE$ --output='$SERVICEOUTPUT$ | $SERVICEPERFDATA$ [$SERVICECHECKCOMMAND$]'
PHP Notice:  Undefined index: host in /usr/local/nrdp/clients/send_nrdp.php on line 368
PHP Warning:  fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /usr/local/nrdp/clients/send_nrdp.php on line 368
PHP Warning:  fsockopen(): unable to connect to :443 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /usr/local/nrdp/clients/send_nrdp.php on line 368

root@nagios[pts/0]:/etc/nagios3 # /usr/bin/php /usr/local/nrdp/clients/send_nrdp.php  --url=https://central.**/nrdp --token=** --host=$HOSTNAME$ --service='$SERVICEDESC$' --state=$SERVICESTATE$ --output='$SERVICEOUTPUT$ | $SERVICEPERFDATA$ [$SERVICECHECKCOMMAND$]'
PHP Warning:  fsockopen(): unable to connect to central.**:80 (Connection timed out) in /usr/local/nrdp/clients/send_nrdp.php on line 368

I tried changing the port to 443 on the line 368 but even then i get no response or anything. Does anyone have a clue how i can resolve this?

Re: NRDP

Posted: Mon Oct 17, 2011 3:40 am
by SDohmen
To add some more info.

I made the website available on port 80 and then NRDP works. Do it set it to SSL again it stops working. I also tried the redirect to see if that would make it go for SSL but also here no luck.

Re: NRDP

Posted: Mon Oct 17, 2011 10:40 am
by nscott
SDohmen,

On your Nagios XI server, can you access

Code: Select all

https://<server address>/nrdp

Re: NRDP

Posted: Mon Oct 17, 2011 12:10 pm
by SDohmen
Yes i can.

When i access it at http://<ip>/nrdp i get redirected to the https version even.

Re: NRDP

Posted: Tue Oct 18, 2011 10:13 am
by mguthrie
fsockopen(): unable to connect to :443 (php_network_getaddresses: getaddrinfo failed: Name or service not known)
Does that remote machine have that host's name defined in the /etc/hosts file, or is it a FQDN?

Re: NRDP

Posted: Tue Oct 18, 2011 1:08 pm
by SDohmen
Both to be precise. The hostname is in there and the full fqdn.

Re: NRDP

Posted: Sun Oct 23, 2011 4:46 am
by SDohmen
Anyone else have an idea what could be wrong or how to solve this?

Re: NRDP

Posted: Mon Oct 24, 2011 3:15 am
by SDohmen
I have been testing this whole morning and what i found out is if i dont force ssl with the rewrite, it works, but only as http sending. Even if i use the https link i can clearly read the packet since its not being encrypted. To still force ssl i enabled the sslrequired option in the nrdp.cfg file. But again i am still recieving unencrypted packets fully readable.

What i am wondering now is, if the main central actually is not the problem. It may sound strange but for some reason i am beginning to think that on the sending side it has to be ssl encrypted in some way. I might be wrong here (and prolly are) but does the sending end have to be ssl encrypted aswell?

Re: NRDP

Posted: Mon Oct 24, 2011 11:01 am
by mguthrie
http://assets.nagios.com/downloads/nagi ... erview.pdf

Try wrapping the hostname macro in double quotes, and if that doesn't work, try single quotes.

root@nagios[pts/0]:/etc/nagios3 # /usr/bin/php /usr/local/nrdp/clients/send_nrdp.php --url=central.**/nrdp --token=** --host=$HOSTNAME$ --service='$SERVICEDESC$' --state=$SERVICESTATE$ --output='$SERVICEOUTPUT$ | $SERVICEPERFDATA$ [$SERVICECHECKCOMMAND$]'
Also, for the URL, you need to specify the full address (https or http)

Re: NRDP

Posted: Mon Oct 24, 2011 2:57 pm
by SDohmen
I tried both of the above but both wont send anything to an SSL connection. As i mentioned before the HTTP part works just fine but there is no encryption. If i force it to a SSL its still not encrypted as it uses the http header. My best guess is that something is wrong on the send nrdp script even though i replaced it several times now.