From dc00b99d9a918a26ffdf511215c561184492df82 Mon Sep 17 00:00:00 2001 From: Jake Keeys Date: Sun, 26 Jan 2020 15:44:18 +0000 Subject: [PATCH] add desc, build and run instructions --- README.md | 100 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 72 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index ca8047a..8ac98c4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,18 @@ # HG612 Prometheus Exporter +[![Docker Repository on Quay](https://quay.io/repository/jakekeeys/hg612-exporter/status "Docker Repository on Quay")](https://quay.io/repository/jakekeeys/hg612-exporter) + +A prometheus exporter for the HG612 modem + +![](https://i0.wp.com/codeblog.dotsandbrackets.com/wp-content/uploads/2017/01/prometheus-logo.jpg?resize=231%2C231) ![](https://kitz.co.uk/routers/images/huawei_echolife_hg612.jpg) + +*Requires unlocked firmware with exposed metrics* + +see https://kitz.co.uk/routers/hg612unlock.htm for flashing instructions and firmware + +see also https://support.aa.net.uk/Router_-_EchoLife_HG612 + + ## Usage ``` @@ -20,35 +33,66 @@ GLOBAL OPTIONS: --help, -h show help (default: false) ``` -## Dashbaord +## Build +go +``` +go build . +``` -![](https://raw.githubusercontent.com/jakekeeys/hg612-exporter/master/resources/dashboard.png) +docker +``` +docker build . +``` + +## Run +go +``` +go run main.go --host --identifier +``` + +docker +``` +docker run docker run quay.io/jakekeeys/hg612-exporter --host --identifier +``` ## Metrics -| Metric | Type | Lables | + +| Domain | Implemented | Status | --- | --- | --- | -| dsl_down_attenuation | gauge | `host` `identifier` | -| dsl_down_crc | gauge | `host` `identifier` | -| dsl_down_crc_2 | gauge | `host` `identifier` | -| dsl_down_current_rate | gauge | `host` `identifier` | -| dsl_down_current_rate_2 | gauge | `host` `identifier` | -| dsl_down_fec | gauge | `host` `identifier` | -| dsl_down_fec_2 | gauge | `host` `identifier` | -| dsl_down_hec | gauge | `host` `identifier` | -| dsl_down_hec_2 | gauge | `host` `identifier` | -| dsl_down_max_rate | gauge | `host` `identifier` | -| dsl_down_power | gauge | `host` `identifier` | -| dsl_down_snr | gauge | `host` `identifier` | -| dsl_status | gauge | `host` `identifier` `status` `modulation` `dataPath` | -| dsl_up_attenuation | gauge | `host` `identifier` | -| dsl_up_crc | gauge | `host` `identifier` | -| dsl_up_crc_2 | gauge | `host` `identifier` | -| dsl_up_current_rate | gauge | `host` `identifier` | -| dsl_up_current_rate_2 | gauge | `host` `identifier` | -| dsl_up_fec | gauge | `host` `identifier` | -| dsl_up_fec_2 | gauge | `host` `identifier` | -| dsl_up_hec | gauge | `host` `identifier` | -| dsl_up_hec_2 | gauge | `host` `identifier` | -| dsl_up_max_rate | gauge | `host` `identifier` | -| dsl_up_power | gauge | `host` `identifier` | -| dsl_up_snr | gauge | `host` `identifier` | +| dsl | ✓ | alpha | +| device | - | - | +| wan | - | - | +| lan | - | - | +| atm | - | - | + +| Domain | Metric Name | Type | Labels | +| --- | --- | --- | --- | +| dsl | dsl_down_attenuation | gauge | `host` `identifier` | +| dsl | dsl_down_crc | gauge | `host` `identifier` | +| dsl | dsl_down_crc_2 | gauge | `host` `identifier` | +| dsl | dsl_down_current_rate | gauge | `host` `identifier` | +| dsl | dsl_down_current_rate_2 | gauge | `host` `identifier` | +| dsl | dsl_down_fec | gauge | `host` `identifier` | +| dsl | dsl_down_fec_2 | gauge | `host` `identifier` | +| dsl | dsl_down_hec | gauge | `host` `identifier` | +| dsl | dsl_down_hec_2 | gauge | `host` `identifier` | +| dsl | dsl_down_max_rate | gauge | `host` `identifier` | +| dsl | dsl_down_power | gauge | `host` `identifier` | +| dsl | dsl_down_snr | gauge | `host` `identifier` | +| dsl | dsl_status | gauge | `host` `identifier` `status` `modulation` `dataPath` | +| dsl | dsl_up_attenuation | gauge | `host` `identifier` | +| dsl | dsl_up_crc | gauge | `host` `identifier` | +| dsl | dsl_up_crc_2 | gauge | `host` `identifier` | +| dsl | dsl_up_current_rate | gauge | `host` `identifier` | +| dsl | dsl_up_current_rate_2 | gauge | `host` `identifier` | +| dsl | dsl_up_fec | gauge | `host` `identifier` | +| dsl | dsl_up_fec_2 | gauge | `host` `identifier` | +| dsl | dsl_up_hec | gauge | `host` `identifier` | +| dsl | dsl_up_hec_2 | gauge | `host` `identifier` | +| dsl | dsl_up_max_rate | gauge | `host` `identifier` | +| dsl | dsl_up_power | gauge | `host` `identifier` | +| dsl | dsl_up_snr | gauge | `host` `identifier` | + +### Grafana Dashboard Preview + +![](https://raw.githubusercontent.com/jakekeeys/hg612-exporter/master/resources/dashboard.png)