descriptionSimple and modular log analysis for Linux servers
last changeFri, 27 Sep 2019 11:01:24 +0000 (21:01 +1000)
README.md

logparse

Logparse is a simple and extensible log analyser which parses and summaries medium-term server logs (up to around 30 days old). It reports notable events and statistics reported from common server programs, and has a comprehensive API to allow users to write their own parsers for custom services.

Logparse is also integrated with systemd's logrotate to optionally rotate logs only after they have been summarised, and the user may choose to get an email (requires postfix) or a static HTML/plaintext file with the log summary. As an added feature, IP addresses from ssh/samba/apache logs may be resolved to either hostnames or FQDNs.

Configuration is through the file /etc/logparse.conf, in INI format. A description of the configuration variables is shown below at :ref:configuration.

Some features require logparse to be run as root (primarily log rotation). It is recommended to set it up on a cron job on a weekly basis.

The program is based on a model of independent parsers (consisting of Python modules) which analyse logs from a particular service. Logparse comes with a range of these built in, but additional parsers can be written in Python and placed in /usr/share/logparse/parsers. At the moment, the built-in parsers are:

For more information, see logparse(8) by running man logparse.

Website: https://git.lorimer.id.au/logparse.git

Commits

2019-09-27 rename parsers, better journald integration
2019-09-21 add parser-specific docs & rewrite sudo parser for...
2019-09-20 better log formatting and limit lines to 80 char
2019-09-19 add systemctl and ufw parsers, support for varying...
2019-09-16 bugfixing & add smbd_journald
2019-09-09 add more docstrings
2019-09-08 update readme & docs
2019-09-05 add docs
2019-09-05 rework parser loading interface
2019-09-03 new parser class structure
2019-09-02 migrate configuration system to the stdlib ConfigParser
2019-08-31 fix logrotate functionality
2019-08-30 bugfixing in config & add quiet mode
2019-08-30 add journald communication capability
2019-08-30 add parsers for memory info and system info
2019-08-30 add table implementation
show all commits

Branches

4 years ago master