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

Matthew Hall mhall at mhcomputing.net
Fri Nov 5 17:34:46 CET 2010


On Friday, November 05, 2010 09:28:17 Chuck wrote:
> Oops pasted the wrong output.. My current syslog-ng.conf contains this:
> destination r_smtp     { program ("/usr/local/sbin/syslog-ng-mailer.sh"
> template(t_smtp) ); };
> 
> On Fri, Nov 5, 2010 at 9:26 AM, Chuck <chuck.carson at gmail.com> wrote:
> > I have some syntax working now but can't get a reliable means of
> > sending smtp notifications.. Just curious how other people are doing
> > it. Here is my current setup:
> > 
> > These processes just seem to hand.. Every once in a a message will
> > actually get delivered but its blank with the exception of the
> > subject.
> > 
> > I've tried several different scripts, some that try and parse the
> > command line arguments individually, some that just read STDIN until
> > EOF, and etc....
> > 
> > I can't get anything reliable working.
> > 
> > Any ideas?

Hi Chuck,

I can't help with the email part directly.

I would suggest considering using a Perl script because I don't think 
syslog-ng executes a new program for every single message otherwise it 
could cause a process storm during heavy load and also slow the daemon 
down doing too many forks instead of processing logs.

So you might have to send them to a Perl script which batches or unbatches 
the messages as appropriate and sends the email for you.

Have a look at this part of the manual and see if it helps you get your 
program driver configured better, too.

http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-v3.1-
guide-admin-en.html/index.html-single.html#reference_destination_program

Good Luck,
Matthew.


More information about the syslog-ng mailing list