[syslog-ng] Can't get program destination to work

Chuck chuck.carson at gmail.com
Fri Nov 5 15:04:18 CET 2010


It doesn't like this synxtax either:

destination r_smtp     { program ("/usr/local/sbin/syslog-ng-mailer.sh"
template("$HOST <$PRI>$DATE $HOST $MSG\n"); ); };

I can't get any syntax as all working that uses the template() option.

-Chuck

On Fri, Nov 5, 2010 at 6:57 AM, Sandor Geller <
Sandor.Geller at morganstanley.com> wrote:

> Hi,
>
> On Fri, Nov 5, 2010 at 2:46 PM, Chuck <chuck.carson at gmail.com> wrote:
> >
> > I am running 3.0.4 on a solaris 10 host. I am trying to send critical and
> > emergency events via smtp. I have the following syntax:
> >
> > destination r_smtp     { program ("/usr/local/sbin/syslog-ng-mailer.sh
> > $HOST" template("<$PRI>$DATE $HOST $MSG\n.\n"); ); };
>
> Maybe you misunderstood the example.
>
> program ("/usr/local/sbin/syslog-ng-mailer.sh $HOST"
>
> is bad, the whole string including the space and $HOST is treated as
> the program name... Instead of that use
>
> program ("/usr/local/sbin/syslog-ng-mailer.sh" template(...
>
> hth,
>
> Sandor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20101105/4e1f1f9e/attachment.htm 


More information about the syslog-ng mailing list