A real-time Redis monitoring dashboard with interactive charts and metrics visualization. This project provides comprehensive insights into Redis server performance with a beautiful, responsive UI.
- Real-time Monitoring: Live Redis metrics with WebSocket updates
- Interactive Charts: Memory usage, operations per second, connected clients, and cache hit rate
- Responsive Design: Built with React and TailwindCSS
- Docker Support: Easy deployment with Docker Compose
- Health Monitoring: Connection status and uptime tracking
The application consists of three main components:
- Frontend: React 19 with TailwindCSS and Recharts for visualization
- Backend: Node.js with Express and WebSocket support
- Database: Redis server for monitoring
All components are containerized using Docker for easy deployment.
- Docker and Docker Compose
This option uses a pre-built Docker image containing both frontend and backend in a single container:
curl -O https://raw.githubusercontent.com/ahmed876/redis-monitor-dashboard/main/docker-compose.combined.yml
docker-compose -f docker-compose.combined.yml up -d- Clone repository
git clone https://github.com/yourusername/redis-monitor-dashboard.git
cd redis-monitor-dashboard- Start all services:
chmod +x start.sh# Run with combined image (single container for frontend+backend)
./start.sh combined
# Run with separate containers (default)
./start.sh
# Other available commands:
./start.sh combined clean # Clean start with combined image
./start.sh combined rebuild # Rebuild with combined image
./start.sh combined restart # Restart with combined image
./start.sh combined reset-data # Reset Redis data with combined image
# Same commands work with separate containers
./start.sh clean
./start.sh rebuild
./start.sh restart
./start.sh reset-data
- Access the dashboard:
- Frontend: http://localhost
- Backend API: http://localhost:3001
- Redis: localhost:6379
You can test the API endpoints directly using curl:
curl http://localhost:3001/api/health
curl http://localhost:3001/api/redis/metrics
curl http://localhost:3001/api/redis/info
curl http://localhost:3001/api/redis/keys
curl http://localhost:3001/api/redis/key-valuesYou can test the WebSocket connection using wscat:
npm install -g wscat
wscat -c ws://localhost/wsOnce connected, you should receive real-time metrics every 5 seconds.
cd backend
npm install
npm run devcd frontend
npm install
npm start| Endpoint | Method | Description |
|---|---|---|
/api/health |
GET | Health check |
/api/redis/info |
GET | Complete Redis information |
/api/redis/metrics |
GET | Formatted metrics for charts |
/api/redis/key-values |
GET | Browse keys and values |
/api/redis/keys |
GET | Keys count |
WebSocket /ws |
- | Real-time metrics stream |
REDIS_HOST- Redis server hostname (default: redis)REDIS_PORT- Redis server port (default: 6379)PORT- Backend server port (default: 3001)
The dashboard displays the following Redis metrics:
- Connected Clients: Number of active Redis connections
- Memory Usage: Current Redis memory consumption
- Operations per Second: Real-time operation rate
- Cache Hit Rate: Ratio of successful key lookups
- Uptime: Redis server uptime
- Command Statistics: Total commands processed
- Key Explorer : Browse, and view Redis keys and their values
| Service | Description |
|---|---|
| redis | Redis 7 Alpine with persistence |
| backend | Node.js API server with health checks |
| frontend | React app served by Nginx |
redis-monitor-dashboard/
├── docker-compose.yml # Docker Compose configuration
├── README.md # Project documentation
├── start.sh # Startup script
├── assets/ # Project assets and images
├── backend/ # Node.js backend
│ ├── config/ # Configuration files
│ ├── controllers/ # API controllers
│ ├── services/ # Business logic
│ ├── src/ # Source code
│ ├── utils/ # Utility functions
│ └── websocket/ # WebSocket handlers
└── frontend/ # React frontend
├── public/ # Static files
└── src/ # Source code
- Update the
getMetrics()function inbackend/services/metricsService.js - Add new chart components in
frontend/src/App.js - Update the real-time WebSocket handler in
backend/websocket/wsServer.js
The dashboard uses Recharts library. Modify chart components in the frontend to add new visualizations.
- Ensure Redis is running and accessible
- Check Docker network connectivity
- Verify environment variables
- Check backend logs for WebSocket server status
- Ensure port 3001 is accessible
- Verify proxy configuration in Nginx
To debug issues, check the logs:
docker-compose logs -f
docker-compose logs -f backend
docker-compose logs -f frontend
docker-compose logs -f redisTo simulate load on your Redis instance for testing:
docker exec -it redis-server redis-benchmark -n 100000 -c 50 -P 16 -qExample test for specific operations:
docker exec -it redis-server redis-benchmark -t set -n 100000 -q
docker exec -it redis-server redis-benchmark -t get -n 100000 -q
docker exec -it redis-server redis-benchmark -t set,get,incr -n 50000 -qFor custom key size and value size testing:
# Test with larger values (1KB)
docker exec -it redis-server redis-benchmark -t set -n 10000 -d 1024 -q
# Test with many small operations
docker exec -it redis-server redis-benchmark -t ping -n 100000 -qThese benchmarks will help you observe how your Redis instance performs under various workloads and how the dashboard displays the metrics during high load scenarios.
This project is licensed under the MIT License - see the LICENSE file for details.