This program is an attempt to write an intelligent incremental logfile reading utility. Other such utilities exist, but I could find none that would handle changing/dynamic logfiles to my satisfaction. So, having an itch of my own, I scratched it. This code is the result.
In summary, something like the following, if run as a cronjob:
retail /var/log/messages | mail email@example.com
Will get you all the new entries which happen to show up in your system log. In addition, it will attempt to intelligently cope with any changes to the file in question, by verifying that the data at it's last known position has not changed, and if it has it will search out that same data wherever in the file it now resides. Should this be also impossible, it will resort to rewinding to the beginning of the file and reading the entire thing.
This is a package of A.L.Lambert's retail utility.
You can add it to your system using the usual command sequence:
sudo dnf copr enable bta/retail sudo dnf install retail
The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).
|Epel for CentOS 7||x86_64 (0)*||Epel for CentOS 7 (7 downloads)|
|Epel for CentOS 8||x86_64 (0)*||Epel for CentOS 8 (11 downloads)|
|Fedora 30||x86_64 (0)*||Fedora 30 (15 downloads)|
|Fedora 31||x86_64 (0)*||Fedora 31 (11 downloads)|
|Fedora rawhide||x86_64 (0)*||Fedora rawhide (10 downloads)|
* Total number of packages downloaded in the last seven days.