Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
GELF output hostname resolution only performed during initialisation #882
When configuring a new GELF output, a destination hostname is requested. Through testing, it would appear that this hostname is only resolved once (when the output is initialised), and any subsequent changes to the DNS record are ignored until the graylog service is restarted.
For the TCP transport, it would make sense to at least re-resolve the hostname when reconnecting. For the UDP transport, re-resolving the address periodically may be a good idea.
Use case: our graylog installation runs in a cloud environment, as does the service that receives the GELF output. To support fail-over and graceful upgrades, we would usually configure a DNS entry with a short TTL to point at the appropriate server.
There are JVM parameters for DNS caching, usually those defaults are geared towards not performing lookups again, IIRC.
Have a look at http://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html#nct to see if tweaking those settings helps to solve your problem.
I'll leave this ticket open for that purpose.
Thanks for the info, but I don't think that's what is causing this particular behaviour. In