Code Monkey home page Code Monkey logo

prometheus-devolo-exporter's Introduction

Prometheus Devolo Exporter

A simple Devolo Magic 2 LAN G.hn adapter metrics exporter for Prometheus based on devolo-plc-api.

This exporter does not support the WiFi metrics for Devolo products as I do not own any; feel free to create a pull request if you want to add support for them.

This code is insipired by fsck-block/arris-tg3442de-exporter, as it was a good starting point for Python based exporter to integrate with devolo-plc-api.

Exported metrics

# HELP devolo_device_info_info General device information
# TYPE devolo_device_info_info gauge
devolo_device_info_info{attached_to_gateway="True",friendly_version="7.12.9.142_2023-05-02",full_version="magic-2-lan-triple 7.12.9.142_2023-05-02",hostname="devolo-hostname",ip_address="123.123.123.123",ipv4_address="123.123.123.123",mac_address="CAFEBABE2023",network_name="custom-network",product_id="MT3159",product_name="devolo Magic 2 LAN triple",technology="G.hn Spirit",topology="local"} 1.0
devolo_device_info_info{attached_to_gateway="False",friendly_version="7.12.9.142_2023-05-02",full_version="magic-2-lan 7.12.9.142_2023-05-02",hostname="devolo-hostname2",ip_address="123.123.123.124",ipv4_address="123.123.123.124",mac_address="CAFEBABE2022",network_name="custom-network",product_id="MT3007",product_name="devolo Magic 2 LAN 1-1",technology="G.hn Spirit",topology="remote"} 1.0
# HELP devolo_connected_devices_amount Number of connected devices
# TYPE devolo_connected_devices_amount gauge
devolo_connected_devices_amount{hostname="devolo-hostname",ip_address="123.123.123.123",network_name="custom-network"} 3.0
devolo_connected_devices_amount{hostname="devolo-hostname2",ip_address="123.123.123.124",network_name="custom-network"} 1.0
# HELP devolo_tx_rate_megabits Device tx rate
# TYPE devolo_tx_rate_megabits gauge
devolo_tx_rate_megabits{hostname="devolo-hostname",ip_address="123.123.123.123",network_name="custom-network",to="CAFEBABE2022"} 796.0
devolo_tx_rate_megabits{hostname="devolo-hostname2",ip_address="123.123.123.124",network_name="custom-network",to="CAFEBABE2023"} 1249.0
# HELP devolo_rx_rate_megabits Device rx rate
# TYPE devolo_rx_rate_megabits gauge
devolo_rx_rate_megabits{hostname="devolo-hostname",ip_address="123.123.123.123",network_name="custom-network",to="CAFEBABE2022"} 837.0
devolo_rx_rate_megabits{hostname="devolo-hostname2",ip_address="123.123.123.124",network_name="custom-network",to="CAFEBABE2023"} 1249.0

Usage

The password is the one you have set for the Devolo device.

Usage:
  python3 run.py config.yml [OPTIONS]

Application Options:
  -d, --debug Show debug messages (default: false)

Docker Compose

---
version: '3.7'
services:
  devolo-exporter:
    image: tssge/prometheus-devolo-exporter:latest
    container_name: DevoloExporter
    volumes:
      - ./config.yml:/app/config.yml
    ports:
      - 5642:5642

Manual run

python3 -m venv venv
venv/bin/pip3 install -r requirements.txt
venv/bin/python3 run.py config.yml

Grafana dashboard

There is a Grafana dashboard available at https://grafana.com/grafana/dashboards/19847-ethernet-over-powerline/.

Dashboard features

  • Basic information of each device
  • PHY datarates between each adapter in the network
  • Amount of devices connected to each adapter and total
  • Ability to view multiple adapter's statistics simultaneously

Example metrics in Grafana

prometheus-devolo-exporter's People

Contributors

tssge avatar

Watchers

 avatar

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.