View Issue Details

IDProjectCategoryView StatusLast Update
0005839CentOS-6rsyslogpublic2012-07-15 20:05
Reportersilvertip257 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version6.3 
Target VersionFixed in Version 
Summary0005839: rsyslog 5.8.10-2 - PreserveFQDN directive
DescriptionI recently upgraded a server from CentOS 6.2 to 6.3
I found a change in the behavior of rsyslog's configuration file that I found particularly interesting.
The "$PreserveFQDN on" directive was not being recognized as the config remained unchanged during the upgrade. This incorrect behavior caused the host to syslog with only the host name and not it's fully qualified domain name.

Name : rsyslog
Arch : i686
Version : 5.8.10
Release : 2.el6

The official 6.2 mirror has rsyslog-4.6.2-12.el6.i686.rpm and 6.3 has
rsyslog-5.8.10-2.el6.i686.rpm, so there's quite a version jump here.
Steps To Reproduce1) Install rsyslog 5.8.10-2 on CentOS 6.3
2) Add a directive to debug rsyslog in /etc/rsyslog.conf
# debug rsyslog
# - intense logging, disable this when finished
*.* /tmp/rsyslog.debug
3) tail -f /tmp/rsyslog.debug
3a) You will find that the FQDN is not used by default as expected
4) Set the directive "$PreserveFQDN on" where it is the first directive and reload rsyslog
5) continue tailing /tmp/rsyslog.debug
5a) You should find that FQDN is not being used
6) Move "$PreserveFQDN on" so it is _not_ the first directive and reload rsyslog
7) continue tailing /tmp/rsyslog.debug
7a) You should find that FQDN directive is _not_ honored now
[ _unless_ "$PreserveFQDN on" is set as the first directive ]
Additional InformationMy post to the mailing list:
http://lists.centos.org/pipermail/centos/2012-July/127442.html

Another bug report for a previous version of rsyslog:
http://bugs.centos.org/view.php?id=5753

Config Snippet:
<config>
#rsyslog v3 config file
$PreserveFQDN on

# if you experience problems, check
# http://www.rsyslog.com/troubleshoot for assistance

#### MODULES ####

$ModLoad imuxsock.so # provides support for local system logging
(e.g. via logger command)
$ModLoad imklog.so # provides kernel logging support (previously
done by rklogd)
#$ModLoad immark.so # provides --MARK-- message capability

# Provides UDP syslog reception
#$ModLoad imudp.so
#$UDPServerRun 514

# Provides TCP syslog reception
#$ModLoad imtcp.so
#$InputTCPServerRun 514


#### GLOBAL DIRECTIVES ####

# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
#
# (BUG!)
# FQDN must be the first directive or it is not honored
# http://bugzilla.adiscon.com/show_bug.cgi?id=192
#$PreserveFQDN on
... omitted...
</config>

Workaround:
I did find a workaround [0] [1], but feel this behavior is a bug.
Note the bugreport linked previously was for version 5.4.0 and reported in July 2010.
If I make $PreserveFQDN the _first_ directive it syslogs with the FQDN otherwise the directive is ignored.


[0] http://bugzilla.adiscon.com/show_bug.cgi?id=192
[1] http://serverfault.com/questions/274625/how-do-i-get-rsyslogd-to-log-a-servers-fqdn-instead-of-its-short-hostname
[2] http://bugzilla.adiscon.com/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=fqdn
[3] http://bugzilla.adiscon.com/show_bug.cgi?id=321
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2012-07-15 20:05 silvertip257 New Issue