8.32 is several years old, but it contains things that RedHat has backported.
In the current upstream version, this is a recently discovered bug, the work-around is to add a globel() section into your config, what's in the global section doesn't matter, but if there isn't one, hostname gets set incorrectly. It's possible that RedHat backported this bug accidently.
David Lang On Thu, 27 Oct 2022, Naveenkumar MH via rsyslog wrote:
Hi, We have a problem where a client syslog forwarded a message to the syslog server, is getting *localhost* instead of the actual *hostname* in the logs. *Example;Expected:* Oct 27 17:33:46 *testclient1* <Test message> *Getting:* Oct 27 17:33:46 *localhost* <Test message> Here, we are forwarding the logs from client to server via UDP port to TCP port. Seems during handoff time from UDP to TCP, its getting localhost. *Other Details:* 1. Platform(VM) : RHEL79. 2. rsyslogd version : 8.32.0 3. hostname : testclient1 Help in resolving this issue is greatly appreciated. Attached complete debug logs. PFA. Regards,
_______________________________________________ rsyslog mailing list https://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.

