Coder Social home page Coder Social logo

iw_exporter's Introduction

Connected wireless station exporter for Prometheus.

Intended to run directly on wireless access points (for example WRT1200AC running OpenWRT)

This shells out to iw dev and iw dev <dev> station dump. It does not use netlink directly.

Install, run, view

go install github.com/jamessanford/iw_exporter@latest
iw_exporter
curl http://localhost:6798/metrics

Metrics exported

iw_collector_errors_total 0
iw_collector_requests_total 13737
iw_connected_seconds{interface="wlan0",station="ac:22:ff:ff:ff:03"} 554
iw_inactive_time_ms{interface="wlan0",station="ac:22:ff:ff:ff:03"} 3870
iw_is_associated{interface="wlan0",station="ac:22:ff:ff:ff:03"} 1
iw_is_authenticated{interface="wlan0",station="ac:22:ff:ff:ff:03"} 1
iw_is_authorized{interface="wlan0",station="ac:22:ff:ff:ff:03"} 1
iw_receive_bitrate_mbps{interface="wlan0",station="ac:22:ff:ff:ff:03"} 48
iw_receive_bytes_total{interface="wlan0",station="ac:22:ff:ff:ff:03"} 156412
iw_receive_packets_total{interface="wlan0",station="ac:22:ff:ff:ff:03"} 789
iw_signal_strength_avg_dbm{interface="wlan0",station="ac:22:ff:ff:ff:03"} -74
iw_signal_strength_dbm{interface="wlan0",station="ac:22:ff:ff:ff:03"} -74
iw_transmit_bitrate_mbps{interface="wlan0",station="ac:22:ff:ff:ff:03"} 135
iw_transmit_bytes_total{interface="wlan0",station="ac:22:ff:ff:ff:03"} 660556
iw_transmit_failures_total{interface="wlan0",station="ac:22:ff:ff:ff:03"} 0
iw_transmit_packets_total{interface="wlan0",station="ac:22:ff:ff:ff:03"} 727
iw_transmit_retries_total{interface="wlan0",station="ac:22:ff:ff:ff:03"} 0

iw_exporter's People

Contributors

jamessanford avatar

Watchers

 avatar  avatar

Forkers

jcumming

iw_exporter's Issues

inconsistencies with ms/seconds/mbit/mbps

Data is exported in the same units we get back from iw dev <dev> station dump

It's a little bit inconsistent, with units of milliseconds, seconds, and MBit/s.

iw/station.go:	// TODO: look for "ms", "seconds", "MBit", and do conversions.
iw/station_lines.go:	// TODO: could have a "expected second word", like {MBit/s,ms,seconds}

should export device metadata

Right now, only station data is exported. Information about the devices itself (wlan0, wlan1) should be exported as well. (channel #, width, txpower)

collector/collector.go:	// TODO: export device metadata (channel, txpower)

export total station count

It would be useful to have something like

iw_station_count_total 7

as an exported metric.

collector/collector.go:	// TODO: export total station count across all devices

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.