HUB
Sign inSign up
ugos-exporter logo

rcooler/ugos-exporter

By rcooler

•Updated about 2 months ago

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

Image
1

3.7K

rcooler/ugos-exporter repository overview

ugos-bridge overview

⁠Quick overview

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.

⁠Changelog⁠

⁠1.0.7 - 2026-10-12
  • Updated Vite to 8.3.4 and Simple Icons to 16.34.0 and regenerated both Home Assistant card bundles. The bridge runtime and configuration are unchanged.
⁠1.0.6 - 2026-10-12
  • Security update: Go 1.27.2 and golang.org/x/net 0.60.0 with the October HTTP and TLS fixes.
  • Updated Go dependencies (Prometheus client 1.25, urfave/cli 3.14) and the Debian 13.7 runtime image.
  • Updated the card build dependencies and regenerated both Home Assistant card bundles.
  • Public metrics, configuration, and Home Assistant card behavior are unchanged.

Full history: CHANGELOG.md⁠ · GitHub Releases⁠

⁠Installation

⁠Docker Compose
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
⁠MQTT and Home Assistant

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.

⁠Prometheus scrape job
  - job_name: 'ugos-bridge'
    static_configs:
      - targets: ['ugos-bridge:9877']
⁠Endpoints
http://localhost:9877/metrics
http://localhost:9877/healthz

⁠PS

  • UGOS Pro 1.19 and later reports 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.
  • The Docker socket is mounted read-only and the bridge only reads from the Docker Engine API. The HTTP listener has no authentication; keep port 9877 on a private network.
  • Reference device: UGREEN DXP6800 Pro.

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.

Tag summary

Content type

Image

Digest

sha256:8520dbc37…

Size

66.6 MB

Last updated

about 2 months ago

docker pull rcooler/ugos-exporter