fixed UDP host?

Tags: GELF | dns | UDP

#1 alexjck

Hi, i am using the nxlog-ce-2.9.1716-1_rhel7.x86_64.rpm and i have the following conf

<Output graylogout> Module om_udp Host somehost.com Port 12201 OutputType GELF </Output>

If i do "host somehost.com" -> It returns 2 IP in different order

$>host somehost.com X.X.X.X Y.Y.Y.Y

$>host somehost.com Y.Y.Y.Y X.X.X.X

But nxlog always send messages to only one host (X.X.X.X). Does nxlog do a DNS request once? if is that the case, how do i balance the traffic?

#2 b0ti Nxlog ✓
#1 alexjck
Hi, i am using the nxlog-ce-2.9.1716-1_rhel7.x86_64.rpm and i have the following conf <Output graylogout> Module om_udp Host somehost.com Port 12201 OutputType GELF </Output> If i do "host somehost.com" -> It returns 2 IP in different order $>host somehost.com X.X.X.X Y.Y.Y.Y $>host somehost.com Y.Y.Y.Y X.X.X.X But nxlog always send messages to only one host (X.X.X.X). Does nxlog do a DNS request once? if is that the case, how do i balance the traffic?

There is only an initial DNS lookup. For performance reasons this is obviously not done for each message.

The om_tcp and om_ssl modules have a reconnect() procedure that can be called from a <schedule> block to have these periodically reconnect but this is not available for om_udp.

I suggest using some kind of a load balancer tool for this. nginx can do udp load balancing for example.