NRDS "buffer" to send results once connection restored

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
derekb
Posts: 177
Joined: Wed Jun 10, 2015 1:54 pm

NRDS "buffer" to send results once connection restored

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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?
Former Nagios employee
derekb
Posts: 177
Joined: Wed Jun 10, 2015 1:54 pm

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

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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.
Former Nagios employee
derekb
Posts: 177
Joined: Wed Jun 10, 2015 1:54 pm

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

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
derekb
Posts: 177
Joined: Wed Jun 10, 2015 1:54 pm

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

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

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

Post 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'} . '"';
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
derekb
Posts: 177
Joined: Wed Jun 10, 2015 1:54 pm

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

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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.
Former Nagios employee
Locked