I add this line on rsyslog.conf:
if $msg contains 'arpwatch' then /var/log/test.log
The problem is if I a have simultaneous lines of logs containing the expression (arpwatch), then tonly the first line is logged and the others aren't.
How I can modify my expression to write to the log if i have simultaneous lines containing "arpwatch"?
If these lines are sent to rsyslog:
2012 Nov 10 09:56:34 alienvault->/var/log/syslog Nov 10 09:56:34 alienvault arpwatch_eth0: chdir(/usr/arpwatch): No such file or directory 2012 Nov 10 09:56:34 alienvault->/var/log/syslog Nov 10 09:56:34 alienvault arpwatch_eth0: (using current working directory) 2012 Nov 10 09:56:34 alienvault->/var/log/syslog Nov 10 09:56:34 alienvault arpwatch_eth0: pcap open eth0: eth0: No such device exists (SIOCGIFHWADDR: No such device)
then on /var/log/test.log
i have this line:
2012 Nov 10 09:56:34 alienvault->/var/log/syslog Nov 10 09:56:34 alienvault arpwatch_eth0: chdir(/usr/arpwatch): No such file or director
and the others are ignored