On Wed, 1 Dec 2010, Mark Olliver wrote:
Hi,
I am new to rsyslog but have found it very capable. I am using it via logger
to log output of some of my scripts to local5. However I do want rsyslog to
alert me via an alert script should it encounter a warning or error message
sent to the log.
I have tested my alert script and that works ok, i give it two arguments
subject and message. However I can not seem to work out how to make this
work from rsyslog.
I tried the following:
$template Alert,"'Rsyslog Alert' :msg"
local5.info
:msg, content "warning"
^/usr/bin/alert_script Alert
Ideally i want the Subject to be what i set it to, the message to be
everything that comes after the word warning. I would also only like one
alert every 24 hours.
Any ideas or help would be gratefully received.
rsyslog doesn't keep a history of what it's done, so it can't limit you to
one alert every 24 hours, you really want another tool (something like
SEC) for that.
when you are creating templates, you put the properties you want between %
characters (so instead of :msg, do %msg%)
David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com