<div dir="ltr"><div><div><div><div><div><div><div>Hi,<br><br></div>My log source sends data over syslog in CEF (Arcsight format).<br><br></div>I have a simple parser written in Syslog-NG that takes advantage of the CEF format (that is all messages are in eight fields separated by a pipe char).<br>
</div><div>-----------xxxxxxxxxxxxxxxxx-------------------<br><br></div><div>parser p_cef {<br> csv-parser(columns("cef.ff","cef.vendor","cef.product","cef.c4","cef.c5","cef.c6","cef.c7","cef.c8")<br>
delimiters("|")<br> flags(drop-invalid)<br> );<br>};<br><br>destination d_file { file("/var/log/net/${cef.vendor}/${cef.product}/logfile"); };<br></div><br>log { source(s_tcp); parser(p_cef); destination(d_file); };<br>
-----------xxxxxxxxxxxxxxxxx-------------------<br><br></div>Some events coming in contain binary data that get translated into control characters and create thousands of directories with garbage in the names.<br><br></div>
How do I handle binary data in the message? Should I use the sanitize function in the destination/file definition or is there a better way to do it?<br><br></div>Also, how do I create a catch-all destination for all the messages that do not match my parser?<br>
<br></div>Thanks!<br><br><br></div>