How to get started with SNMP data ? Doen't return anything

Hello there!
I have a TP-Link switch and I enabled SNMP v3 with password on it, but I have no idea how to get what’s called OID.
I’d like to get cpu, mem and bandwidth usage from it and maybe the ability to activate/deactivate ports on it (and maybe bandwidth per port?).
Or maybe I understood that wrong and it’s not possible?

Would that be possible? How I can I get the OID for those? I think the rest of the HA integration will be easy (I hope), I just have no idea how to get those freaking numbers XD
Thinks folks!

You need to access your MIB using a monitoring tool. Here’s a decent intro guide:

1 Like

Thanks! After reading that I investigated and was able to get data using snmpwalk on my computer!
Port status, cpu and mem. I now need to investigate how I can get port utilization like the tp-link interface does.

It seems that HA doesn’t retrieve the data. I have no error from docker nor from HA. Here is my config and below is the command I used to test OIDs on my computer.

- platform: snmp
  name: tplink_switch_memoryperc
  host: !secret tplink_switch_ip
  auth_protocol: 'hmac-sha'
  username: !secret tplink_switch_snmp_username
  auth_key: !secret tplink_switch_snmp_password
  version: '3'
  baseoid: 1.3.6.1.4.1.11863.6.4.1.2.1.1.2
  unit_of_measurement: '%'
  accept_errors: true
  scan_interval: 10

- platform: snmp
  name: tplink_switch_cpu5s
  host: !secret tplink_switch_ip
  auth_protocol: 'hmac-sha'
  username: !secret tplink_switch_snmp_username
  auth_key: !secret tplink_switch_snmp_password
  version: '3'
  baseoid: 1.3.6.1.4.1.11863.6.4.1.1.1.1.2
  unit_of_measurement: '%'
  accept_errors: true
  scan_interval: 10



- platform: snmp
  name: tplink_switch_portsstatus
  host: 192.168.0.2
  auth_protocol: 'hmac-sha'
  username: !secret tplink_switch_snmp_username
  auth_key: !secret tplink_switch_snmp_password
  version: '3'
  baseoid: 1.3.6.1.2.1.2.2.1.8
  accept_errors: true
  scan_interval: 300

  #!secret tplink_ap_ip

I tested using the command snmpwalk -v3 -a SHA -l authNoPriv -u MYUSERNAME -A MYPASSWORD SNMPIP 1.3.6.1.4.1.11863.6.4.1.1.1.1.2

So I’m not sure why I don’t get the cpu data and others.

Second question: I want to monitor 28 ports (mostly for fun). I want to see the status (plugged, unplugged, off), create a switch to control each port and be able to see the traffic from them and the uptime, etc. Is there an easy way or do I need to create 28 sensors + 28 switches and do 28 requests to my switch every x seconds? 1.3.6.1.2.1.2.2.1.8 returns the status of all ethernet ports so it would avoid querying the switch multiple times…

EDIT: After creating a test switch and turning it on, I get reports of the switches, but not the CPU/RAM. So there’s that. Gonna update here once I find why CPU/MEM is not working for my future self.

Wanted to try something similar with SNMP as well and was hoping you had found a solution? There are a lot of old server rack stuff that uses SNMP that would be great to automate