Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.6 KB

readme.md

File metadata and controls

53 lines (37 loc) · 1.6 KB

tplink_exporter Build Status License

Prometheus exporter for cheap TP-Link routers, like the TL-WR841N.

Inspired by this repository.

The tplink package created for this exporter can be used for another projects besides this one.

grafana_image

Usage

First compile it, of course. Then, you just need create a systemd service like this one:

[Unit]
Description=TP-Link Exporter
Wants=network-online.target
After=network-online.target

[Service]
User=tplink_exporter
Group=tplink_exporter
Type=simple
ExecStart=/usr/local/bin/tplink_exporter

[Install]
WantedBy=multi-user.target

Configure it and launch it:

sudo systemctl enable tplink_exporter
sudo systemctl start tplink_exporter

Command line flags

  • -a: Router's IP address
  • -w: Router's password
  • -u: Router's User
  • -p: Prometheus port

Metrics exposed

  • tplink_wan_rx_kbytes: Total kbytes received
  • tplink_wan_tx_kbytes: Total kbytes transmitted
  • tplink_lan_traffic_kbytes: KBytes sent/received per device
  • tplink_lan_traffic_packets: Packets sent/received per device
  • tplink_lan_leases_seconds: Lease time left per device

LAN metrics include IP and MAC addresses and device name as labels.