High level SNMP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeremy Sanders

    #1

    High level SNMP

    Hi -

    I'd like to write a program which basically does a few snmpgets. I haven't
    been able to find a python package which gives you a nice high-level and
    simple way of doing this (like PHP has). Everything appears to be
    extremely low level. All I need is SNMPv1.

    Does anyone know of a simple python package for doing this? I'd rather
    have something written in pure python, so that it is easily cross-platform.

    Jeremy

  • Petri Laakso

    #2
    Re: High level SNMP

    On Thu, 09 Dec 2004 11:15:27 +0000, Jeremy Sanders wrote:
    [color=blue]
    > Hi -
    >
    > I'd like to write a program which basically does a few snmpgets. I haven't
    > been able to find a python package which gives you a nice high-level and
    > simple way of doing this (like PHP has). Everything appears to be
    > extremely low level. All I need is SNMPv1.
    >
    > Does anyone know of a simple python package for doing this? I'd rather
    > have something written in pure python, so that it is easily cross-platform.
    >[/color]

    Hi, Jeremy

    have you tested twistedsnmp?


    Petri

    Comment

    • Jeremy Sanders

      #3
      Re: High level SNMP

      On Thu, 09 Dec 2004 15:34:14 +0200, Petri Laakso wrote:
      [color=blue][color=green]
      >> have you tested twistedsnmp?[/color]
      > http://twistedsnmp.sourceforge.net/[/color]

      I looked at it, but it needs Twisted compiled and installed, which is a
      pain.

      The old versions of PySNMP (version 2.XX), seem to be a lot simpler to
      use than later ones, so I might do that. That's if I can work out how to
      convert the random string it produces to a floating point number. Somehow
      it manages to gain 3 bytes over a float...

      Jeremy

      Comment

      • Keith Dart

        #4
        Re: High level SNMP

        Jeremy Sanders wrote:[color=blue]
        > Hi -
        >
        > I'd like to write a program which basically does a few snmpgets. I haven't
        > been able to find a python package which gives you a nice high-level and
        > simple way of doing this (like PHP has). Everything appears to be
        > extremely low level. All I need is SNMPv1.
        >
        > Does anyone know of a simple python package for doing this? I'd rather
        > have something written in pure python, so that it is easily cross-platform.
        >
        > Jeremy
        >[/color]

        The pyNMS package at sourceforge has a complete SNMP (v1, v2c)
        implementation. In pure Python, and fairly self contained. See

        http://sourceforge.net/projects/pynms

        There are few docs, sorry. If you want to use it and have any questions
        then please let me know (I wrote it).

        BTW, you can also read MIB files if you have libsmi installed. But the
        pyNMS package contains a utility called mib2py that converts MIB objects
        to Python, and the pyNMS package has most standard MIBS pre-compiled.
        So, you don't really need libsmi to use the standard MIBs.


        The name means Python Network Management System, and will become a
        complete network management system with GUI and scriptability soon. ;-)

        There is some support for creating XHTML reports, NMS web interface,
        SNMP get/set, SNMP trap receiver, Ping/ICMP module, process management,
        MIB browser, CLI construction kit, web protocols, easy email interface,
        and asyncio framework. Works well with Linux or FreeBSD.

        (PS. It can also answer your phone and take a message)



        --
        \/ \/
        (O O)
        -- --------------------oOOo~(_)~oOOo----------------------------------------
        Keith Dart <kdart@kdart.co m>
        vcard: <http://www.kdart.com/~kdart/kdart.vcf>
        public key: ID: F3D288E4 URL: <http://www.kdart.com/~kdart/public.key>
        =============== =============== =============== =============== =============== =

        Comment

        • Ilya Etingof

          #5
          Re: High level SNMP

          Jeremy Sanders <jeremy+plusnew s@jeremysanders .net> wrote:[color=blue]
          > On Thu, 09 Dec 2004 15:34:14 +0200, Petri Laakso wrote:[/color]

          [skipped]
          [color=blue]
          > The old versions of PySNMP (version 2.XX), seem to be a lot simpler to
          > use than later ones, so I might do that. That's if I can work out how to[/color]

          Recent versions tend to be more complex because they're following SNMPv3
          model, which is complex. However, a simplistic high-level layer is
          scheduled for implementation.
          [color=blue]
          > convert the random string it produces to a floating point number. Somehow
          > it manages to gain 3 bytes over a float...[/color]

          Basic SNMP types don't seem to include floating point numbers. Maybe you're
          decoding something defined by a TEXTUAL-CONVENTION at a MIB? The protocol
          (for packing floating point value into some native SNMP type) might be
          specified by the TC then.

          If you provide more details I'm willing to help.

          -ilya

          Comment

          Working...