<div>Hi</div><div><br></div><div>I am using syslog-ng 3.0 and I am trying to monitor log files. If there is word "attackalert" found in the log file syslog-ng should invoke a script.</div><div>I created "/root/workspace/test" a bash script only with a simple echo statement to check if it is working correctly or not. The problem is</div>
<div>whenever I start syslog-ng the script starts executing even if the word "attackalert" is not recorded. The following is my syslog-ng.conf</div><div>configuration. Is there anything I am missing here ? Please advice.</div>
<div><br></div><div>options {</div><div> flush_lines (0);</div><div> time_reopen (10);</div><div> log_fifo_size (1000);</div><div> long_hostnames (off);</div><div> use_dns (no);</div><div>
use_fqdn (no);</div><div> create_dirs (no);</div><div> keep_hostname (yes);</div><div>};</div><div><br></div><div>source s_file { file("/root/workspace/app_desktop/sup.log.php");};</div><div>
<br></div><div>destination d_prog { program("/root/workspace/test"); };</div><div><br></div><div>filter f_attack_alert {</div><div> match("attackalert" value("MESSAGE"));</div><div>};</div>
<div><br></div><div>log {</div><div> source(s_file);</div><div> filter(f_attack_alert);</div><div> destination(d_prog);</div><div>};</div><div><br></div><br>-- <br>Warm Regards<br><br>Supratik<br>