This project demonstrates a simple system to monitor CPU and RAM usage, send the data to a RabbitMQ queue, and display it on a Flask-based web UI. The project uses Docker and Docker Compose to manage the services.
project/
│
├── docker-compose.yml
├── cpu_ram_monitor/
│ ├── Dockerfile
│ └── monitor.py
│
├── rabbitmq/
│ ├── Dockerfile
│
└── flask_ui/
├── Dockerfile
├── app.py
└── templates/
└── index.html
- cpu_ram_monitor: This service collects CPU and RAM usage data every 5 seconds and sends it to RabbitMQ.
- rabbitmq: This service runs a RabbitMQ instance to handle message queuing.
- flask_ui: This service runs a Flask web application to display the collected data.
-
Make sure you have Docker and Docker Compose installed.
-
Clone this repository:
git clone https://github.com/Budaghyan/cpu_ram_monitoring.git
cd cpu_ram_monitoring
docker-compose up --build
Open your browser and go to http://localhost:5000 to see the CPU and RAM usage.
The cpu_ram_monitor and flask_ui services will retry connection to RabbitMQ every 5 seconds if the connection fails.