A high-performance monitoring solution for iLO and iDRAC server power consumption metrics, built with Next.js.
- Overview
- Features
- Architecture
- Getting Started
- API Documentation
- Security
- Monitoring
- Troubleshooting
- Contributing
- License
Server Wattman provides real-time power consumption tracking for your server infrastructure through HP iLO and Dell iDRAC interfaces.
- Real-time power consumption monitoring
- Support for HP iLO and Dell iDRAC interfaces
- Unified dashboard for multiple servers
- Dark mode support
- Redis-powered caching
- Rate limiting and throttling
- Structured logging
- Health monitoring
- API key authentication
- Frontend: Next.js 14, React 18, TailwindCSS
- Backend: Node.js 20
- Caching: Redis 7
- Containerization: Docker
- SSL/TLS: HTTPS-Portal with Let's Encrypt
- Node.js 20 or later
- Docker Engine 24.0+
- Docker Compose v2
- Git
- Clone and setup:
git clone https://github.com/yourusername/server-power-monitor.git
cd server-power-monitor
npm install- Configure environment:
cp .env.example .env
chmod +x scripts/setup-dev.sh
./scripts/setup-dev.shCreate a .env file:
API_KEY=your-secure-api-key
REDIS_URL=redis://redis:6379
SERVER_CONFIGS_PATH=/path/to/config.json
DOMAINS=yourdomain.com
STAGE=productionConfigure servers in JSON:
{
"servers": [
{
"name": "server1",
"type": "iLO",
"ip": "10.0.0.1",
"username": "admin",
"password": "secure-password"
}
]
}API endpoints require an API key in the X-API-Key header:
curl -H "X-API-Key: your-api-key" https://your-domain.com/api/healthGET /api/health
{
"status": "healthy",
"timestamp": "2025-02-09T20:52:23.000Z",
"version": "1.0.0",
"services": {
"redis": { "status": "connected" },
"serverMonitoring": {
"totalServers": 10,
"onlineServers": 10
}
}
}GET /api/servers/{serverId}/power
{
"serverId": "server1",
"timestamp": "2025-02-09T20:52:23.000Z",
"currentPower": 120,
"averagePower": 115,
"peakPower": 150
}- API key authentication
- Rate limiting per client
- CORS protection
- Automatic SSL certificate management
- Input validation
- Error sanitization
- Health check endpoint at
/api/health - Redis health monitoring (10s interval)
- Memory usage tracking
- Response time monitoring
- Error rate tracking
-
Redis Connection Failed
- Check:
docker compose ps - Verify Redis URL in .env
- Check:
-
iLO/iDRAC Connection Timeout
- Verify server IP accessibility
- Check firewall settings
-
Rate Limiting Errors
- Adjust RATE_LIMIT settings in .env
Debug mode:
DEBUG=true npm run dev- Fork the repository
- Create a feature branch
- Open a Pull Request
MIT License