Page 1 of 1

nxlog: can max retry interval vor reconnect be limited?

Posted: Wed Nov 23, 2016 6:22 am
by _asp_
Hi,

if logstash is down nxlog tries to reconnect. If logstash is unavailable for longer time, nxlog will try again only each 200s.
Can I reconfigure nxlog to set the maximum retry period to 60s?

thanks, Andreas

Re: nxlog: can max retry interval vor reconnect be limited?

Posted: Wed Nov 23, 2016 10:30 am
by mcapra
om_tcp has a reconnect(); function that probably does what you're looking for, though I couldn't find a specific example. It's been deprecated as of 2.4 though and i'm not sure what, if anything, it will be replaced with.

Example:
https://nxlog.co/question/1453/omtcp-reconnect-schedule

You could probably add some counter logic in the example to only try x reconnect attempts.

Re: nxlog: can max retry interval vor reconnect be limited?

Posted: Wed Nov 23, 2016 12:41 pm
by WillemDH
Interesting. Please let us know if that schedule works. Could be useful. :)

Re: nxlog: can max retry interval vor reconnect be limited?

Posted: Wed Nov 23, 2016 1:18 pm
by dwhitfield
@_asp_ , please let us know if that works for you.

If it does not work, please be aware that we will be closed tomorrow and Friday due to US Thanksgiving. We are also closing early today. We we don't hear back by the time we close today, we'll get to it on Monday. Enjoy the weekend!

Re: nxlog: can max retry interval vor reconnect be limited?

Posted: Wed Nov 23, 2016 2:45 pm
by _asp_
I will test it tomorrow. Thanks

Re: nxlog: can max retry interval vor reconnect be limited?

Posted: Wed Nov 23, 2016 2:48 pm
by dwhitfield
Fantastic. Like I said, we are closed tomorrow, but if it doesn't work, we'll help you out on Monday.