Created
July 24, 2014 20:05
-
-
Save Chris927/946e08497d692e237127 to your computer and use it in GitHub Desktop.
How I got rsyslog to email me when 'demo' or 'test' appears (/etc/rsyslog.d/demo.conf)
This file contains 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 /usr/lib/rsyslog/ommail.so | |
$ActionMailSMTPServer localhost | |
$ActionMailFrom [email protected] | |
$template mailSubject,"Rsyslog alert for %hostname% at %timegenerated%" | |
$template mailBody,"%msg%" | |
$ActionMailSubject mailSubject | |
$ActionExecOnlyonceEveryInterval 60 | |
$ActionMailTo [email protected] | |
if ($msg contains 'demo') or ($msg contains 'test') then :ommail:;mailBody |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment