Page 1 of 2

NRDS "buffer" to send results once connection restored

Posted: Sun Jan 24, 2016 2:11 pm
by derekb
Hi there,
We're using NRDS for passive monitoring of client devices. In reading the NRDS document here:
https://assets.nagios.com/downloads/nag ... h_NRDS.pdf

It seems from the image in the document that if the NRDS agent is unable to send the results to the XI server, it keeps them on the local agent until the connection back to XI is restored.

Is this something that has to be enabled, or should it work like this by default?

I have a few hosts that when the clients internet connection goes down for an hour, and then restores, we have a 1hr gap in the monitored services.

Any suggestions on where to begin troubleshooting?

Latest XI on Centos6, NRDS running on RaspberryPi

Re: NRDS "buffer" to send results once connection restored

Posted: Mon Jan 25, 2016 5:18 pm
by tmcdonald
I believe this is enabled by default, however in testing this I found some bugs in NRDS that seem not to build the configs, at least for a Windows x64 system. Are your configs being properly updated in Linux land?

Re: NRDS "buffer" to send results once connection restored

Posted: Mon Jan 25, 2016 5:20 pm
by derekb
Well, I can change he config file in XI and next time the cron runes on the remote Linux device, the config gets updated. If that's what you're asking.

Re: NRDS "buffer" to send results once connection restored

Posted: Tue Jan 26, 2016 1:29 pm
by tmcdonald
Yep, that's what I was hoping you would say. I think it might just be our Windows configs that are not properly pushed, but I will need to test further to confirm.

Re: NRDS "buffer" to send results once connection restored

Posted: Tue Jan 26, 2016 1:32 pm
by derekb
tmcdonald wrote:Yep, that's what I was hoping you would say. I think it might just be our Windows configs that are not properly pushed, but I will need to test further to confirm.
Alright.
Anything I can do to test from my end?

Again our setup is as follows: Latest XI on Centos 6. NRDS agent installed on RaspberryPi/Debian Linux. Cron runs and reports data, but if Internet is down etc, data is not stored and sent back to XI when internet connectivity is restored.

Re: NRDS "buffer" to send results once connection restored

Posted: Tue Jan 26, 2016 6:09 pm
by tgriep
When the NRDS client cannot connect to the XI server, it will spool the data to a tmp folder. Does the client running on the Raspberry PI have enough rights to do that?
If you look in your nrds.cfg file, it will show you the location of the TMPDIR.

Re: NRDS "buffer" to send results once connection restored

Posted: Tue Jan 26, 2016 6:13 pm
by derekb
tgriep wrote:When the NRDS client cannot connect to the XI server, it will spool the data to a tmp folder. Does the client running on the Raspberry PI have enough rights to do that?
If you look in your nrds.cfg file, it will show you the location of the TMPDIR.
I would imagine so -- I have the cron running under the root user and not the default nagios user.

Re: NRDS "buffer" to send results once connection restored

Posted: Wed Jan 27, 2016 11:56 am
by scottwilkerson
You would need to edit the nrds.pl file and add the following to take advantage of the store and forward:

~ line 113-114 change this

Code: Select all

my $send_nrdp = $config->{ 'SEND_NRDP'} . ' -u "' . $config-> { 'URL'} . '" -t "' .
		$config->{ 'TOKEN'} . '"';
To this

Code: Select all

my $send_nrdp = $config->{ 'SEND_NRDP'} . ' -u "' . $config-> { 'URL'} . '" -t "' .
		$config->{ 'TOKEN'} . '" -D "' . $config-> { 'TMPDIR'} . '"';

Re: NRDS "buffer" to send results once connection restored

Posted: Wed Jan 27, 2016 12:12 pm
by derekb
scottwilkerson wrote:You would need to edit the nrds.pl file and add the following to take advantage of the store and forward:

~ line 113-114 change this

Code: Select all

my $send_nrdp = $config->{ 'SEND_NRDP'} . ' -u "' . $config-> { 'URL'} . '" -t "' .
		$config->{ 'TOKEN'} . '"';
To this

Code: Select all

my $send_nrdp = $config->{ 'SEND_NRDP'} . ' -u "' . $config-> { 'URL'} . '" -t "' .
		$config->{ 'TOKEN'} . '" -D "' . $config-> { 'TMPDIR'} . '"';
Thanks, I'll try it. But shouldn't this be enabled by default? I mean, the NDRS docs published by NAGIOS explain that as if it were regular behaviour. The big benefit to us of using NDRS is the ease of deploying the NDRS agent and only have to make changes via the XI interface.

Re: NRDS "buffer" to send results once connection restored

Posted: Wed Jan 27, 2016 5:59 pm
by tmcdonald
This would need to be discussed. I'm somewhat on the fence as to whether this should be default, though I do lean slight to the "yes" side. I could see cases where someone would not want disks to fill up because they have network issues all the time, or they have restrictions on saving this sort of thing, but those would not be the majority.