Page 1 of 3

Issue with send_nrdp

Posted: Fri Oct 04, 2019 5:45 am
by bsivavani
Hi,

We are using nrdp version 0.3 and trying to do check on remote server, but getting below error

ERROR: The NRDP Server said NO TOKENS

Command on remote server
/usr/local/nagios/scripts/Syslog_duplication/send_nrdp.sh -u http://nagiosxiserver/nrdp/ -t pWiljdyhf -H syslogserver -s 'LIN_Server_Syslog_Monitoring' -S 2 -o "test"

Kindly advice ?

Re: Issue with send_nrdp

Posted: Fri Oct 04, 2019 7:13 am
by scottwilkerson
For some reason the token doesn't appear to be configured in XI

Go to Admin -> Inbound Transfers
Click "Update Settings" to make sure the token is written to the configuration

If it still doesn't work, send the output of the following from the XI server

Code: Select all

grep "authorized_tokens" /usr/local/nrdp/server/config.inc.php

Re: Issue with send_nrdp

Posted: Mon Oct 07, 2019 8:43 am
by bsivavani
I am still seeing the issue after click "Update Settings".

Please find requested output

[root@XXXXX ~]# grep "authorized_tokens" /usr/local/nrdp/server/config.inc.php
$cfg['authorized_tokens'] = array();
[root@XXXXX ~]#

Re: Issue with send_nrdp

Posted: Mon Oct 07, 2019 8:45 am
by scottwilkerson
What are the permissions of this file

Code: Select all

ls -al /usr/local/nrdp/server/config.inc.php
and the directories

Code: Select all

ls -ld /usr/local/nrdp/server/
ls -ld /usr/local/nrdp
What OS is your Nagios XI Server running?

Re: Issue with send_nrdp

Posted: Mon Oct 07, 2019 9:19 am
by bsivavani
Please find requested details

[root@XXXX ~]# ls -al /usr/local/nrdp/server/config.inc.php
-rw-rw-r--. 1 nagios nagios 2744 Aug 28 15:10 /usr/local/nrdp/server/config.inc.php
[root@XXXX ~]#

[root@XXXX ~]# ls -ld /usr/local/nrdp/server/
drwxr-xr-x. 4 nagios nagios 76 Oct 7 13:39 /usr/local/nrdp/server/
[root@XXXX ~]# ls -ld /usr/local/nrdp
lrwxrwxrwx. 1 root root 10 Aug 29 13:09 /usr/local/nrdp -> /drbd/nrdp

[root@XXXX ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@XXXX ~]#

Re: Issue with send_nrdp

Posted: Mon Oct 07, 2019 10:07 am
by scottwilkerson
Weird, lets edit /usr/local/nrdp/server/config.inc.php

Change this

Code: Select all

$cfg['authorized_tokens'] = array();
to this

Code: Select all

$cfg['authorized_tokens'] = array('pWiljdyhf');

Re: Issue with send_nrdp

Posted: Mon Oct 07, 2019 11:43 am
by bsivavani
I updated the config.ini.php with token.

Now I am getting the below error

[root@XXXX ~]# bash /usr/local/nagios/scripts/Syslog_duplication/send_nrdp.sh -u http://XXXX/nrdp/ -t hTRm7iP3kWrA -H XXXX -s 'LIN_Server_Syslog_Monitoring' -S 2 -o "test"
ERROR: The NRDP Server said BAD TOKEN
[root@XXXX ~]#

Re: Issue with send_nrdp

Posted: Mon Oct 07, 2019 11:48 am
by scottwilkerson
bsivavani wrote: /usr/local/nagios/scripts/Syslog_duplication/send_nrdp.sh -u http://nagiosxiserver/nrdp/ -t pWiljdyhf -H syslogserver -s 'LIN_Server_Syslog_Monitoring' -S 2 -o "test"
In your original post you were using pWiljdyhf as the token so that is what I had you edit the file to...
bsivavani wrote:[root@XXXX ~]# bash /usr/local/nagios/scripts/Syslog_duplication/send_nrdp.sh -u http://XXXX/nrdp/ -t hTRm7iP3kWrA -H XXXX -s 'LIN_Server_Syslog_Monitoring' -S 2 -o "test"
now you are using hTRm7iP3kWrA



You need to edit the file with the token you are going to use.

Re: Issue with send_nrdp

Posted: Mon Oct 07, 2019 1:32 pm
by bsivavani
Used the same token in config.inc.php, but getting the error

[root@XXXX ~]# bash /usr/local/nagios/scripts/Syslog_duplication/send_nrdp.sh -u http://XXXX/nrdp/ -t hTRm7iP3kWrA -H remoteserver -s 'LIN_Server_Syslog_Monitoring' -S 2 -o "test"
ERROR: The NRDP Server said BAD CHECK RESULTS DIR
[root@XXXX ~]#

Re: Issue with send_nrdp

Posted: Mon Oct 07, 2019 2:37 pm
by scottwilkerson
Now you have a different issue
bsivavani wrote:ERROR: The NRDP Server said BAD CHECK RESULTS DIR
what is the path listed here?

Code: Select all

grep check_results_dir /usr/local/nrdp/server/config.inc.php
Does that path exist? If so what are the permissions?