Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

github.com/tetafro/connectbox-exporter

Package Overview
Dependencies
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/tetafro/connectbox-exporter

Source
Go Modules
Version
v0.2.2
Version published
Created
Source

ConnectBox Exporter

License Github CI Go Report Codecov

A Prometheus exporter for ConnectBox routers used by Ziggo internet provider in the Netherlands.

Client with full API: connectbox.

Mostly copied from compal_CH7465LG_py and connectbox-prometheus.

Run

Use docker

Create a config file config.yml (example).

docker run -d \
    --volume /host-dir/config.yml:/etc/prometheus/connectbox-exporter.yml \
    --publish 9119:9119 \
    --name connectbox-exporter \
    ghcr.io/tetafro/connectbox-exporter:latest

Download binary

Download and unpack latest release.

Create a config file config.yml (example).

Run

./connectbox-exporter -config config.yml

Build from sources

Clone the repository

git clone git@github.com:tetafro/connectbox-exporter.git
cd connectbox-exporter

Copy and populate config

cp config.example.yml config.yml

Build and run

make build run

Get metrics

Get exporter internal metrics

curl 'http://localhost:9119/metrics'

Get ConnectBox metrics

curl 'http://localhost:9119/probe?target=192.168.178.1'

Metrics

NameTypeDescription
connect_box_cm_docsis_modegaugeDocSis mode
connect_box_cm_hardware_versiongaugeHardware version
connect_box_cm_mac_addrgaugeMAC address
connect_box_cm_network_accessgaugeNetwork access
connect_box_cm_serial_numbergaugeSerial number
connect_box_cm_system_uptimegaugeSystem uptime
connect_box_lan_clientgaugeLAN client
connect_box_oper_stategaugeOperational state
connect_box_temperaturegaugeTemperature
connect_box_tunner_temperaturegaugeTunner temperature
connect_box_wan_ipv4_addrgaugeWAN IPv4 address
connect_box_wan_ipv6_addrgaugeWAN IPv6 address

Prometheus config

Prometheus config with relabling to set the address of Connectbox instead of the address of the Prometheus instance on collected metrics

scrape_configs:
  - job_name: connectbox
    metrics_path: /probe
    static_configs:
      - targets: [connectbox.domain] # connectbox host or ip
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: "prometheus.domain:9119" # prometheus host or ip

FAQs

Package last updated on 23 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts