Created
July 28, 2014 09:02
-
-
Save coderofsalvation/24f4696812aa4162328f to your computer and use it in GitHub Desktop.
rsyslog multiple ommail email sample configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ModLoad ommail | |
$ActionMailSMTPServer 127.0.0.1 | |
$template mailSubjectMemory,"Sopflop Memory issue" | |
$template mailSubjectError,"Sopflop Error" | |
$template mailSubjectException,"Sopflop Exception" | |
$template mailBody,"The following event triggered this email:\r\n\r\n%msg%" | |
### mail on memory issue | |
$ActionMailFrom [email protected] | |
$ActionMailTo [email protected] | |
$ActionMailSubject mailSubjectMemory | |
## only works on newest rsyslog: make sure we receive a mail only once in half an hour | |
$ActionExecOnlyOnceEveryInterval 1800 | |
if $msg contains 'E_ERROR Allowed memory' then :ommail:;mailBody | |
$ActionExecOnlyOnceEveryInterval 0 | |
### mail on error | |
$ActionMailFrom [email protected] | |
$ActionMailTo [email protected] | |
$ActionMailTo [email protected] | |
$ActionMailSubject mailSubjectError | |
## only works on newest rsyslog: make sure we receive a mail only once in half an hour | |
$ActionExecOnlyOnceEveryInterval 1800 | |
if $msg contains 'writing Full tracelog' then :ommail:;mailBody | |
$ActionExecOnlyOnceEveryInterval 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment