0

I need to get active client connections from Cisco access points. I built this script in Python using the Pysnmp.hlapi engine and the OID '1.3.6.1.4.1.14179.2.2.2.1.15'. I need to convert this to Powershell, so I tried using Get-SNMPData from the Powershell SNMP module. However, the same OID returns a NoInstanceFound.

How are these different? What is special about the Python hlapi engine? How can I reproduce this in Powershell?

Greg Black
  • 47
  • 1
  • 5
  • `1.3.6.1.4.1.14179.2.2.2.1.15` is an invalid OID to use for GET operation as if you want to access the data in the column you also need to provide the indexes (this table has two indexes if you read the MIB documents). So, you should always use `1.3.6.1.4.1.14179.2.2.2.1.15.xxx.yyy`. You didn't reveal what's there in your Python script, but unless you perform a WALK operation there you won't get anything in response either. – Lex Li May 02 '23 at 02:10
  • Here's a link to an answer I gave a few months ago explaining how object indices work, it's confusing if you're not used to it: https://stackoverflow.com/a/75100658/6284025 Start reading around the third paragraph, which starts with "Finally..." – TallChuck May 03 '23 at 15:38
  • @LexLi I'm unsure how to continue. I'm not seeing any information on indexes within this documentation https://oidref.com/1.3.6.1.4.1.14179.2.2.2.1.15 – Greg Black May 10 '23 at 19:28
  • The hints I left are sufficient for anyone knows the basics of Python/SNMP/PowerShell, but clearly others need more guidance to learn more. A site like that won’t be able to teach everything, neither will here. If you can afford, hire an experienced consultant to guide you through. – Lex Li May 11 '23 at 07:46

0 Answers0