[rsyslog-notify] Forum Thread: can't use ! with "contains" - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Thu May 21 22:55:04 CEST 2015


User: magteix 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=25636#p25636

Message: 
----------
Hello guys,

I'm trying to exclude all the messages that contains on the body message
the IP 192.168.11.1 I'm using the below line, but [b:1gitf1l4]$msg
!contains[/b:1gitf1l4] don't work (syntax error in expression). If I remove
the "!" symbol it works, but I want to exclude, not include

[b:1gitf1l4]sentence that works:[/b:1gitf1l4]
if $programname == 'httpd' and $msg contains '192.168.11.1' then
:ommail:;mailBody

[b:1gitf1l4]sentence that don't work:[/b:1gitf1l4]
if $programname == 'httpd' and $msg !contains '192.168.11.1' then
:ommail:;mailBody

Can someone tell me what is wrong.

Thanks!


More information about the rsyslog-notify mailing list