{"id":24109405,"url":"https://github.com/mbugert/connectbox-prometheus","last_synced_at":"2025-06-29T01:33:23.138Z","repository":{"id":48464866,"uuid":"253268050","full_name":"mbugert/connectbox-prometheus","owner":"mbugert","description":"Prometheus exporter for Compal CH7465LG cable modems, commonly sold as \"Connect Box\"","archived":false,"fork":false,"pushed_at":"2024-03-20T15:48:11.000Z","size":354,"stargazers_count":48,"open_issues_count":7,"forks_count":9,"subscribers_count":6,"default_branch":"dev","last_synced_at":"2025-05-12T22:55:09.795Z","etag":null,"topics":["cable-modem","connect-box","prometheus","prometheus-exporter","pypi","router","unitymedia","upc","virgin-media","ziggo"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbugert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-04-05T15:32:14.000Z","updated_at":"2024-12-30T22:24:58.000Z","dependencies_parsed_at":"2025-01-11T00:33:06.396Z","dependency_job_id":"4a8834fc-7c4d-40b5-93fc-a318b5ba5c8c","html_url":"https://github.com/mbugert/connectbox-prometheus","commit_stats":{"total_commits":39,"total_committers":3,"mean_commits":13.0,"dds":0.07692307692307687,"last_synced_commit":"360668b1cf97490658d16b3030eeccdf212f8e78"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbugert%2Fconnectbox-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbugert%2Fconnectbox-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbugert%2Fconnectbox-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbugert%2Fconnectbox-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbugert","download_url":"https://codeload.github.com/mbugert/connectbox-prometheus/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837400,"owners_count":21971982,"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","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":["cable-modem","connect-box","prometheus","prometheus-exporter","pypi","router","unitymedia","upc","virgin-media","ziggo"],"created_at":"2025-01-11T00:32:58.837Z","updated_at":"2025-05-12T22:55:16.896Z","avatar_url":"https://github.com/mbugert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Connectbox Prometheus\n[![PyPI - License](https://img.shields.io/pypi/l/connectbox-prometheus.svg)](https://pypi.org/project/connectbox-prometheus/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/connectbox-prometheus.svg)](https://pypi.org/project/connectbox-prometheus/)\n[![PyPI](https://img.shields.io/pypi/v/connectbox-prometheus.svg)](https://pypi.org/project/connectbox-prometheus/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nA [Prometheus](https://prometheus.io/) exporter for monitoring Compal CH7465LG cable modems. These are sold under the name \"Connect Box\" by Unitymedia in Germany, Ziggo in the Netherlands and UPC in Switzerland/Austria/Poland. Or as \"Virgin Media Super Hub 3\" by Virgin Media.\n\nMakes thorough use of [compal_CH7465LG_py](https://github.com/ties/compal_CH7465LG_py) by [@ties](https://github.com/ties/) (thanks!).\n\n## Installation\nOn your Prometheus server host:\n\n### Using pip\n1. [Create a virtual environment](https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments) using python3.7 or higher\n2. Install the exporter via `pip install connectbox-prometheus`\n\n### Using Docker\nAlternatively you could use the provided `Dockerfile`.\nWe don't provide builds on [Docker Hub](https://hub.docker.com/) or similar, so you need to `git clone` and build it yourself:\n\n`git clone https://github.com/mbugert/connectbox-prometheus.git`\n\n`cd connectbox-prometheus`\n\nChoose **either** `docker run` **or** `docker-compose`.\n\n#### docker run\n\nTo build your own local docker image run\n`docker build -t connectbox-prometheus .`\n\nTo actually create and run a container named `connectbox-prometheus` use the following command:\n\n`docker run -v connectbox-prometheus-volume:/data -p 9705:9705 --name connectbox-prometheus connectbox-prometheus`\n\nThe example `config.yml` found in the root of this repo will be copied to the provided `/data` volume (e.g. `connectbox-prometheus-volume`, usually found under `/var/lib/docker/volumes/connectbox-prometheus-volume` and the container will stop, because you most likely need to modify the given config. See [Usage](#usage).\n\nAfter modifying, run `docker start connectbox-prometheus` to keep the container running.\n\n#### docker-compose\n\n`docker-compose up` will automatically build the docker image, start the container the first time to copy the example `config.yml` and exit again.\nNow there should be an directory named `data` where you can find your `config.yml`. Modify it to your needs. See [Usage](#usage).\n\nAfter modifying, run `docker-compose up -d` to keep the container running.\n\n## Usage\nThis exporter queries exactly one Connect Box as a remote target.\nTo get started, modify `config.yml` from this repository or start out with the following content:\n```yaml\n# Connect Box IP address\nip_address: 192.168.0.1\n\n# Connect Box web interface password\npassword: WhatEverYourPasswordIs\n```\n\nThen run `connectbox_exporter path/to/your/config.yml` .\n\n## Prometheus Configuration\nAdd the following to your `prometheus.yml`:\n```yaml\nscrape_configs:\n  - job_name: 'connectbox'\n    static_configs:\n      - targets:\n        - localhost:9705\n```\nOne scrape takes roughly 6 seconds.\n\n## Exported Metrics\n| Metric name                                           | Description                                               |\n|:------------------------------------------------------|:----------------------------------------------------------|\n| `connectbox_device_info`                              | Assorted device information                               |\n| `connectbox_provisioning_status`                      | Modem provisioning status                                 |\n| `connectbox_uptime_seconds`                           | Device uptime in seconds                                  |\n| `connectbox_tuner_temperature_celsius`                | Tuner temperature                                         |\n| `connectbox_temperature_celsius`                      | Temperature                                               |\n| `connectbox_ethernet_client_speed_mbit`               | Maximum speed of connected ethernet clients               |\n| `connectbox_wifi_client_speed_mbit`                   | Maximum speed of connected Wi-Fi clients                  |\n| `connectbox_downstream_frequency_hz`                  | Downstream channel frequency                              |\n| `connectbox_downstream_power_level_dbmv`              | Downstream channel power level                            |\n| `connectbox_downstream_snr_db`                        | Downstream channel signal-to-noise ratio (SNR)            |\n| `connectbox_downstream_rxmer_db`                      | Downstream channel receive modulation error ratio (RxMER) |\n| `connectbox_downstream_codewords_unerrored_total`     | Unerrored downstream codewords                            |\n| `connectbox_downstream_codewords_corrected_total`     | Corrected downstream codewords                            |\n| `connectbox_downstream_codewords_uncorrectable_total` | Uncorrectable downstream codewords                        |\n| `connectbox_upstream_frequency_hz`                    | Upstream channel frequency                                |\n| `connectbox_upstream_power_level_dbmv`                | Upstream channel power level                              |\n| `connectbox_upstream_symbol_rate_ksps`                | Upstream channel symbol rate                              |\n| `connectbox_upstream_timeouts_total`                  | Upstream channel timeout occurrences                      |\n| `connectbox_scrape_duration_seconds`                  | Connect Box exporter scrape duration                      |\n| `connectbox_up`                                       | Connect Box exporter scrape success                       |\n\n## Grafana Dashboard\n\nThe above metrics can be monitored nicely in [Grafana](https://github.com/grafana/grafana) using [this dashboard](https://grafana.com/grafana/dashboards/12078/):\n\n![Grafana Dashboard](resources/docs/grafana_dashboard_screenshot.png)\n\n## Contributing / Development\nPull requests are welcome. 😊\n\nTo install development dependencies, run:\n\n`pip install -r resources/requirements/development.txt`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbugert%2Fconnectbox-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbugert%2Fconnectbox-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbugert%2Fconnectbox-prometheus/lists"}