[rsyslog-notify] Forum Thread: Re: How to display ip-address of relaying host - (Mode 'reply')

noreply at adiscon.com noreply at adiscon.com
Fri Nov 13 15:59:36 CET 2015


User: dlang 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=26142#p26142

Message: 
----------
using the template:

$template RemoteFormat,"from host: %fromhost-ip% %hostname%
%syslogtag%%msg%\n"

the pri is missing because you didn't put it in the template :-)

you also aren't putting a timestamp in the message (rsyslog is creating one
on the receiving side)

the receiving rsyslog is also going to end up with $hostname = 'from' with
this template.

the proper format is 

<%pri%>%timestamp% %hostname%
%syslogtag%%msg:::space-if-not-first-space%%msg%\n

everything before msg gets parsed, so if you change anything in that
partyou will affect parsing on the receiving side.


More information about the rsyslog-notify mailing list