"Discovering" a switch that does not support SNMP

I bought a TP-Link TL-SG105E, which is a “Easy Smart Managed” switch that supports a variety of “smart” features. One would assume it supports SNMP, right? Well, you’d be wrong, just like I was. However, this switch has a web user interface that takes basic username/password authentication and provides statistics including individual port traffic.

I’d like to write a script to scrape the web interface and provide its data to LibreNMS. I’ve considered writing a SNMP server, but that would necessarily show up as a separate device with a different IP address than the real host and would cause 2 devices to show up in LibreNMS for the one switch (one w/ stats, one w/ basic up/down information).

What options do I have for getting it into LibreNMS?

May be this helps:

at least this is not a ground zero

2 Likes

Long story short, there is no solution out of the box to have a complete integration like SNMP devices would provide.
You could write a custom discovery and poller code, that would collect data and feed the database/rrd, but it would be almost impossible to maintain for you (and would not be accepted in LibreNMS unless you almost rewrite all discovery and polling code in a ProtocolAgnostic version …)

1 Like

Maybe there is an API to call to provide the stats.

I think you could register the switch in LibreNMS by ICMP (Ping) and then link this resource in the form of services to obtain the statistics.
It’s not the most “beautiful” but it would surely work.

1 Like

I think what @aleferrari mentions is the best that can be done. I explored the API but there is no way to add custom ports or provide port data from the API. Due to that, the best that can be done is add it as ICMP-only.

I’m not going to develop any custom service at this time.

Well, I created a Nagios plugin for getting stats from this switch, contrary to my prior comment.

Check it out: GitHub - Clete2/check_tplink: Nagios plugin for TP Link "Easy Smart Switches" which do not have SNMP

I put a couple screenshots in the README.

I hope it helps someone else!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.