1

Is it possible to have instead the hostname the fqdn inside debian log files?
Example:
Now its: Mar 2 18:00:12 www rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2442" x-info="http://www.rsyslog.com"] start
Should be: Mar 2 18:00:12 www.example.org rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2442" x-info="http://www.rsyslog.com"] start

Thanks in advanced!

fips123
  • 361
  • 1
  • 5
  • 16
  • Please see also: http://serverfault.com/questions/274625/how-do-i-get-rsyslogd-to-log-a-servers-fqdn-instead-of-its-short-hostname – jscott Mar 02 '15 at 17:15
  • Thanks, but its not what i need. I want to have it for the local log files. I guess there should be a rsyslog variable or so... – fips123 Mar 02 '15 at 17:23

1 Answers1

1

Your problem is most likely a bug in wheezy's rsyslog.

You're looking to set $PreserveFQDN on. You'll need to set it on top of your file (logs configured prior to this directive would still tell about your hostname, instead of your FQDN). And maybe you've done it already.

The thing is: It works fine everywhere I've been able to check (openbsd 5.4 rsyslog4 (using either -c3 or -c4), trusty rsyslog7, jessie rsyslog8, wheezy-backports rsyslog7). Except for wheezy default package (rsyslog5), where I keep receiving short names.

sebix
  • 4,175
  • 2
  • 25
  • 45
SYN
  • 1,751
  • 8
  • 14