Mailing List Archive

domain appended to hostname
I have two loghosts:

* Ubuntu 18.04.3 + rsyslogd 8.32.0
* CentOS 7.6.1810 + rsyslogd 8.24.0

Identical configuration files: /etc/rsyslog.conf and /etc/rsyslog.d/local.conf

On the Ubuntu box, rsyslog logs using the hostname of the remote source
On the CentOS box, rsyslog logs appends the domain to the hostname of the remote source

Pcaps show that the remote hosts are logging using hostname, not FQDN

How might I trouble-shoot this? What feature / module / function in rsyslog might behave differently depending on the OS hosting it?

--sk


_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: domain appended to hostname [ In reply to ]
Config?

Sent from phone, thus brief.

Stuart Kendrick via rsyslog <rsyslog@lists.adiscon.com> schrieb am Fr., 30.
Aug. 2019, 18:54:

> I have two loghosts:
>
> * Ubuntu 18.04.3 + rsyslogd 8.32.0
> * CentOS 7.6.1810 + rsyslogd 8.24.0
>
> Identical configuration files: /etc/rsyslog.conf and
> /etc/rsyslog.d/local.conf
>
> On the Ubuntu box, rsyslog logs using the hostname of the remote source
> On the CentOS box, rsyslog logs appends the domain to the hostname of the
> remote source
>
> Pcaps show that the remote hosts are logging using hostname, not FQDN
>
> How might I trouble-shoot this? What feature / module / function in
> rsyslog might behave differently depending on the OS hosting it?
>
> --sk
>
>
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
> DON'T LIKE THAT.
>
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: domain appended to hostname [ In reply to ]
OK, I now have (2) CentOS hosts displaying opposite behavior, i.e. one logs hostname, the other hostname.company.com
CentOS 7.6.1810 + rsyslogd 8.24.0

Here are the config files I am using on both:

/etc/rsyslog.conf
# rsyslog configuration file

# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html
# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html

#### MODULES ####

# The imjournal module bellow is now used as a message source instead of imuxsock.
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imjournal # provides access to the systemd journal
#$ModLoad imklog # reads kernel messages (the same are read from journald)
#$ModLoad immark # provides --MARK-- message capability

# Provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514

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


#### GLOBAL DIRECTIVES ####

# Where to place auxiliary files
$WorkDirectory /var/lib/rsyslog

# Use default timestamp format
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

# File syncing capability is disabled by default. This feature is usually not required,
# not useful and an extreme performance hit
#$ActionFileEnableSync on

# Include all config files in /etc/rsyslog.d/
$IncludeConfig /etc/rsyslog.d/*.conf

# Turn off message reception via local log socket;
# local messages are retrieved through imjournal now.
$OmitLocalLogging on

# File to store the position in the journal
$IMJournalStateFile imjournal.state


#### RULES ####

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages

# The authpriv file has restricted access.
authpriv.* /var/log/secure

# Log all the mail messages in one place.
mail.* -/var/log/maillog


# Log cron stuff
cron.* /var/log/cron

# Everybody gets emergency messages
*.emerg :omusrmsg:*

# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler

# Save boot messages also to boot.log
local7.* /var/log/boot.log

# Save everything
*.debug /var/log/syslog

# ### begin forwarding rule ###
# The statement between the begin ... end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
#$ActionQueueType LinkedList # run asynchronously
#$ActionResumeRetryCount -1 # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
#*.* @@remote-host:514
# ### end of the forwarding rule ###

/etc/rsyslog.d/listen.conf
$SystemLogSocketName /run/systemd/journal/syslog

--sk


Stuart Kendrick via rsyslog <rsyslog@lists.adiscon.com<mailto:rsyslog@lists.adiscon.com>> schrieb am Fr., 30. Aug. 2019, 18:54:
I have two loghosts:

* Ubuntu 18.04.3 + rsyslogd 8.32.0
* CentOS 7.6.1810 + rsyslogd 8.24.0

Identical configuration files: /etc/rsyslog.conf and /etc/rsyslog.d/local.conf

On the Ubuntu box, rsyslog logs using the hostname of the remote source
On the CentOS box, rsyslog logs appends the domain to the hostname of the remote source

Pcaps show that the remote hosts are logging using hostname, not FQDN

How might I trouble-shoot this? What feature / module / function in rsyslog might behave differently depending on the OS hosting it?

--sk


_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog<https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.adiscon.net%2Fmailman%2Flistinfo%2Frsyslog&data=02%7C01%7C%7Cc58bd395d0dc4eac813b08d72d7f6edf%7C32669cd6737f4b398bddd6951120d3fc%7C0%7C1%7C637027897675130077&sdata=OKzs9Cl%2FvH8csRLs2lrmSCpHMJtP%2BRI2bAX18cUCNGI%3D&reserved=0>
http://www.rsyslog.com/professional-services/<https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.rsyslog.com%2Fprofessional-services%2F&data=02%7C01%7C%7Cc58bd395d0dc4eac813b08d72d7f6edf%7C32669cd6737f4b398bddd6951120d3fc%7C0%7C1%7C637027897675140069&sdata=oy%2FqLPyEwc%2FvNZGXTnakb5tBnUzZzBoZwXtOS93glEA%3D&reserved=0>
What's up with rsyslog? Follow https://twitter.com/rgerhards<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2Frgerhards&data=02%7C01%7C%7Cc58bd395d0dc4eac813b08d72d7f6edf%7C32669cd6737f4b398bddd6951120d3fc%7C0%7C0%7C637027897675140069&sdata=oHel8ovTRyyhFmaBqJizUynxOJUDgJOqnA0i72CketI%3D&reserved=0>
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: domain appended to hostname [ In reply to ]
what is the output of hostname on each box? I've seen a lot of cases where
/etc/hostname is a FQDN, not a hostname
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: domain appended to hostname [ In reply to ]
Hi David,

The output of 'hostname' is FQDN, on each of the log servers

For fun, I changed /etc/hostname to be just the hostname of each of the log servers, rebooted ... results are the same, i.e. one of the loghosts records entries using the hostname, the other one using FQDN

--sk

-----Original Message-----
From: David Lang <david@lang.hm>
Sent: Friday, August 30, 2019 2:19 PM
To: Stuart Kendrick via rsyslog <rsyslog@lists.adiscon.com>
Cc: Stuart Kendrick <stuartk@alleninstitute.org>
Subject: Re: [rsyslog] domain appended to hostname

CAUTION: This email originated from outside the Allen Institute. Please do not click links or open attachments unless you've validated the sender and know the content is safe.
________________________________

what is the output of hostname on each box? I've seen a lot of cases where /etc/hostname is a FQDN, not a hostname
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Re: domain appended to hostname [ In reply to ]
please post the configs

David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.