Miroslav Hlavka - 2012-11-14

Objectives

jSyslogParser is program aimed to periodically parse text files and find REGEX which are interesting for administrator or filter all REGEX. Program is designed to parse log files on UNIX machines and find something which administrator should know. Program isn't a daemon it is run by cron.

Configuration

Separate file config.xml is the only config file for jSyslogParser. Whole file is enclosed by <messages> tag. So actually it means that all config is done inside. Tag <parse> means one text file to process. Within this tag there is tag <parse_file> where you set the path to text file. This tag can be used only once within <parse>. Another tag is <interested> within this tag you can set REGEXs which you want to find or which one you want to filter. This tag should have set type. Available types are line or block. Line means, that parser process text file's line and finds REGEX on every line. Block is different. When parser finds REGEX after that skips all following lines up to occurence white line (empty line is used as end of block). Parsing continue after this white line.

Within <interested> tag you have to put down pattern (REGEX) in tag <message>. These tag you can use more than one.

The last tag used within <parse> is <contact_list>. This tag is used for composing email for administrators. This email contains only rows or block of text which were filtered by parser. Tag <smtp> contains SMTP server capable to receive email and send it further. <mail_from> is email address of sender (server where is jSyslogParser runs). <mail_subject> is mail subject. The only exception from previous tags is <mail_to>. There you put down address of administrator. But you can use this tag more times. All other tags in <contact_list> can be used only once.

Wish to you

I created this program for my personal reason. I used it in my previous job. But unfortunately I left and now I don't have for my program any reasonable usage. So if you have any idea for some improvement or new features, please write me. I would be very happy to develop jSyslogParser further.

Thank you
Miro