create a template that has whatever text you want in the hostname field and then use that when sending a message

on the receiving side (the relay), you can look at fromhost-ip or fromhost and then use that in a template while relaying it

David Lang

On Wed, 23 Mar 2022, Chris via rsyslog wrote:

Date: Wed, 23 Mar 2022 18:08:10 +0000 (UTC)
From: Chris via rsyslog <[email protected]>
To: "[email protected]" <[email protected]>
Cc: Chris <[email protected]>
Subject: [rsyslog] Controlling Hostname

I have several Linux instances in an Amazon VPC. They send UDP 514 to a 
singular free tier ubuntu server running rsyslog. 
It aggregates all incoming messages and sends them over TLS to a primary log 
server running mysql and Loganalyzer on it. 
Amazon makes controlling the hostname necessary because most hostnames look 
something like ip-10-0-99-199. 
I was thinking maybe there was a way I could force the host that is originating a syslog 
message send it's message as an "IP address" versus the hostname. 
If that were true, I could likely set any name I wanted in the /etc/hosts on 
the primary server and then primary server could just resolve the hostname on 
the primary server. Is that possible? If so how would I accomplish that?
Thanks in advance,CB
_______________________________________________
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.
_______________________________________________
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.

Reply via email to