Skip to main content

Email alerts when tail -1 of log file does not match regex

Project description

Email alerts when tail -1 of log file does not match regex

Installation

From the project root directory:

$ python setup.py install

Usage

Watch file at /var/log/nginx/access.log using configured regex in ~/.watcher.yml:

$ logwatch /var/log/nginx/access.log

Watch file, sleeping for 60 seconds, with verbosity to print regex matches

$ logwatch /var/log/nginx/access.log -S 60 -v

Watch with special regex and print groups timestamp and message, ignoring empty file

$ logwatch /var/log/foo.log -r ‘[(?P<timestamp>d+)] (?P<message>.*)’ -e

Use –help/-h to view info on the arguments:

$ logwatch --help

Release Notes

0.1.0:Alpha runs and works
0.0.1:Project created

Project details


Release history Release notifications

History Node

0.3.1

History Node

0.3.0

History Node

0.2.1

This version
History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
logwatch-0.1.0.tar.gz (4.2 kB) Copy SHA256 hash SHA256 Source None Aug 28, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page