Linux-Noob Forums
Syslog-ng triggers - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Server Administration (https://www.linux-noob.com/forums/forum-8.html)
+--- Forum: Security and Firewalls (https://www.linux-noob.com/forums/forum-87.html)
+--- Thread: Syslog-ng triggers (/thread-1029.html)



Syslog-ng triggers - crc_error - 2008-02-08


I am looking for a way to get syslog-ng to trigger an event.

To be more specific: If I recieve a syslog-message with some speciel text e.g "thingy". I want the syslog-server to send an email.

Is this something that can be done using only syslog-ng and sendmail???




Syslog-ng triggers - magikman - 2008-02-08

I don't know if syslog-ng can do that or not. What i would do is write something in perl to parse the log file every 5-10 minutes and look for that keyword. If it is there, send the lines which contain it to an email account. If you need it i can write something for you to do just that.



Syslog-ng triggers - crc_error - 2008-02-08


Quote:I don't know if syslog-ng can do that or not. What i would do is write something in perl to parse the log file every 5-10 minutes and look for that keyword. If it is there, send the lines which contain it to an email account. If you need it i can write something for you to do just that.
 

A perl-script might do the trick, however instant action when a message arrives is what I'm working on.




Syslog-ng triggers - magikman - 2008-02-12

Have you tried to write something to do that? If so, post it and i am sure there will be tons of help.



Syslog-ng triggers - xDamox - 2008-02-13


Hello,

 

Syslog-ng supports a directive called program() which execute a program when a message is received.

 

http://www.balabit.com/dl/html/syslog-ng-a...ination_program