{"id":20572561,"url":"https://github.com/ffddorf/unms-exporter","last_synced_at":"2026-03-11T16:36:14.199Z","repository":{"id":38356907,"uuid":"325571510","full_name":"ffddorf/unms-exporter","owner":"ffddorf","description":"Prometheus exporter for UNMS by Ubiquiti (https://unms.com/)","archived":false,"fork":false,"pushed_at":"2025-10-07T18:31:28.000Z","size":560,"stargazers_count":11,"open_issues_count":15,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T20:36:02.542Z","etag":null,"topics":["monitoring","netops","network","prometheus","prometheus-exporter","unms"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ffddorf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-30T14:30:39.000Z","updated_at":"2024-12-14T21:59:15.000Z","dependencies_parsed_at":"2023-01-31T05:20:12.299Z","dependency_job_id":"935f233b-db22-455e-b9b5-e0cf9952adb7","html_url":"https://github.com/ffddorf/unms-exporter","commit_stats":{"total_commits":101,"total_committers":5,"mean_commits":20.2,"dds":"0.37623762376237624","last_synced_commit":"e460a2c0d1c2d1b4e1f67a3aff63b35a6789b6b6"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ffddorf/unms-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffddorf%2Funms-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffddorf%2Funms-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffddorf%2Funms-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffddorf%2Funms-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ffddorf","download_url":"https://codeload.github.com/ffddorf/unms-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffddorf%2Funms-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279036210,"owners_count":26089841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["monitoring","netops","network","prometheus","prometheus-exporter","unms"],"created_at":"2024-11-16T05:21:42.377Z","updated_at":"2025-10-15T02:33:46.771Z","avatar_url":"https://github.com/ffddorf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UNMS Exporter for Prometheus\n\nSmall daemon offering UNMS device statistics as Prometheus metrics.\n\n## Deployment\n\nPremade Docker Images are available at [quay.io](https://quay.io/repository/ffddorf/unms-exporter).\n\n```bash\ndocker pull quay.io/ffddorf/unms-exporter\n```\n\n## Configuration\n\n### Options\n\nConfig can be specified via a YAML file, as args or from environment variables.\n\n### Listen Address\n\n- Config: `listen`\n- Args: `--listen` or `-l`\n- Env: `UNMS_EXPORTER_SERVER_ADDR`\n\nAddress the exporter should listen on. Defaults to `[::]:9806`.\n\n### Config File Location\n\n- Args: `--config` or `-c`\n\nLocation of the YAML config file to load.\n\n### Log Verbosity\n\n- Config: `log_level`\n- Env: `UNMS_EXPORTER_LOG_LEVEL`\n\nLog verbosity level. Defaults to `info`. Use `debug` to get more details.\n\n### UNMS API Tokens\n\n- Config: `token`\n- Env: `UNMS_EXPORTER_TOKEN`\n  - use a comma-separated list of `instance=token` values\n\nConfigures an API token per UNMS instance.\n\n\u003cdetails\u003e\u003csummary\u003eExample: config file (click to open)\u003c/summary\u003e\n\n```yaml\n# config.yaml\ntoken:\n  my-unms-instance.example.org: \"my token\"\n  unms.example.com: \"token123\"\n```\n\n```console\n$ unms-exporter --config config.yaml\n```\n\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003eExample: environment variable (click to open)\u003c/summary\u003e\n\n```console\n$ UNMS_EXPORTER_TOKEN=\"my-unms-instance.example.org=my token,unms.example.com=token123\" \\\n    unms-exporter\n```\n\n\u003c/details\u003e\n\n### Extra metrics\n\n- Config: `extra_metrics` (as Array)\n- Args: `--extra-metrics` (as comma-separated list)\n- Env: `UNMS_EXPORTER_EXTRA_METRICS` (as comma-separated list)\n\nEnable additional metrics to be exported. These metrics may require extra\nHTTP requests, usually one per device, so they are disabled by default.\n\n\u003cdetails\u003e\u003csummary\u003eExample: config file (click to open)\u003c/summary\u003e\n\n```yaml\n# config.yaml\nextras:\n- ping\n```\n\n```console\n$ unms-exporter --config config.yaml\n```\n\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003eExample: environment variable (click to open)\u003c/summary\u003e\n\n```console\n$ UNMS_EXPORTER_EXTRA_METRICS=\"ping\" \\\n    unms-exporter\n```\n\n\u003c/details\u003e\n\u003cdetails\u003e\u003csummary\u003eExample: command line argument (click to open)\u003c/summary\u003e\n\n```console\n$ unms-exporter --extra-metrics=\"ping\"\n```\n\n\u003c/details\u003e\n\n#### Available metrics\n\n- `ping`: Fetch statistical data from UNMS and extract and export\n  Ping RTT measurements between UNMS and the device.\n\n  \u003cdetails\u003e\u003csummary\u003eExported metrics (click to open)\u003c/summary\u003e\n\n  - `ping_loss_ratio`: Packet loss ratio (range 0-1, with 0.33 meaning 33% packet loss)\n  - `ping_rtt_best_seconds`: Best round trip time, in seconds\n  - `ping_rtt_mean_seconds`: Mean round trip time, in seconds\n  - `ping_rtt_worst_seconds`: Worst round trip time, in seconds\n  - `ping_rtt_std_deviation_seconds`: Standard deviation for round trip time, in seconds\n\n  \u003c/details\u003e\n\nFurther data is available, but not currently exported (see the API\ndocumentation for the `/devices/{id}/statistics` endpoint on your UNMS\ninstallation to get an overview). Feel free to [open a new issue][] to\ninquire whether an integration into the exporter is feasable.\n\n[open a new issue]: https://github.com/ffddorf/unms-exporter/issues/new\n\n## Prometheus Scrape Setup\n\nThe exporter follows the convention for exporters. The UNMS instance to target should be specified using the `target` query parameter.\n\nHere is how to achieve this using a static prometheus config:\n\n```yaml\nscrape_configs:\n- job_name: exporters\n  static_configs:\n    - exporter.example.org:9806 # UNMS exporter\n    - exporter.example.org:9100 # node exporter\n    - ...\n\n- job_name: unms_exporter\n  # for a static target \"unms.example.org\", rewrite it to\n  # \"exporter.example.org:9806/metrics?target=unms.example.org\",\n  # but keep \"unms.example.org\" as instance label\n  relabel_configs:\n    - source_labels: [__address__]\n      target_label: instance\n    - source_labels: [__address__]\n      target_label: __param_target\n    - replacement: 'exporter.example.org:9806'\n      target_label: __address__\n  static_configs:\n    - targets:\n      - my-unms-instance.example.org\n```\n\n\u003cdetails\u003e\u003csummary\u003eUpgrade from v0.1.2 or earlier (click to open)\u003c/summary\u003e\n\nPrevious versions did expose the UNMS metrics under any path on the exporter,\ni.e. the following URLs were handled identically:\n\n- `http://localhost:9806/?target=my-unms-instance.example.org`\n- `http://localhost:9806/metrics?target=my-unms-instance.example.org`\n- `http://localhost:9806/this/is/all/ignored?target=my-unms-instance.example.org`\n\nAdditionally, the UNMS exporter has returned a mixed set of internal and\ninstance-specific metrics.\n\nThis has changed and now follows best practices. All UNMS-specific metrics\nare now available *only* on the following URL:\n\n- `http://localhost:9806/metrics?target=my-unms-instance.example.org`\n\nAdditionally, internal metrics (e.g. Go runtime statistics) can be retrieved\nby omitting the `target` parameter:\n\n- `http://localhost:9806/metrics`\n\n\u003c/details\u003e\n\n## Available Metrics\n\n### Device wide\n\n- `device_cpu`: CPU load average in percent\n- `device_ram`: RAM usage in percent\n- `device_enabled`: Indicating if device is enabled in UNMS\n- `device_maintenance`: Indicating if device is in maintenance mode (useful for muting alerts)\n- `device_uptime`: Uptime in seconds\n- `device_last_seen`: Last seen as unix timestamp\n- `device_last_backup`: Time of last backup as unix timestamp\n\n### Per Interface\n\n- `interface_enabled`: Indicating if interface is enabled\n- `interface_plugged`: Indicating if interface has a cable plugged\n- `interface_up`: Indicating if interface is considered up\n- `interface_dropped`: Number of packets dropped\n- `interface_errors`: Number of interface errors\n- `interface_rx_bytes`: Bytes received since last reset\n- `interface_tx_bytes`: Bytes transmitted since last reset\n- `interface_rx_rate`: Bytes received rate (momentarily)\n- `interface_tx_rate`: Bytes transmitted rate (momentarily)\n- `interface_poe_power`: POE power consumption\n\n### WAN Interface\n\nIf an interface is marked as the WAN interface, these metrics are populated.\n\n- `wan_rx_bytes`: Bytes received since last reset\n- `wan_tx_bytes`: Bytes transmitted since last reset\n- `wan_rx_rate`: Bytes received rate (momentarily)\n- `wan_tx_rate`: Bytes transmitted rate (momentarily)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffddorf%2Funms-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fffddorf%2Funms-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffddorf%2Funms-exporter/lists"}