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

Sandor Geller Sandor.Geller at morganstanley.com
Fri Nov 5 15:08:55 CET 2010


there is an extra semicolon... remove the one after template()

On Fri, Nov 5, 2010 at 3:04 PM, Chuck <chuck.carson at gmail.com> wrote:
>
> 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
>
>


More information about the syslog-ng mailing list