Tomáš Juhász wants to merge 3 commits from /u/xjuhas04/logwatch/ to master, 2024-05-04
Logwatch xml and json extension
This is a extension that adds the support for both xml and json for the following services: arpwatch, cron, dnssec, dpkg, http and http-error, imap, kernel, mountd, mysql-mmm, mysql, pop3, postgresql, sshd, sudo, syslog-ng, syslogd, systemd, zz-disk_space and zz-network
This extension utilizes the final logwatch summary and then parses it into selected format in a way that allow for easier machine usage later.
How it works?
At the point of final print stage in logwatch.pl script a check for format happens and if xml or json is choosen parsing starts.
Parsing uses control scripts, either json.pl or xml.pl that digest the summary, recognizes each section and calls function from modules that does the parsing.
Functions are sepereted per service into modules.
Usage:
Same as standart logwatch with the addition of options --format xml and --format json