1# logparse
23
([source](https://git.lorimer.id.au/logparse.git/)) // written by [Andrew Lorimer](https://lorimer.id.au)
45
This is a utility to analyse medium-term logs (up to around 30 days old) on servers. It summarises notable events and statistics reported from several programs. At the moment, logparse can interface with:
67
- sshd (number of logins, list users & clients)
8- sudo (number of sessions, users, commands)
9- cron (list commands)
10- [nameget](https://git.lorimer.id.au/scripts.git/tree/nameget.sh) (list successful/failed downloads)
11- apache (list requests, clients, user agents, bytes transferred, errors)
12- smbd (number of logins, list users & clients)
13- postfix (list recipients and bytes sent)
14- zfs (srub data, usage data)
15- lmsensors (system, CPU, per-core, per-disk)
16- du (specify paths to show usage and change since last analysis)
1718
Support for further services and custom scripts is planned.
1920
logparse is also integrated with systemd 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 page with the log summary. As an added feature, IP addresses from ssh/samba/apache may be resolved to either hostnames or FQDNs.
2122
Configuration is through the file `/etc/logparse.conf`, in yaml format.
2324
Note that logparse must be run as root (preferably as a cron job). This is required for temperature reading and for writing to `/var/log/`.
2526
### Planned features:
2728
- output to standalone HTML or plaintext file
29- email attached PDF
30- specify user to send mail from