Syslog2 is an syslogd's realtime parser and event handler. Event is a message from some service. It uses much simplified plugin system to add event handlers. Syslog2 written in Perl.
cd /path/to/workdir && ./syslog2.pl
Syslog2 uses event based model.
Syslog2 reads next message from syslogd, and parses it at four parts:
- text of message
After this Syslog2 invokes handlers, which registered for this service. Handler invoked with four parameters: time,hostname,service,text of message.
bin: executable scripts. lib: modules, used by scripts. handlers: scripts, that contains handler subroutines doc: documentation conf: configuration files(main config - syslog2.conf)
In directory 'handlers' must be placed yours scripts, which contains handler subroutines. By default, this directory contains default.pl. Script default.pl logs all messages from syslogd, and stores its in logs2 dir. It create dirs for host/service and create file for log data, that named by date(2001-12-01). When turning for new day are automatically created new files.
You can download more handlers from project homepage(see end sections of README), package named syslog2-handlers-X.X.tar.gz.
You can write their own scripts with handlers, and simply copy your scripts in handlers dir. Read documentation in doc dir(API), see lib/Syslog.pm.
This program was writen by Alex S. Yemelyanov. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (doc/LICENSE).
Email: firstname.lastname@example.org Project homepages: http://syslog2.programmer.kz, http://syslog2.sourceforge.net