Why does rsyslog daemon create a new directory in /var/rsyslog while using the "%fromhost%" parameter in the "$template" option in the rsyslog configuration and dns becomes unavailable?
Issue
- While using the
%fromhost%parameter in the$templateoption in thersyslogconfiguration on RHEL6 to gather some logging data from remote servers and dns is available thersyslogdaemon creates a directory in/var/rsyslogcontaining the hostname (which is desirable for us) and logs the data to this directory.
For example:
$template httpd_error,"/var/rsyslog/%fromhost%/httpd/error_log"
local4.* ?httpd_error
- But when the dns is unavailable and the TTL is expired from the remote host, the
rsyslogdaemon creates a second directory in/var/rsyslogcontaining the IP address of the remote host and logs the data to this directory. Thus syslog data from one host is now captured in two different directories.
Environment
- RedHat Enterprise Linux 6
- rsyslog version 5.8.10
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.