Giter Site home page Giter Site logo

hitron-exporter's Introduction

hitron-exporter

Metrics exporter for Hitron CGNV4-FX2 routers, which are (used to be?) distributed as part of Unitymedia/Vodafone Business cable internet.

Running

docker run -it --rm -p 9101:80 ghcr.io/cfstras/hitron-exporter:latest --host --pass XYZ

docker-compose

hitron_exporter:
  image: ghcr.io/cfstras/hitron-exporter:latest
  command:
    - --pass=mySecretPassword
#   - --user=admin
#   - --host=http://192.168.0.1:80/
  ports:
    - 9101:80
  restart: unless-stopped

Example output

โžœ curl localhost/metrics
# HELP hitron_address Hardware and IP Addresses in labels
# TYPE hitron_address gauge
hitron_address{lan_ip="192.168.0.1/24",rf_mac="68:XX:YY:ZZ:AA:BB",wan_ip="1.2.3.4/21"} 1
# HELP hitron_cm_bpi_status DOCSIS Provisioning BPI Status
# TYPE hitron_cm_bpi_status gauge
hitron_cm_bpi_status{auth="authorized",tek="operational"} 1
# HELP hitron_cm_dhcp_lease_duration DOCSIS DHCP Lease duration
# TYPE hitron_cm_dhcp_lease_duration counter
hitron_cm_dhcp_lease_duration 259200
# HELP hitron_cm_dhcp_success DOCSIS Provisioning DHCP Status
# TYPE hitron_cm_dhcp_success gauge
hitron_cm_dhcp_success 1
# HELP hitron_cm_docsis_addr DOCSIS IP Addresses
# TYPE hitron_cm_docsis_addr gauge
hitron_cm_docsis_addr{gateway="10.40.XX.YY",ip="10.40.XX.YY",netmask="255.255.240.0"} 1
# HELP hitron_cm_download_config_success DOCSIS Provisioning Download CM Config File Status
# TYPE hitron_cm_download_config_success gauge
hitron_cm_download_config_success 1
# HELP hitron_cm_find_downstream_success DOCSIS Provisioning Lock Downstream Status
# TYPE hitron_cm_find_downstream_success gauge
hitron_cm_find_downstream_success 1
# HELP hitron_cm_hwinit_success DOCSIS Provisioning HWInit Status
# TYPE hitron_cm_hwinit_success gauge
hitron_cm_hwinit_success 1
# HELP hitron_cm_network_access_status DOCSIS Network Access Permission
# TYPE hitron_cm_network_access_status gauge
hitron_cm_network_access_status 1
# HELP hitron_cm_ranging_success DOCSIS Provisioning Ranging Status
# TYPE hitron_cm_ranging_success gauge
hitron_cm_ranging_success 1
# HELP hitron_cm_registration_success DOCSIS Provisioning Registration Status
# TYPE hitron_cm_registration_success gauge
hitron_cm_registration_success 1
# HELP hitron_info_uptime System uptime
# TYPE hitron_info_uptime counter
hitron_info_uptime 525245
# HELP hitron_lan_device LAN Device table
# TYPE hitron_lan_device gauge
hitron_lan_device{comnum="1",interface="Ethernet",ip="192.168.0.12",ip_type="static",ip_version="IPv4",mac="XX:YY:ZZ:AA:BB:CC"} 1
hitron_lan_device{comnum="1",interface="Ethernet",ip="192.168.0.2",ip_type="static",ip_version="IPv4",mac="XX:YY:ZZ:AA:BB:CC"} 1
hitron_lan_device{comnum="1",interface="Ethernet",ip="192.168.0.20",ip_type="dhcp",ip_version="IPv4",mac="XX:YY:ZZ:AA:BB:CC"} 1
hitron_lan_device{comnum="1",interface="Ethernet",ip="192.168.0.21",ip_type="dhcp",ip_version="IPv4",mac="XX:YY:ZZ:AA:BB:CC"} 1
hitron_lan_device{comnum="1",interface="Ethernet",ip="192.168.0.22",ip_type="dhcp",ip_version="IPv4",mac="XX:YY:ZZ:AA:BB:CC"} 1
hitron_lan_device{comnum="1",interface="Ethernet",ip="192.168.0.26",ip_type="dhcp",ip_version="IPv4",mac="XX:YY:ZZ:AA:BB:CC"} 0
# HELP hitron_login_success_bool 1 if the login was successful
# TYPE hitron_login_success_bool gauge
hitron_login_success_bool 1
# HELP hitron_scrape_time Time the scrape run took
# TYPE hitron_scrape_time gauge
hitron_scrape_time{component="CMDocsisWAN"} 0.281379708
hitron_scrape_time{component="CMInit"} 0.372671959
hitron_scrape_time{component="ConnectInfo"} 1.81596975
hitron_scrape_time{component="DownstreamInfo"} 0.24948125
hitron_scrape_time{component="Info"} 0.610619958
hitron_scrape_time{component="UpstreamInfo"} 0.127571375
hitron_scrape_time{component="all"} 4.880440167
hitron_scrape_time{component="login"} 0.898155542
# HELP hitron_traffic Basic traffic counters. if=wan/lan, dir=send/recv.
# TYPE hitron_traffic counter
hitron_traffic{dir="recv",if="lan"} 1.04112062464e+09
hitron_traffic{dir="recv",if="wan"} 9.5321849856e+08
hitron_traffic{dir="send",if="lan"} 1.83609851904e+09
hitron_traffic{dir="send",if="wan"} 6.4627933184e+08
# HELP hitron_version Versions in labels
# TYPE hitron_version gauge
hitron_version{hw_version="1A",serial="VCA123456",sw_version="4.1.2.3-SNIP"} 1

License

See LICENSE.md
Heavily inspired by and structure stolen from fluepke's vodafone-station-exporter.

hitron-exporter's People

Contributors

cfstras avatar dependabot[bot] avatar

Watchers

 avatar  avatar

Forkers

nadirj jameseck

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.