Projet - N7AN04A : Application Internet FRANCOIS - PRADIER - CHAVEROUX
NetProbe is a real-time network monitoring application built on a modern, event-driven, microservice architecture. It features a live-updating Vue.js frontend that visualizes network topology, displays live alerts, and monitors the health of its own application stack.
This project is fully containerized using Docker Compose and uses RabbitMQ as a resilient message bus to decouple services.
- Frontend: A Vue.js 3 application (with Vuetify) that serves the user dashboard. It connects to the backend via REST and WebSockets.
- Backend: A Node.js server using Express-X. It serves the REST API, manages the SQLite database (with Prisma), and broadcasts all real-time updates to the frontend via two WebSocket channels:
alarms: For live network alerts.app_status: For live "meta" monitoring of the application's own services.
- Middleware (Consumer): A Node.js service that subscribes to the RabbitMQ message bus, consumes telemetry data, runs alarm-triggering logic, and POSTs alarms and stats to the Backend.
- Simulation (Producer): A Python service that generates (simulated) network telemetry and publishes it to the RabbitMQ bus.
- Message Bus: RabbitMQ (using a
fanoutexchange) acts as the resilient data pipeline, buffering data and decoupling the producer from the consumer.
- Docker
- Docker Compose
- A web browser (Chrome, Firefox, etc.)
- (For Deployment)
nginx,git
-
Clone the repository:
git clone [your-repo-url] cd netprobe-final -
Build and Run the Stack:
docker-compose up --build
-
Initialize the Database: In a separate terminal, run this command once the containers are up:
docker-compose exec backend npx prisma db push -
View the Application:
- NetProbe UI:
http://localhost:5173 - RabbitMQ Management UI:
http://localhost:15672(User:netprobe, Pass:supersecret)
- NetProbe UI:
These instructions assume a production VPS running nginx and certbot for SSL.
-
Stop Old Services: If you were using
pm2, stop and remove it from startup:pm2 stop all pm2 delete all pm2 save pm2 unstartup # (Run the command pm2 gives you to remove it from startup) -
Get the Code:
cd /home/webapp/web-project/netprobe git pull -
Build the Static Frontend: This step bundles the Vue.js app for Nginx to serve.
cd /home/webapp/web-project/netprobe/frontend npm install npm run build cd ..
-
Launch the Docker Stack: This will build and run the
backend,middleware,simulation, andrabbitmqcontainers in the background. Thedocker-compose.ymlis configured to bind the backend to127.0.0.1:8080, which your existing Nginx proxy will pick up.docker-compose up --build -d
-
Initialize the Database: (Only needed the first time, or after a
docker-compose down -v)docker-compose exec backend npx prisma db push
Your application is now live and managed by Docker.
frontend: (Dev) Runs onlocalhost:5173. (Prod) Served by Nginx.backend: (Prod) Runs onlocalhost:8080, proxied by Nginx.rabbitmq: (Prod) Runs onlocalhost:15672(for UI) and5672(for AMQP).middleware: Internal service.simulation: Internal service.
