UGREEN NAS (UGOS) metrics bridge for Prometheus and Home Assistant: Docker, VMs, host.
6.0K

ugos-bridge is a lightweight, read-only metrics bridge for UGOS / UGREEN NAS hosts, Docker Compose stacks, and QEMU/libvirt virtual machines. It collects Docker, VM, host, storage, network, GPU, and hardware health telemetry and exports it to Prometheus and to Home Assistant through MQTT Discovery.
Prometheus metrics are served on :9877 by default. MQTT/Home Assistant export is optional and enabled with environment variables.
linux/amd64 and linux/arm64.rcooler/ugos-bridge. rcooler/ugos-exporter is the former name and receives the same images; new installations should use rcooler/ugos-bridge.golang.org/x/net 0.60.0 with the October HTTP and TLS fixes.urfave/cli 3.14) and the Debian 13.7 runtime image.Full history: CHANGELOG.md · GitHub Releases
services:
ugos-bridge:
image: rcooler/ugos-bridge:latest
container_name: ugos-bridge
restart: unless-stopped
ports:
- "9877:9877"
environment:
UGOS_BRIDGE_LISTEN_ADDRESS: ":9877"
UGOS_BRIDGE_DOCKER_HOST: "unix:///var/run/docker.sock"
UGOS_BRIDGE_SCRAPE_INTERVAL: "15s"
UGOS_BRIDGE_HOST_METRICS_ENABLED: "true"
UGOS_BRIDGE_HOST_PROCFS: "/host/proc"
UGOS_BRIDGE_HOST_SYSFS: "/host/sys"
UGOS_BRIDGE_HOST_NAME: "ugreen-nas"
# UGOS Pro 1.19+ Docker Projects UI rejects a direct /:/rootfs bind.
UGOS_BRIDGE_HOST_FILESYSTEMS: "/volume1:/volume1,/volume2:/volume2"
UGOS_BRIDGE_HOST_VMS_ENABLED: "true"
UGOS_BRIDGE_HOST_VIRSH_URI: "qemu:///system"
UGOS_BRIDGE_MQTT_ENABLED: "false"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /volume1:/volume1:ro
- /volume2:/volume2:ro
- /var/run/libvirt:/var/run/libvirt:ro
Enable MQTT/Home Assistant discovery by setting:
UGOS_BRIDGE_MQTT_ENABLED: "true"
UGOS_BRIDGE_MQTT_BROKER: "tcp://homeassistant.local:1883"
UGOS_BRIDGE_MQTT_USER: "ha"
UGOS_BRIDGE_MQTT_PASS: "change_me"
UGOS_BRIDGE_MQTT_TOPIC_PREFIX: "ugos_bridge"
UGOS_BRIDGE_MQTT_DISCOVERY_PREFIX: "homeassistant"
UGOS_BRIDGE_MQTT_RETAIN: "true"
UGOS_BRIDGE_MQTT_ENTITY_GRACE: "360s"
Keep UGOS_BRIDGE_HOST_NAME, the MQTT client ID and the topic prefix fixed once Home Assistant has discovered the devices; they are part of the entity identities.
- job_name: 'ugos-bridge'
static_configs:
- targets: ['ugos-bridge:9877']
http://localhost:9877/metrics
http://localhost:9877/healthz
invalid configuration file when its Docker Projects UI encounters - /:/rootfs:ro. Omit that bind when using the UI. It only affects optional host / filesystem telemetry (byte, inode, and read-only series); /volume1, /volume2, and all other configured bridge telemetry remain available. The bind remains valid for deployments managed outside the UGOS Docker Projects UI./healthz reports that the process is alive. Watch the ugos_bridge_up metric to know whether collection works.9877 on a private network.MIT licensed. UgosBridge is an unofficial DIY open-source project and is not affiliated with, endorsed by, or sponsored by UGREEN. UGREEN, UGOS, and related product names are trademarks of their respective owners and are used only to describe compatibility and integration.
Content type
Image
Digest
sha256:8520dbc37…
Size
66.6 MB
Last updated
about 2 months ago
docker pull rcooler/ugos-bridge