1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: '3.8'
services:
shelly-exporter:
image: ghcr.io/rvben/shelly-exporter:latest
container_name: shelly-exporter
restart: unless-stopped
ports:
- "9925:9925"
environment:
# Required: comma-separated list of Shelly device URLs
SHELLY_HOSTS: "http://192.168.1.100,http://192.168.1.101,http://192.168.1.102"
# Optional: custom names for devices (same order as hosts)
SHELLY_NAMES: "Living Room Light,Kitchen Switch,Bedroom Dimmer"
# Optional: authentication (if your devices have authentication enabled)
# SHELLY_USERNAME: "admin"
# SHELLY_PASSWORD: "your-password"
# Optional: logging level (trace, debug, info, warn, error)
SHELLY_LOG_LEVEL: "info"
# Optional: poll interval in seconds (default: 30)
SHELLY_POLL_INTERVAL: "30"
# Optional: HTTP timeout in seconds (default: 10)
SHELLY_HTTP_TIMEOUT: "10"
# Optional: enable mDNS discovery (default: false)
# SHELLY_DISCOVERY: "true"
# SHELLY_DISCOVERY_INTERVAL: "300"
# Example Prometheus configuration
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
volumes:
prometheus_data: