On Wed, 30 Dec 2009, Joe Williams wrote:

> I am using shell execute
> (http://www.rsyslog.com/doc-rsyslog_conf_actions.html) to send emails
> from rsyslog. Other than the template string is there any way to send
> other stuff to the script?
>
> Here's how I'm using it:
>
> :msg,contains,"has no server available"
> ^/usr/local/bin/rsyslog_mailer;PerHostHaproxyError
>
> If possible I would like to send the entire :msg (line in the log) where
> the text is found to the script as well.

no, you would need to do this with the template string

however, you can do LOTS of very interesting things with the template 
string

for example, when I was having trouble figuring out why a log was parsing 
inforrectly I had a format string something like

"\n%raw%\n%fromhost-ip%\n%hostname%\n%fromhost%"

which would output a blank line, followed by a line containing the entire 
message, followed by three lines showing the values of those three fields

with multi-line output like this you can easily send lots of different 
things to your script and have it handle it easily.

David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to