Issue with send_nrdp

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Issue with send_nrdp

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

Re: Issue with send_nrdp

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: Issue with send_nrdp

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

Re: Issue with send_nrdp

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: Issue with send_nrdp

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

Re: Issue with send_nrdp

Post 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');
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: Issue with send_nrdp

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

Re: Issue with send_nrdp

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bsivavani
Posts: 339
Joined: Tue Oct 06, 2015 9:17 am

Re: Issue with send_nrdp

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

Re: Issue with send_nrdp

Post 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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked