Skip to content

swoga/ufiber-exporter

Repository files navigation

ufiber-exporter

ufiber-exporter is an Prometheus exporter for Ubiquiti UFiber OLTs.
The goal is to export all available metrics from the OLT and attached ONUs.

Probing

Devices can be probed by requesting:

http://localhost:9777/probe?target=xxx

Configured options can be overwritten by using query parameters e.g.

http://localhost:9777/probe?target=xxx&export_olt=1&export_onus=0

target can be either an address or hostname that is scraped using the globally configured credentials, or the name of a device in the configuration.

For troubleshooting there are also two log levels available:

http://localhost:9777/probe?target=xxx&debug=1
http://localhost:9777/probe?target=xxx&trace=1

Docker image

Docker image is available on Docker Hub, Quay.io and GitHub

docker pull swoga/ufiber-exporter
docker pull quay.io/swoga/ufiber-exporter
docker pull ghcr.io/swoga/ufiber-exporter

You just need to map your config file into the container at /etc/ufiber-exporter/config.yml

docker run -v config.yml:/etc/ufiber-exporter/config.yml swoga/ufiber-exporter

Command line flags

--config.file=config.yml
--debug

Configuration file

listen: <string> | default = :9777
probe_path: <string> | default = /probe
metrics_path: <string> | default = /metrics
timeout: <int> | default = 60
global: <global>

devices:
  - <device>

<global>

username: <string>
password: <string>
options: <options>

<options>

export_olt: <bool> | default = true
export_onus: <bool> | default = true
export_mac_table: <bool> | default = false

<device>

name: <string>
address: <string>
username: <string> | default = global.username
password: <string> | default = global.password
options: <options> | default = global.options