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

Martin Holste mcholste at gmail.com
Fri Nov 5 14:53:48 CET 2010


Hm, not sure specifically why that's not working.  I use program, but
I don't have a macro like $HOST in the program declaration, and I
declare the template ahead of time like this:

template t_mytemp { template("foo bar"); };
destination d_mydest { program("/usr/bin/foo", template(t_mytemp)); };

I don't know why my way would work and not yours, but it should be
easy to swap a few things around quickly just to see if it makes a
difference.

On Fri, Nov 5, 2010 at 8:46 AM, 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"); ); };
>
> It doesn't like this syntax, however this is exactly what the documentation
> shows.
>
> I have also tried the following thinking the documentation might be wrong:
>
> destination r_smtp     { program ("/usr/local/sbin/syslog-ng-mailer.sh
> $HOST"); template("<$PRI>$DATE $HOST $MSG\n.\n"); };
> destination r_smtp     { program ("/usr/local/sbin/syslog-ng-mailer.sh"
> template("<$PRI>$DATE $HOST $MSG\n.\n"); ); };
> destination r_smtp     { program ("/usr/local/sbin/syslog-ng-mailer.sh");
> template("<$PRI>$DATE $HOST $MSG\n.\n"); };
>
> Has anyone done this or know how to send alerts via smtp?
>
> Thanks,
> CC
>
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation:
> http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.campin.net/syslog-ng/faq.html
>
>
>


More information about the syslog-ng mailing list