https://github.com/firefart/logwatcher
Program to monitor a logfile for strings
https://github.com/firefart/logwatcher
email go golang logfile tail
Last synced: over 1 year ago
JSON representation
Program to monitor a logfile for strings
- Host: GitHub
- URL: https://github.com/firefart/logwatcher
- Owner: firefart
- License: gpl-3.0
- Created: 2022-05-04T21:17:32.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-13T12:06:17.000Z (over 1 year ago)
- Last Synced: 2025-03-13T13:22:48.091Z (over 1 year ago)
- Topics: email, go, golang, logfile, tail
- Language: Go
- Homepage:
- Size: 173 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# logwatcher
This program watches a file for changes and sends a notification (email, sendgrid, discord, telegram and teams) when
one of the provided strings matches.
It's basically a `tail -f file | grep match` that sends every hit per notification.
This way you can watch a logfile for errors and get a notification to you if one occurs.
## config and installation
To install the systemd service you can use the `install_service.sh` helper script or simply copy
the `logwatcher.service` to the right place.
See `config.json.exampe` for an example config and adopt it to your needs.
For mailing, you can use [Mailjet](https://www.mailjet.com/) which gives you 200 free mails per day currently.
## usage
`logwatcher -config config.json`
Use `--help` for all available command line options