-
Notifications
You must be signed in to change notification settings - Fork 7
docs: expand README with usage, configuration, and metrics reference #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ebowman
wants to merge
1
commit into
SuperQ:main
Choose a base branch
from
ebowman:improve-readme
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,90 @@ | ||
| # DrayTek Exporter | ||
|
|
||
| Prometheus exporter for DrayTek Vigor modems/routers | ||
| [](https://github.com/SuperQ/draytek_exporter/actions/workflows/ci.yml) | ||
|
|
||
| # Currently supported devices | ||
| Prometheus exporter for DrayTek Vigor modems/routers. Collects DSL line status and performance metrics via the DrayTek web API. | ||
|
|
||
| ## Supported Devices | ||
|
|
||
| * DrayTek Vigor 167 (v5 firmware) | ||
|
|
||
| ## Installation | ||
|
|
||
| ### Pre-built binaries | ||
|
|
||
| Download from the [releases page](https://github.com/SuperQ/draytek_exporter/releases). | ||
|
|
||
| ### Docker | ||
|
|
||
| ```sh | ||
| docker run -e DRAYTEK_PASSWORD=yourpassword quay.io/superq/draytek-exporter --target=192.168.1.1 | ||
| ``` | ||
|
|
||
| Multi-arch images are available for `amd64`, `armv7`, and `arm64`. | ||
|
|
||
| ### Building from source | ||
|
|
||
| Requires Go 1.25+. | ||
|
|
||
| ```sh | ||
| make build | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ```sh | ||
| export DRAYTEK_PASSWORD=yourpassword | ||
| ./draytek_exporter --target=192.168.1.1 | ||
| ``` | ||
|
|
||
| The exporter authenticates to the router's web interface, scrapes DSL status data, and exposes it as Prometheus metrics on `:9103/metrics`. | ||
|
|
||
| ### Flags | ||
|
|
||
| | Flag | Default | Description | | ||
| |------|---------|-------------| | ||
| | `--target` | `192.168.1.1` | Router IP address or hostname | | ||
| | `--username` | `monitor` | Username for router authentication | | ||
| | `--password-env` | `DRAYTEK_PASSWORD` | Environment variable containing the password | | ||
| | `--web.listen-address` | `:9103` | Address to listen on for HTTP requests | | ||
| | `--web.telemetry-path` | `/metrics` | Path under which to expose metrics | | ||
|
|
||
| ### Router Setup | ||
|
|
||
| Create a dedicated monitoring user on your DrayTek device (e.g. `monitor`) with read-only access. Avoid using the admin account. | ||
|
|
||
| ## Metrics | ||
|
|
||
| All metrics use the `draytek_` prefix. | ||
|
|
||
| | Metric | Type | Description | | ||
| |--------|------|-------------| | ||
| | `draytek_up` | Gauge | Whether the DSL link is up (1) or down (0) | | ||
| | `draytek_info` | Gauge | Device info labels: `dsl_version`, `mode`, `profile` | | ||
| | `draytek_downstream_actual_bps` | Gauge | Current downstream sync speed (bits/sec) | | ||
| | `draytek_upstream_actual_bps` | Gauge | Current upstream sync speed (bits/sec) | | ||
| | `draytek_downstream_attainable_bps` | Gauge | Maximum attainable downstream speed (bits/sec) | | ||
| | `draytek_upstream_attainable_bps` | Gauge | Maximum attainable upstream speed (bits/sec) | | ||
| | `draytek_downstream_snr_margin_db` | Gauge | Downstream signal-to-noise ratio margin (dB) | | ||
| | `draytek_upstream_snr_margin_db` | Gauge | Upstream signal-to-noise ratio margin (dB) | | ||
| | `draytek_downstream_actual_psd_db` | Gauge | Downstream power spectrum density (dB) | | ||
| | `draytek_upstream_actual_psd_db` | Gauge | Upstream power spectrum density (dB) | | ||
| | `draytek_downstream_interleave_depth` | Gauge | Downstream interleaving depth | | ||
| | `draytek_upstream_interleave_depth` | Gauge | Upstream interleaving depth | | ||
| | `draytek_{near,far}_end_attenuation_db` | Gauge | Line attenuation (dB) | | ||
| | `draytek_{near,far}_end_bitswap_active` | Gauge | Whether bitswap is active | | ||
| | `draytek_{near,far}_end_retx_active` | Gauge | Whether retransmission (G.INP) is active | | ||
| | `draytek_{near,far}_end_crc_errors_total` | Counter | CRC error count | | ||
| | `draytek_{near,far}_end_errored_seconds_total` | Counter | Errored seconds | | ||
| | `draytek_{near,far}_end_severely_errored_seconds_total` | Counter | Severely errored seconds | | ||
| | `draytek_{near,far}_end_unavailable_seconds_total` | Counter | Unavailable seconds | | ||
| | `draytek_{near,far}_end_hec_errors_total` | Counter | Header error correction errors | | ||
| | `draytek_{near,far}_end_los_failures_total` | Counter | Loss of Signal failures | | ||
| | `draytek_{near,far}_end_lof_failures_total` | Counter | Loss of Frame failures | | ||
| | `draytek_{near,far}_end_lpr_failures_total` | Counter | Loss of Power failures | | ||
| | `draytek_{near,far}_end_lcd_failures_total` | Counter | Loss of Cell Delineation failures | | ||
| | `draytek_{near,far}_end_reed_solomon_forward_error_corrections_total` | Counter | Reed-Solomon FEC corrections | | ||
|
|
||
| ## License | ||
|
|
||
| Apache License 2.0. See [LICENSE](LICENSE). | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't needed as the container image has an automatic manifest.