HTTP log monitoring console program
Start by cloning the repository:
git clone https://github.com/raphaelh/dogmon.git
cd dogmonNow, if you run make, you will see all the available commands. make takes care of all the dependencies, so you don't need to worry about previous steps needed before running a command.
dogmon monitors the file /tmp/access.log by default. If you don't have a real log file to monitor, you can generate one with the following command:
./scripts/generate_logOn the first run, it will download a real log from elastic github repository, and convert it to NCSA Common Log Format. Then it will pipe it with a rate limit to /tmp/access.log in order to simulate a real-life scenario (it will generate alerts in dogmon)
make runIt will create a venv and run dogmon in the venv with default arguments (logfile = /tmp/access.log and threshold = 10)
make docker-runIt will build a Docker image and run it with default arguments for dogmon.
Don't forget to run . venv/bin/activate before working on the project :) If you are inside the venv you should see (venv) at the beginning of your prompt.
You can show the available arguments with -h or --help:
dogmon -hFor example, to monitor /var/log/access.log with a high traffic threshold of 20 requests per second:
dogmon -f /var/log/access.log -t 20make lintmake test- Python >= 3.6
- Docker if you want to run the Docker image
- support more web log formats : Combined Log Format (Apache, Nginx), Amazon S3, Elastic Load Balancing, CloudFront, etc) and custom log format strings
- update metrics in realtime
- add support for a configuration file
- customizable layout and color scheme
- metrics per Virtual Host
- generate a report in HTML, JSON or CSV