Perfect, adding the following below the 'if' line works a treat :)

$ActionExecOnlyOnceEveryInterval 0

Thank you very much!

On 21 December 2011 19:39, Rainer Gerhards <[email protected]> wrote:
> I guess the onceinterval needs to be manually reset for the next action.
>
> Rainer
>
> Alex Cartwright <[email protected]> hat geschrieben:Hello,
>
> I am trying to configure ommail on Debian 6 so that it will send me
> email notification if a message contains a certain string. I have got
> it working using the following configuration below, however as a
> side-effect it appears that all other messages that were once logged
> to /var/log/syslog are no longer being logged.
>
> For example, if I was to disable my ommail configuration and do
> `logger foobar; grep foobar /var/log/syslog` it would appear. As soon
> as I enable my ommail configuration and log a different message, it
> simply does not get added to /var/log/syslog. Messages that *do* match
> the condition do get emailed to my via ommail, however.
>
> The following exists in /etc/rsyslog.d/email-ozwebapp.conf:
>
> $ModLoad ommail
>
> $ActionMailSMTPServer localhost
> $ActionMailFrom [email protected]
> $ActionMailTo [email protected]
>
> $template mailSubject,"ozwebapp log event occured on %hostname%"
> $template mailBody,"The following log event has occured with one of
> our web applications::\r\n%msg%"
>
> $ActionMailSubject mailSubject
> # Only send an email out once in 10 minutes
> $ActionExecOnlyOnceEveryInterval 600
>
> if $msg contains 'cake' then :ommail:;mailBody
>
>
> Kind regards,
> Alex Cartwright
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/

Reply via email to