<div dir="ltr">Hi Gergely & Fabien,<div><br></div><div>Thank you for your quick response. Gladly appreciate. </div><div><br></div><div>In response to gergely, the 2nd option would require the changes to be made on the "apache side" of things right? If so, its unlikely possible in my use case. </div><div><br></div><div>What I am looking for is ideally some method of tinkering around with the header portion of syslog protocol. Hopefully to leave the message portion of the logs untouch if possible. </div><div><br></div><div>Hence the third method is what I am thinking initially but just asking around if anybody has explored a better option. </div><div><br></div><div>In response to fabien, this was the "crude way" i was talking about. haha. <br></div><div><br></div><div>Yours Sincerely,</div><div>Delon Lee</div><div><br><div class="gmail_quote"><div dir="ltr">On Mon, 7 May 2018 at 21:35 Fabien Wernli <<a href="mailto:wernli@in2p3.fr" target="_blank">wernli@in2p3.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On Mon, May 07, 2018 at 03:26:21PM +0200, Gergely Nagy wrote:<br>
> A third option would be to add an SDATA field to the apache logs on the<br>
> rsyslog side, and filter based on that on the syslog-ng side. I am not<br>
> familiar with rsyslog all that much, and can't offer an example how to<br>
> do that. But it shouldn't be too hard, I imagine.<br>
<br>
One admittedly very hackish way to add SDATA to rsyslog is:<br>
<br>
$Template t_rfc5424,"<%pri%>1 %timestamp:::date-rfc3339% %hostname% %app-name% %procid% %msgid% [foo bar=\"baz\<a href="https://maps.google.com/?q=%22%5D+%25msg&entry=gmail&source=g" target="_blank">"] %msg</a>:R,ERE,1,FIELD:^ (.*)--end%"<br>
<br>
*.* @remote_syslog:514;t_rfc5424<br>
<br>
FWIW ;-)<br>
<br>
</blockquote></div></div></div>