[syslog-ng] Syslog-ng email message setup

R King tckingr at yahoo.com
Thu Mar 23 15:35:51 CET 2006


I am trying to set up syslog-ng to send messages based on specific events.  The only time it generates a messages and sends it is when I reload the service.  For testing, I have set  up filters based on cron jobs (run every ten minutes), ssh access, and even allowed any event to send a message.  I have included the actual command in the script as well as used the "program" destination to a script file.  The only message generated is when the syslog-ng service is restarted.
 
 Everything has been updates: Gentoo (latest kernel), syslog-ng, postfix (sendmail).
 
 Here are the configurations for my different attempts:
 
 Command located in syslog-ng.conf file:
 source s_udp { udp(); };
 
 destination d_email { program("echo -e \"subject: Log Alert\nA log message has been generated\n.\" | sendmail -f syslog at domain.com user at domain.com"); };
 
 filter f_ssh { facility(auth,authpriv); };
 
 log { source(src); destination(d_email); };
 #log { source(src); filter(f_ssh); destination(d_email); };
 
 Here is my config when attempting to redirect to a script:
 source s_udp { udp(); };
 
 destination d_email { program("/usr/local/sbin/syslog-mail"); };
 
 filter f_ssh { facility(auth,authpriv); };
 
 log { source(src); destination(d_email); };
 #log { source(src); filter(f_ssh); destination(d_email); };
 
    Script file:
 #!/bin/bash
 # This script is designed to sedn messages based on syslog errors
 
 echo -e "subject: Log Alert\nA log message has been generated by the script\n." | sendmail -f syslog at domain.com users at domain.com
 
 Any help will be greatly appreciated....
Ron King

		
---------------------------------
Blab-away for as little as 1¢/min. Make  PC-to-Phone Calls using Yahoo! Messenger with Voice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20060323/9e491f45/attachment.htm


More information about the syslog-ng mailing list