Issue with NRDP check
Issue with NRDP check
Hi,
We are using nrdp version 0.3 and trying to do send alert from remote server using nrdp, but getting below error
[root@XXXX Syslog_duplication]# bash /usr/local/nagios/scripts/Syslog_duplication/send_nrdp.sh -u http://XXXX/nrdp/ -t 0pujUkihCQvd -H XXXX -s 'LIN_Server_Syslog_Monitoring' -S 2 -o "ok"
ERROR: could not connect to NRDP server at http://XXXX/nrdp/
[root@XXXX Syslog_duplication]#
From browser also I am unable to connect, please find the screenshot.
Kindly advice ?
We are using nrdp version 0.3 and trying to do send alert from remote server using nrdp, but getting below error
[root@XXXX Syslog_duplication]# bash /usr/local/nagios/scripts/Syslog_duplication/send_nrdp.sh -u http://XXXX/nrdp/ -t 0pujUkihCQvd -H XXXX -s 'LIN_Server_Syslog_Monitoring' -S 2 -o "ok"
ERROR: could not connect to NRDP server at http://XXXX/nrdp/
[root@XXXX Syslog_duplication]#
From browser also I am unable to connect, please find the screenshot.
Kindly advice ?
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: Issue with NRDP check
This error makes it look like there isn't a webserver running on XXXX or it is not accessible from your browser OR the server you are trying to send from
from the server you are trying to send from can you run the following replacing XXXX with the host you have in the URL and report the output
from the server you are trying to send from can you run the following replacing XXXX with the host you have in the URL and report the output
Code: Select all
ping XXXX
curl -vvv "http://XXXX/nrdp/"Re: Issue with NRDP check
Ping is working.
Please find curl command
[root@remoteserver file_log]# curl -vvv "http://nagiosserver/nrdp/"
* About to connect() to nagiosserver port 80 (#0)
* Trying 10.90.3.132...
* Connected to nagiosserver (nagiosserverip) port 80 (#0)
> GET /nrdp/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: nagiosserver
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 500 Internal Server Error
< Date: Wed, 09 Oct 2019 17:08:05 GMT
< Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16
< X-Powered-By: PHP/5.4.16
< Content-Length: 0
< Connection: close
< Content-Type: text/html; charset=UTF-8
<
* Closing connection 0
[root@nagiosserver file_log]#
Please find curl command
[root@remoteserver file_log]# curl -vvv "http://nagiosserver/nrdp/"
* About to connect() to nagiosserver port 80 (#0)
* Trying 10.90.3.132...
* Connected to nagiosserver (nagiosserverip) port 80 (#0)
> GET /nrdp/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: nagiosserver
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 500 Internal Server Error
< Date: Wed, 09 Oct 2019 17:08:05 GMT
< Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16
< X-Powered-By: PHP/5.4.16
< Content-Length: 0
< Connection: close
< Content-Type: text/html; charset=UTF-8
<
* Closing connection 0
[root@nagiosserver file_log]#
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue with NRDP check
Something is causing an error on nagiosserver
Can you log into nagiosserver and run the following
or
what OS and version is this Nagios XI server?
Can you log into nagiosserver and run the following
Code: Select all
grep nrdp /var/log/httpd/error_log Code: Select all
grep nrdp /var/log/apache2/error.logRe: Issue with NRDP check
I am using Nagios XI 5.6.7 with CentOS 7.
Whenever I am running command from remote server, getting the below error in log
[root@XXXX ~]# grep nrdp /var/log/httpd/error_log
[Wed Oct 09 17:50:02.330340 2019] [:error] [pid 4509] [client remoteserver:65158] PHP Parse error: syntax error, unexpected 'pujUkihCQvd' (T_STRING), expecting ')' in /drbd/nrdp/server/config.inc.php on line 11
[Wed Oct 09 17:52:14.370884 2019] [:error] [pid 30931] [client remoteserver:65160] PHP Parse error: syntax error, unexpected 'pujUkihCQvd' (T_STRING), expecting ')' in /drbd/nrdp/server/config.inc.php on line 11
[root@XXXX ~]#
Command using
[root@nagiosserver Syslog_duplication]# bash /usr/local/nagios/scripts/Syslog_duplication/send_nrdp.sh -u http://nagiosserver/nrdp/ -t 0pujUkihCQvd -H remoteserver -s 'LIN_Server_Syslog_Monitoring' -S 2 -o "ok"
ERROR: could not connect to NRDP server at http://nagiosserver/nrdp/
[root@nagiosserver Syslog_duplication]#
I have observed that the token which I am using in command (taken from Inbound Transfers) is different then which is logged in log file.
Whenever I am running command from remote server, getting the below error in log
[root@XXXX ~]# grep nrdp /var/log/httpd/error_log
[Wed Oct 09 17:50:02.330340 2019] [:error] [pid 4509] [client remoteserver:65158] PHP Parse error: syntax error, unexpected 'pujUkihCQvd' (T_STRING), expecting ')' in /drbd/nrdp/server/config.inc.php on line 11
[Wed Oct 09 17:52:14.370884 2019] [:error] [pid 30931] [client remoteserver:65160] PHP Parse error: syntax error, unexpected 'pujUkihCQvd' (T_STRING), expecting ')' in /drbd/nrdp/server/config.inc.php on line 11
[root@XXXX ~]#
Command using
[root@nagiosserver Syslog_duplication]# bash /usr/local/nagios/scripts/Syslog_duplication/send_nrdp.sh -u http://nagiosserver/nrdp/ -t 0pujUkihCQvd -H remoteserver -s 'LIN_Server_Syslog_Monitoring' -S 2 -o "ok"
ERROR: could not connect to NRDP server at http://nagiosserver/nrdp/
[root@nagiosserver Syslog_duplication]#
I have observed that the token which I am using in command (taken from Inbound Transfers) is different then which is logged in log file.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue with NRDP check
There is a PHP error, please show the following
Code: Select all
grep pujUkihCQvd /drbd/nrdp/server/config.inc.phpRe: Issue with NRDP check
Please find output
[root@XXXX ~]# grep pujUkihCQvd /drbd/nrdp/server/config.inc.php
$cfg['authorized_tokens'] = array(0pujUkihCQvd);
[root@XXXX ~]#
[root@XXXX ~]# grep pujUkihCQvd /drbd/nrdp/server/config.inc.php
$cfg['authorized_tokens'] = array(0pujUkihCQvd);
[root@XXXX ~]#
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue with NRDP check
Edit the file and change this
to this
Code: Select all
$cfg['authorized_tokens'] = array(0pujUkihCQvd);Code: Select all
$cfg['authorized_tokens'] = array('0pujUkihCQvd');Re: Issue with NRDP check
Now I am getting the other error
[root@XXXX Syslog_duplication]# bash /usr/local/nagios/scripts/Syslog_duplication/send_nrdp.sh -u http://nagiosserver/nrdp/ -t 0pujUkihCQvd -H remoteserver -s 'LIN_Server_Syslog_Monitoring' -S 2 -o "ok"
ERROR: The NRDP Server said BAD CHECK RESULTS DIR
[root@XXXX Syslog_duplication]#
checkresults file permissions
[root@nagioserver nagios]# ls -ld /usr/local/nagios/var/spool/checkresults
drwsrwsr-x. 2 nagios nagios 6 Oct 9 13:04 /usr/local/nagios/var/spool/checkresults
[root@nagiosserver nagios]#
[root@XXXX Syslog_duplication]# bash /usr/local/nagios/scripts/Syslog_duplication/send_nrdp.sh -u http://nagiosserver/nrdp/ -t 0pujUkihCQvd -H remoteserver -s 'LIN_Server_Syslog_Monitoring' -S 2 -o "ok"
ERROR: The NRDP Server said BAD CHECK RESULTS DIR
[root@XXXX Syslog_duplication]#
checkresults file permissions
[root@nagioserver nagios]# ls -ld /usr/local/nagios/var/spool/checkresults
drwsrwsr-x. 2 nagios nagios 6 Oct 9 13:04 /usr/local/nagios/var/spool/checkresults
[root@nagiosserver nagios]#
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue with NRDP check
Same as before, lets check the following
make sure apache is a member of the nagios group
https://support.nagios.com/forum/viewto ... 10#p294282
Code: Select all
grep nagios /etc/grouphttps://support.nagios.com/forum/viewto ... 10#p294282