On Fri, 27 Nov 2015, Maupertuis Philippe wrote:
Hi,
I am facing a situation where logs are pulled from a remote server through a
specific program.
The syslog message comes from the host where the program runs while the ip of
the real server is inside the message.
I have been able to reformat the message like that :
$template forcedhost,"%timegenerated% %msg:F,124,6:3,18%
%syslogtag%%msg:::drop-last-lf%\n"
With this I get the IP address of the real host but I would like to go one step
further and set the name of the host instead of its ip address.
I have only two hosts for which I retrieve data so I can just test the IP
address to set the host.
I tried to use the property replacer in a test but I got syntax error.
Is there any way to do that with rsyslog7.4 with which I am stuck for legal
reasons
yes, you can do it with 7.4, but we can't tell you what the error is without
seeing the config you are using. the error message you get would be helpful as
well.
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.