Python SNMP simple example to get 1 OID

Because it took me forever to piece this simple code together

import netsnmp
session = netsnmp.Session( DestHost='', Version=2, Community='public' )
vars = netsnmp.VarList( netsnmp.Varbind('.') )
print( session.get(vars) )

One Reply to “Python SNMP simple example to get 1 OID”

Leave a Reply to Tarik Kaya Cancel reply

Your email address will not be published. Required fields are marked *