Git Product home page Git Product logo

dentrax / xdsl-exporter Goto Github PK

View Code? Open in Web Editor NEW
45.0 3.0 2.0 177 KB

xDSL Prometheus Exporter

Home Page: https://grafana.com/blog/2023/03/17/how-to-monitor-an-xdsl-modem-using-a-prometheus-exporter-plugin-and-grafana-agent-on-grafana-cloud-with-grafana-oncall/?mdm=github

License: Apache License 2.0

Go 100.00%
go golang grafana grafana-dashboard metrics metrics-visualization modem prometheus prometheus-exporter prometheus-metrics

xdsl-exporter's Introduction

xDSL Exporter

A Prometheus Exporter for your xDSL Modem

ARTICLE: How to monitor an xDSL Modem using a Prometheus Exporter plugin and Grafana Agent on Grafana Cloud with Grafana OnCall

Overview

Overview

Prerequisites

  • Enable SSH or Telnet on your modem
  • Set idle Timeout set to 0 (infinite)

Installation

$ git clone [email protected]:Dentrax/xdsl-exporter.git
$ cd xdsl-exporter
$ go run . --target-client <VENDOR>
  • Please see the vendor list below for supported vendors.
  • Please read the Disclaimer section below before using this exporter.

Usage

Usage:
  xdsl-exporter [flags]

Flags:
  -h, --help                           help for xdsl-exporter
      --known-hosts-path string        Path to your known_hosts file. (default "~/.ssh/known_hosts")
      --listen-address string          Address on which to expose metrics and web interface. (default ":9090")
      --metrics-path string            Path under which to expose metrics. (default "/metrics")
      --target-client string           Broadcom (SSH),Broadcom (Telnet),DrayTek (Telnet),FRITZ!Box,Lantiq (SSH),Lantiq (Telnet),MediaTek (SSH),MediaTek (Telnet),Sagemcom,Speedport
      --target-host string             Hostname or IP address of the target xDSL Modem (default "192.168.1.1")
      --target-password string         Host password
      --target-port int                Port of the target xDSL Modem (default 22)
      --target-ssh-key-path string     Path to the SSH key to use for authentication
      --target-ssh-passphrase string   Passphrase to use for the SSH key
      --target-user string             Host user (default "admin")

Supported Vendors

  • Broadcom (SSH): broadcom_ssh
  • Broadcom (Telnet): broadcom_telnet
  • DrayTek (Telnet): draytek_telnet
  • FRITZ!Box: fritzbox
  • Lantiq (SSH): lantiq_ssh
  • Lantiq (Telnet): lantiq_telnet
  • MediaTek (SSH): mediatek_ssh
  • MediaTek (Telnet): mediatek_telnet
  • Sagemcom: sagemcom
  • Speedport: speedport

Known Issues

  • If SSH connection get closed by the target, the exporter will not reconnect automatically. You need to restart the exporter.
  • If modem is highly loaded (e.g. full bandwidth Steam downloads), the export process might take longer than the default scrape interval of 15 seconds. This will result in a timeout and the modem will not be scraped by Prometheus. You can increase both of the scrape interval and timeout to avoid this issue.

Special Thanks

Package Author License
go-dsl Jan Hoffmann Mozilla Public License 2.0
rtop RapidLoop MIT
  • Thanks to everyone who contributed these libraries and others that made this project possible.

Disclaimer

I accept no responsibility for any damage that may occur to your device during your installation, and such damages and exclusion of warranty is not by reason of my negligence. You are under this agreement. You use at your own risk.

License

cocert was created by Furkan 'Dentrax' Türkal

The base project code is licensed under Apache 2.0 unless otherwise specified. Please see the LICENSE file for more information.

Best Regards

xdsl-exporter's People

Contributors

dentrax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

xdsl-exporter's Issues

Target-client option seems to be ignored

hi there,

i am testing your cool project using a draytek device.
while using

--target-client draytek_telnet
also tried variants like
--target-client=draytek_telnet
--target-client "draytek_telnet"
--target-client="draytek_telnet"

the first and only output is "generate dsl config: read ssh key: open : no such file or directory"
there should not be a ssh key required to use telnet
also when using a random ssh key it trys to connect via port 22 which is ssh and not 23

go run . --target-client draytek_telnet --target-host 10.1.1.1 --target-password xxxx

shouldn't this work?

best regards and many thanks

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.