This Python script automates the analysis and monitoring of log files. It continuously monitors a specified log file for new entries, performs basic log analysis, and provides feedback on script execution.
- Python 3.x installed on your system.
sudo apt update
sudo apt install python3
python3 --version
pip install flask
- Access to a log file for monitoring and analysis.
- No external Python packages are required.
-
Clone the repository to your local machine:
git clone https://github.com/SmitVgithub/Log-Analysis.git
-
Run the script:
python3 app.py
-
Check the running application in below IP address and port number.
http://127.0.0.1:5000
-
The script will start monitoring the specified log file in real-time and perform basic analysis.
- To test the script, you can manually add your name to the monitored log file and observe how the script reacts.
- Verify that the script correctly detects new log entries and performs the desired analysis.
- To stop the script, press Ctrl+C in the terminal window where the script is running.
- The script will display a message indicating that the logging has been interrupted and will exit gracefully.
If you enter wrong name then it will show the error and you can also check the error log also.