snimpy

Interactive SNMP tool
Download

snimpy Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Vincent Bernat
  • Publisher web site:
  • https://trac.luffy.cx/

snimpy Tags


snimpy Description

Interactive SNMP tool snimpy is an interactive SNMP tool written in Python.snimpy is a Python-based tool providing a simple interface to build SNMP query. Here is a very simplistic example that allows to display the routing table of a given host:load("IP-FORWARD-MIB")m=M()routes = m.ipCidrRouteNextHopfor x in routes: net, netmask, tos, src = x print "s/%-15s via %-15s src %-15s" % (net, netmask, routes, src)You can either use snimpy interactively throught its console (derived from Python own console or from IPython if available) or write snimpy scripts which are just Python scripts with some global variables available.This is not a general-use SNMP module. You can find better ones: - pycopia - pynetsnmp, a ctype based implementation using Net-SNMP - PySNMP, a pure Python implementation - Net-SNMP own library Python - many othersThis is not really a replacement for snmpget, snmpwalk and snmpset. You cannot query arbitrary OID and you can only walk tables, not any node. Moreover, if remote host sends bogus value, snimpy will just stop with an exception (this is also a feature).At least, snimpy does not support SNMPv3 yet.Snimpy is aimed at being the more Pythonic possible. You should forget that you are doing SNMP requests. Snimpy will rely on MIB to hide SNMP details. Here are some "features" of snmimpy: - MIB parser based on libsmi - SNMP requests are handled by libnetsnmp - scalars are just attributes of your session object - columns are like a Python dictionary and made available as an attribute - getting an attribute is like issuing a GET method - setting an attribute is like issuing a SET method - iterating over a table is like using GETNEXT - when something goes wrong, you get an exception Requirements: · Python


snimpy Related Software