- ✅ Monitor Docker containers (running/stopped)
- ✅ Monitor HTTP/HTTPS endpoints
- ✅ Auto-resolve alerts when services come back
- ✅ Configurable via environment variables
- ✅ Graceful shutdown
- ✅ Health check included
- ✅ Lightweight (~50MB image)
- ✅ Public Docker image - no build required!
The fastest way to get started - just pull and run!
docker pull bigsk1/jarvis-monitor:latest && \
docker run -d \
--name jarvis-monitor \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-e JARVIS_API="http://YOUR_JARVIS_IP:8880/api/alerts" \
-e JARVIS_API_KEY="YOUR_JARVIS_API_KEY" \
-e SOURCE_NAME="my-server" \
-e MONITOR_CONTAINERS="container1,container2" \
bigsk1/jarvis-monitor:latest && \
docker logs -f jarvis-monitorReplace:
YOUR_DOCKERHUB_USERNAMEwith the actual Docker Hub usernameYOUR_JARVIS_IPwith your Jarvis server IP (Tailscale recommended)my-serverwith a descriptive name for this servercontainer1,container2with containers to monitor (or leave empty)
docker pull bigsk1/jarvis-monitor:latestdocker run -d \
--name jarvis-monitor \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-e JARVIS_API="http://YOUR_JARVIS_IP:8880/api/alerts" \
-e JARVIS_API_KEY="YOUR_JARVIS_API_KEY" \
-e SOURCE_NAME="my-server" \
-e MONITOR_CONTAINERS="nginx,redis,postgres" \
-e MONITOR_URLS="" \
-e CHECK_INTERVAL="60" \
-e AUTO_RESOLVE_INTERVAL="60" \
bigsk1/jarvis-monitor/jarvis-monitor:latestdocker logs -f jarvis-monitordocker run -d \
--name jarvis-monitor \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-e JARVIS_API="http://100.101.102.103:8880/api/alerts" \
-e SOURCE_NAME="production-server" \
-e MONITOR_CONTAINERS="webapp,database,cache" \
bigsk1/jarvis-monitor:latestdocker run -d \
--name jarvis-monitor \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-e JARVIS_API="http://100.101.102.103:8880/api/alerts" \
-e SOURCE_NAME="web-services" \
-e MONITOR_URLS="proxmox-main|http://192.168.1.100:8080/health,webapp|http://localhost:3000/api/status" \
bigsk1/jarvis-monitor:latestNote: Named URLs use the format friendly-name|url. TTS will say "proxmox-main is down" instead of the raw URL.
docker run -d \
--name jarvis-monitor \
--restart unless-stopped \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-e JARVIS_API="http://100.101.102.103:8880/api/alerts" \
-e SOURCE_NAME="ai-server" \
-e MONITOR_CONTAINERS="ollama,comfyui,kokoro-tts" \
-e MONITOR_URLS="ollama-api|http://localhost:11434/health,comfyui-web|http://localhost:8188/health" \
bigsk1/jarvis-monitor:latestIf you prefer using docker-compose for easier management:
# Create directory
mkdir ~/jarvis-monitor && cd ~/jarvis-monitor
# Download docker-compose.yml and .env.example
wget https://raw.githubusercontent.com/bigsk1/jarvis-monitor/main/docker-compose.yml
wget https://raw.githubusercontent.com/bigsk1/jarvis-monitor/main/.env.example# Create .env from example
cp .env.example .env
# Edit with your values
nano .envdocker-compose up -ddocker-compose logs -fFor secure remote monitoring, use Tailscale to connect your servers:
On Jarvis server:
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
tailscale ip -4 # Note this IP (e.g., 100.101.102.103)On remote server (where monitor runs):
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale upTest connectivity:
ping 100.101.102.103 # Your Jarvis Tailscale IP
curl http://100.101.102.103:8880/api/alertsThen use the Tailscale IP in your JARVIS_API environment variable!
Stop a monitored container:
docker stop kokoro-ttsJarvis should speak:
"Boss, urgent alert! Container Stopped: kokoro-tts"
# On Jarvis server
curl http://localhost:8880/api/alertsOr via voice:
"Hey Jarvis, list pending alerts"
| Variable | Default | Description |
|---|---|---|
JARVIS_API |
http://localhost:8880/api/alerts |
Jarvis API endpoint |
CHECK_INTERVAL |
60 |
Check interval (seconds) |
ALERT_TIMEOUT |
30 |
Timeout for Jarvis API calls (seconds) - increase if TTS is slow |
MONITOR_CONTAINERS |
"" |
Container names to monitor (comma-separated) |
MONITOR_URLS |
"" |
URLs to monitor - supports named URLs (see below) |
SOURCE_NAME |
hostname | Source name for alerts |
ALERT_ON_START |
false |
Send alert when agent starts |
MONITOR_CONTAINERS: "nginx,redis,postgres,app,worker"Simple format (URL only):
MONITOR_URLS: "http://localhost:8000/health,http://localhost:3000/api/health"Named format (recommended - TTS will speak the friendly name):
# Format: friendly-name|url
MONITOR_URLS: "proxmox-main|http://192.168.1.100:8080/health,web-server|http://192.168.1.100:9090"With named URLs, Jarvis will say:
"Boss, urgent alert! Service Down: proxmox-main"
Instead of:
"Boss, urgent alert! Service Down: http://192.168.1.100:8080/health"
Mix both formats:
MONITOR_URLS: "proxmox-main|http://192.168.1.100:8080/health,http://localhost:3000/api/health"View logs in real-time:
docker-compose logs -fExample output:
============================================================
🔍 Jarvis Monitoring Agent
============================================================
Started: 2025-11-18 10:30:00
Jarvis API: http://100.101.102.103:8880/api/alerts
Source Name: proxmox-gpu-vm
Check Interval: 60s
Monitoring Containers: kokoro-tts, comfyui, ollama
Monitoring URLs: comfyui-web (http://localhost:8188/health), ollama-api (http://localhost:11434/health)
============================================================
✅ Docker client initialized
[10:31:00] Status: comfyui-web:✓ | ollama-api:✓ | kokoro-tts:✓ | comfyui:✓ | ollama:✓
[10:32:00] ❌ CONTAINER STOPPED: kokoro-tts (status: exited)
✅ Alert sent (ID: 42)
[10:33:00] ❌ URL DOWN: proxmox-main (http://192.168.1.100:8080/health)
✅ Alert sent (ID: 43)
Start
docker start jarvis-monitorStop
docker stop jarvis-monitorRestart
docker restart jarvis-monitorUpdate to latest image
docker stop jarvis-monitor
docker rm jarvis-monitor
docker pull bigsk1/jarvis-monitor:latest
# Then run the docker run command again with your env varsView logs
docker logs -f jarvis-monitorView status
docker ps -a | grep jarvis-monitorRemove
docker stop jarvis-monitor
docker rm jarvis-monitorStart
docker-compose up -dStop
docker-compose downRestart
docker-compose restartUpdate
docker-compose pull
docker-compose up -dView logs
docker-compose logs -fView status
docker-compose ps- Use Tailscale/WireGuard for remote access (not port forwarding)
- Mount Docker socket as read-only:
:ro - Don't expose Jarvis API to internet without protection
- Use environment variables for configuration (not hardcoded)
The agent needs read access to Docker socket to monitor containers:
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # :ro = read-onlySecurity note: This gives the container read access to Docker. The :ro flag prevents writes.
Cause: Can't reach Jarvis API
Fix:
- Check Jarvis API is running:
curl http://localhost:8880/api/health(on Jarvis server) - Check Tailscale connectivity:
ping [JARVIS_TAILSCALE_IP] - Verify JARVIS_API environment variable is correct
- Check logs:
docker logs jarvis-monitor
Cause: Jarvis API authentication is enabled, but the monitor request did not include a valid bearer token.
Fix:
- Confirm the container has the key:
docker inspect jarvis-monitor --format '{{range .Config.Env}}{{println .}}{{end}}' | grep JARVIS_API_KEY - If using Compose, make sure
JARVIS_API_KEY=...is injarvis-monitor/.env - Recreate the container so env changes apply:
docker compose up -d --force-recreate - Check logs:
docker logs jarvis-monitor
Cause: Jarvis API is slow to respond (usually during TTS playback)
Fix:
- Increase timeout:
-e ALERT_TIMEOUT=60(default is 30s) - This is normal when Jarvis is speaking alerts - the TTS can take time
- The alert may still have been received - check Jarvis logs or ask "list pending alerts"
Cause: Can't access Docker socket
Fix:
- Check Docker socket is mounted:
docker inspect jarvis-monitor | grep docker.sock - Check permissions:
ls -la /var/run/docker.sock - Add user to docker group:
sudo usermod -aG docker $USER - Make sure volume is mounted:
-v /var/run/docker.sock:/var/run/docker.sock:ro
Cause: Container names might be wrong
Fix:
- List running containers:
docker ps --format "{{.Names}}" - Update MONITOR_CONTAINERS environment variable with exact names
- Restart agent:
docker restart jarvis-monitor - Check logs:
docker logs jarvis-monitor
Deploy multiple agents for different services:
# Web services monitor
cd ~/jarvis-monitor-web
# Configure for web containers
docker-compose up -d
# AI services monitor
cd ~/jarvis-monitor-ai
# Configure for AI containers
docker-compose up -dEach sends alerts with different SOURCE_NAME.
Some apps don't have /health endpoints. Use any URL:
MONITOR_URLS: "http://localhost:8000/,http://localhost:3000/api/status"Agent checks for 2xx/3xx status codes.
Monitoring agent only uses:
- CPU: <1%
- RAM: ~30MB
- Network: Minimal (only when sending alerts)