This is my implementation of a "take home project" I was given by a company for its recruitement process. It consists in an HTTP log monitor.
It reads a file text continuously, and displays stats and alerts.
It works like a usual python package:
cd
to the root directory then python setup.py install
For development, it is advised to create a virtual environment
(through venv, conda, or similar) and
pip install -e .
Once installed, you can run the log_monitor
command anywhere.
By default the default config is loaded, but you can also
pass a config file as parameter (ie. log_monitor config.yml
)
By default stats will be displayed every 10 seconds, and alerts raised when we register too many requests.
To exit, send a keyboard interrupt signal (ctrl-C)
The configuration file is a yaml, a documented example with default values is at the root of the project (config_default.yml).
To run tests, run ./tests/run_tests.sh