<div dir="ltr"><div>Hi folks,</div><div><br></div><div>Basically, in my setup, I received a jSON and the all usual (default) syslog packets in my server. But, I have a simple filter "f_blacklist_network_by_clientip" based in a jSON field. everything works well, the problem is because when my filter "f_blacklist_network_by_clientip" return OK, the junction() goes to the next statement processing the d_default_handler() destination.<br></div><div><br></div><div>My doubt is: how to stop the processing when my filter f_blacklist_network_by_clientip() returns OK?</div><div><br></div><div><b><SNIP></b></div><div><div>log {</div><div> source(s_internet);</div><div><br></div><div> junction {</div><div> channel {</div><div> filter(f_wb_access_log);</div><div> parser(p_msg2json);</div><div> filter(f_blacklist_network_by_clientip);</div><div> destination(d_wb_access_log);</div><div> flags(final);</div><div> };</div><div><br></div><div> # Default destination</div><div> channel {</div><div><b> # DOUBT: how to don't processing if the f_blacklist_network_by_clientip return OK?</b></div><div> destination(d_default_handler);</div><div> };</div><div> };</div><div>};</div><div><br></div><div>filter f_wb_access_log { program("wb_access"); };</div><div>parser p_msg2json { json-parser( marker("") prefix("j.")); };</div><div><br></div><div>filter f_blacklist_network_by_clientip {</div><div> not match("^127\.0\.", value("j.clientip"));</div><div> not match("^172\.16\.", value("j.clientip"));</div><div> not match("^172\.26\.", value("j.clientip"));</div><div> not match("^172\.31\.", value("j.clientip"));</div><div><b> # if match, stop the processing and don't jump to "channel { destination(d_default_handler); };</b></div><div>};</div><div><br></div><div>destination d_wb_access_log {</div><div> file("/var/log/syslog-ng/wb/${j.webapp_domain:-invalid_gw_access}_access.log"</div><div> create_dirs(yes) template("${MSG}\n")</div><div> );</div><div>};</div><div><br></div><div>destination d_default_handler {</div><div> file("/var/log/syslog-ng/servers/${HOST}/${FACILITY:-invalid_facility}.log"</div><div> create_dirs(yes) </div><div> );</div><div>};</div></div><div><b><br></b></div><div><b></SNIP></b><br></div>
</div>