3.6 KiB
3.6 KiB
IPMI Controller - Setup Guide
Prerequisites
- Dell server with IPMI (iDRAC) enabled
- Linux host (Ubuntu/Debian recommended)
- Python 3.10+
- ipmitool
Installation
1. Install IPMI Controller
On your management server (where you run the controller):
git clone https://github.com/yourusername/ipmi-controller.git
cd ipmi-controller
pip install -r requirements.txt
2. Install ipmitool
sudo apt-get update
sudo apt-get install -y ipmitool
3. Run the Controller
python3 web_server.py
Open http://your-server:8000 in browser.
Initial Setup
-
Complete the Setup Wizard:
- Create admin account
- Enter IPMI credentials
- IP: Your Dell server's IPMI IP
- Username: Usually "root"
- Password: Your IPMI password
- Port: 623 (default)
-
Login with your new admin credentials
lm-sensors HTTP Server (Optional but Recommended)
For better temperature monitoring (including PCIe cards), set up lm-sensors on your Dell server:
Option A: Automated Setup
On your Dell/Proxmox server (not the controller):
# Download and run setup script
curl -O https://raw.githubusercontent.com/yourusername/ipmi-controller/main/setup-sensors-server.sh
chmod +x setup-sensors-server.sh
sudo ./setup-sensors-server.sh
Option B: Manual Setup
- Install lm-sensors:
sudo apt-get install -y lm-sensors netcat-openbsd
- Detect sensors:
sudo sensors-detect --auto
- Test sensors:
sensors
- Create HTTP server script (
/usr/local/bin/sensors-http-server.sh):
#!/bin/bash
PORT=${1:-8888}
while true; do
{
echo -e "HTTP/1.1 200 OK\r"
echo -e "Content-Type: text/plain\r"
echo -e "Access-Control-Allow-Origin: *\r"
echo -e "\r"
sensors -u 2>/dev/null || echo "Error"
} | nc -l -p "$PORT" -q 1
done
- Make executable:
chmod +x /usr/local/bin/sensors-http-server.sh
- Create systemd service (
/etc/systemd/system/sensors-http.service):
[Unit]
Description=lm-sensors HTTP Server
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/sensors-http-server.sh 8888
Restart=always
User=root
[Install]
WantedBy=multi-user.target
- Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable sensors-http
sudo systemctl start sensors-http
- Test:
curl http://$(hostname -I | awk '{print $1}'):8888
Configure IPMI Controller
- Go to Settings → HTTP tab
- Enable "HTTP Sensor"
- Enter URL:
http://your-dell-server-ip:8888 - Save
Docker Deployment
docker build -t ipmi-controller .
docker run -d \
-p 8000:8000 \
-v $(pwd)/data:/app/data \
--name ipmi-controller \
ipmi-controller
Troubleshooting
IPMI Connection Failed
- Verify IPMI IP is correct
- Check IPMI username/password
- Ensure IPMI is enabled in BIOS/iDRAC
- Test manually:
ipmitool -I lanplus -H <ip> -U <user> -P <pass> mc info
No Temperature Data
- Check if lm-sensors is installed on Dell server
- Run
sensorsto verify it works - Check HTTP endpoint:
curl http://dell-ip:8888
Service Won't Start
# Check logs
sudo journalctl -u sensors-http -f
# Check if port is in use
sudo netstat -tlnp | grep 8888
Security Notes
- Change default password after first login
- Use HTTPS/reverse proxy for production
- Firewall port 8000 to internal network only
- HTTP sensor endpoint is read-only
Updating
cd ipmi-controller
git pull
pip install -r requirements.txt
# Restart the service