Skip to content
forked from psmode/essstat

TP-Link Easy Smart Switch port statistics

License

Notifications You must be signed in to change notification settings

Mr9To5/tpstatus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

essstat

TP-Link Easy Smart Switch port statistics

TP-Link Easy Smart Switches are a family of managed switches capable of supporting QoS, VLANs and Link Aggregation Groups (LAGs). They are managed through a web based interface, giving access a number of functions, including basic packets counters per-port. Unfortunately, these switches do not implement SNMP for access to these counters, nor do they appear to implement a discrete URL for direct access to this information. This utility addresses this issue to produce per-port statistics from a single command line invocation with output that can be trivially parsed for formatted output, or entered into a monitoring system like Zabbix.

This project has been tested against TP-Link switch models TL-SG1016DE and TL-SG108E. It should also be compatible with the other members of this family, including the TL-SG105E and TL-SG1024DE.


Technical Background


Major Components

essstat.py is a lightweight utility is used to pull port statistics from the switch and output in a readily parsable format. Additional code will be added to parse and either output or store these statistics.

essstat.py

This lightweight Python application performs a quick login through the switch's web based administrative interface, and then queries the unit for the current port statistics. Credentials for accessing the unit are passed on the command line. The utility was coded with Python  3.6 and uses the Beautiful Soup library.
Usage
essstat.py [-h] [-u TPuser] -p TPpswd [-d] TPhost
Options
positional arguments:
  TPhost                IP address or hostname of switch
optional arguments:
  -h, --help            show this help message and exit
  -u TPuser, --username TPuser
                        username for swtich access
  -p TPpswd, --password TPpswd
                        password for swtich access
  -d, --debug           activate debugging output

Zabbix Integration


Peter Smode
psmode [at] kitsnet.us

About

TP-Link Easy Smart Switch port statistics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 58.4%
  • Shell 41.6%