Prometheus Exporter written in Go for TP-Link Omada SDN.
This exporter is built with native Go HTTP and prometheus/client_golang
libraries to expose metrics from Omada SDN to Prometheus.
Metrics are queried live from the controller when the /metrics endpoint is accessed,
avoiding unnecessary polling when not in use.
Supports both Omada OpenAPI and Web API to accommodate current platform limitations.
- Omada Controller with configured:
- Prometheus (or another metrics scraper) to collect and store the metrics
- Grafana to visualize the data using built-in dashboards
- (Optional) Grafana Loki if you want to collect and view logs from the exporter
- Clone the Repository
git clone https://github.com/StanislawHorna/Omada_Exporter_Go.git
cd Omada_Exporter_Go- Create
.envFile with variables from Configuration Parameters
LOG_LEVEL=info
OMADA_URL=https://<omada_ip_address>:<omada_port>
OMADA_SITE_NAME=<your_omada_site_name>
OMADA_CLIENT_ID=<open_api_client_id>
OMADA_CLIENT_SECRET=<open_api_client_secret>
OMADA_USERNAME=<web_ui_username>
OMADA_PASSWORD=<web_ui_password>
LOKI_URL=http://<loki_ip_address>:<loki_port>
LOKI_ENV=prod
LOKI_APP_VERSION=1.0.0
- Build the Docker image
docker build -t omada_exporter .- Run the container
docker run -d \
--env-file .env \
-p 8080:8080 \
--name omada_exporter \
omada_exporter- Configure Prometheus to scrape the data:
scrape_configs:
- job_name: "Omada"
static_configs:
- targets: ["<docker_host_ip>:8080"]
labels:
device_name: "<omada_controller_friendly_name>"
metrics_path: /metrics- Import dashboards from
Dashboardsdirectory to your Grafana instance.
Tip
After starting up the exporter navigate to http://"<docker_host_ip>:8080/metrics
and check omada_http_client_requests_total metrics.
There should be no metrics with code different different than 200
- OpenAPI Client – Created via:
Settings -> Platform Integration. Assign admin role for full API access. - Service User – Create under:
Account sectionatGlobal level. Assign viewer role for read-only access.
All configuration values are read from environment variables. These can be provided via a .env file, environment variables in your system, or directly in Docker Compose.
| Variable | Description | Default |
|---|---|---|
LOG_LEVEL |
Logging verbosity level (debug, info, warn, error) | error |
OMADA_URL |
Full base URL to the Omada controller (e.g., https://192.168.1.1:8043) | - |
OMADA_SITE_NAME |
Name of the site you wish to monitor | - |
OMADA_CLIENT_ID |
OpenAPI Client ID created in Omada Platform Integration | - |
OMADA_CLIENT_SECRET |
OpenAPI Client Secret | - |
OMADA_USERNAME |
Username for Web API access | - |
OMADA_PASSWORD |
Password for Web API access | - |
- Switch: SG2218 v1.20
- Router: ER707-M2 v1.0
- Access Point: EAP650(EU) v1.0
- Omada controller: Software Controller v5.15.8.s hosted in Docker container



