-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With the parameter $PreserveFQDN on the logged-in host is not the full host(FQDN) #1740
Comments
@Roarca, We use This is why you see just As a workaround, you can change the hostname of the machine: hostname host.app.example It is not the UNIX way, but most services should work without any problems. You can also use |
Since RFC5424 specifies that the [`HOSTNAME`](https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.4) field should contain the FQDN of the current host, we add a `useFqdn` configuration attribute to RFC5424 Layout that replaces the usage of `InetAddress.getHostName()` with `InetAddress.getCanonicalHostName()`. Closes #1740.
Since RFC5424 specifies that the [`HOSTNAME`](https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.4) field should contain the FQDN of the current host, we replace replace the usage of `InetAddress.getHostName()` with `InetAddress.getCanonicalHostName()`. Closes #1740.
Description
When on the client side you activate the $PreserveFQDN property on /etc/rsyslog.conf , the logs do not include the FQDN and only include the host
Configuration
My rsyslog.conf configuration (everything is default except the parameter)
$PreserveFQDN on
The /etc/hosts file
And the log4j2 configuration
Version: [Log4j version]
Operating system: [OS and version]
JDK: [JDK distribution and version]
Logs
Reproduction
Activating the $PreserveFQDN on parameter and having in /etc/hosts an FQDN longer than the normal host should be enough, but ask any questions you may have
The text was updated successfully, but these errors were encountered: