This Log Watcher project implements a real-time log monitoring solution, similar to the UNIX tail -f command. It consists of a server-side program that monitors a log file on a remote machine and a web-based client that displays updates in real-time.
- Real-time Monitoring: Server-side program to stream updates from the log file.
- Web-based Client: A client interface that shows live updates without page refresh, displaying the last 10 lines of the log.
- Performance Optimized: Efficient handling of large log files.
- Multi-client Support: The server can handle multiple clients simultaneously.
- No Page Reload: The web page updates in real-time without reloading.
- Node.js environment.
protobuf-compilerfor protobuf support.
-
Install protobuf-compiler (Linux):
sudo apt install protobuf-compiler
-
Clone the repository:
git clone https://github.com/Giri-Aayush/log-watcher
-
Navigate to the project directory:
cd log-watcher -
Install dependencies:
npm install
-
Start the Server:
npm run start-server
-
Access the Web Client: Open
http://localhost:3000/login your web browser.
-
Build the Docker Image:
docker-compose build logwatcher
-
Run the Docker Container:
docker-compose run --rm logwatcher
- The server monitors the log file and updates the web client in real-time.
- Open multiple tabs to see multi-client support in action.
- Test by updating the monitored log file.
This project is licensed under MIT License.