From nick.stielau at gmail.com Tue Jun 7 10:28:44 2011 From: nick.stielau at gmail.com (Nick Stielau) Date: Tue, 07 Jun 2011 15:28:44 -0000 Subject: [syslog4j-support] getHostName vs. getCanonicalHostName to retrieve FQDN Message-ID: Good morning, I'm having a problem with Graylog2 server finding the correct hostname, which somebody traced to?SyslogServerEvent.java within syslog4j. The problem is that my host names are x.y.z.com, and I'm getting only "x" as the hostname. Here's the quote from http://jira.graylog2.org/browse/SERVER-23 "As part of the getHost function in syslog4j it calls getHostName on the IP as opposed to getCanonicalHostName, which is why you only get the first part of the FQDN.This can be fixed by modifying line 87 of productivity/java/syslog4j/server/impl/event/SyslogServerEvent.java within the syslog4j library itself, replacing getHostName with getCanonicalHostName." I'm not sure if this constitutes a 'bug' or and 'improvement' in syslog4j, or if it is by design, but from what I can tell it would solve my problem. If you think it is generally applicable, it seems like an easy fix. Also, apologies if this has already been discussed; I didn't see anything specific. Thanks, -nick