I am trying to redirect these messages to a different host on the network
but I need to change the hostname from above to their hostname.  The
messages arrive looking like:

"Jan 5 05:02:42 192.168.10.10-1 TRAMPGR[234234]" traputil.c(534) 34534535
%MSG%"

I would like to change 192.168.10.10-1 to it's DNS name.

I have tried:

template(name="StupidHell" type="string"
string="<%PRI%>%TIMESTAMP::date=rfc3339%
%fromhost% %syslogtag:1:32%%msg::sp-if-no-1st-sp%%msg%")

:hostname, regex "([0-9]{1,3}\.){3}[0-9]{1,3}\-1" { action(type="omfwd"
Target="
xxx.xxx.xxx.xxx" Template="StupidHell" Port="514" Protocol="UDP") }

this doesn't seem to work since 1) It seems to match everything and 2) it
doesn't add the %hromhost% portion.

Any suggestions?
_______________________________________________
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.

Reply via email to