GithubHelp home page GithubHelp logo

yahoo / panoptes_snmp Goto Github PK

View Code? Open in Web Editor NEW
4.0 12.0 10.0 11.52 MB

A Python wrapper for Net-SNMP, adapted from Easy SNMP to use with Panoptes

License: BSD 3-Clause "New" or "Revised" License

Python 0.57% Makefile 0.92% C 88.21% C++ 0.04% Shell 3.39% Perl 4.77% M4 1.10% Roff 0.48% OpenEdge ABL 0.04% XS 0.38% Batchfile 0.04% Raku 0.01% HTML 0.01% Mercury 0.04%

panoptes_snmp's Introduction

Build Status

Panoptes SNMP

A Python wrapper on Net-SNMP

Table of Contents

Introduction

This library, which is a fork of the excellent EasySNMP library, provides a Pythonic wrapper on top of Net-SNMP C library.

Background

The key differences from the upstream library are:

  • Includes Net-SNMP source code which is used to build shared objects during installation leading to self contained distributions
  • Locks down options for the Net-SNMP library: for example, SNMPv1 is and applications are disabled
  • No MIBs are include in the distribution - this is by design since using symbolic OIDs is slow
  • A Python based implementation of bulk_walk
  • Fix support for tunneled SNMP connections

Install

Install by running the following commands:

pip install yahoo_panoptes_snmp

Usage

The API is similar to that of EasySNMP, which is documented here

bulk_walk

The implementation of BULKWALK is based on doing BULKGETs and using 'falling out' of the OID tree to terminate.

The method signature is as follows:

def bulk_walk(self, oids, non_repeaters=0, max_repetitions=10):
    """
    Performs a series of bulk SNMP GET operation using the prepared session to
    retrieve multiple pieces of information in a single packet.

    :param oids: you may pass in a list of OIDs or single item; each item
                 may be a string representing the entire OID
                 (e.g. 'sysDescr.0') or may be a tuple containing the
                 name as its first item and index as its second
                 (e.g. ('sysDescr', 0))
    :param non_repeaters: the number of objects that are only expected to
                          return a single GETNEXT instance, not multiple
                          instances
    :param max_repetitions: the number of objects that should be returned
                            for all the repeating OIDs
    :return: a list of SNMPVariable objects containing the values that
             were retrieved via SNMP
    """

Contribute

We welcome issues, questions, and pull requests - please have a look at contributing to see how to do so.

Maintainers

License

This project is licensed under the terms of the BSD open source license. Please refer to LICENSE for the full terms.

Credits

Please refer to the CREDITS file for a full list of credits.

panoptes_snmp's People

Contributors

varunvarma avatar rexfury-of-oath avatar retlawrose avatar

Stargazers

 avatar Gábor Mihálcz avatar Dwight Hubbard avatar Theo Baschak avatar

Watchers

James Cloos avatar Brandon avatar Michael F. Martin avatar Derrick L. Sawyer avatar Yahoo CLA Bot avatar  avatar Mehrdad Arshad Rad avatar Peter Losher avatar Grant Irvin avatar  avatar  avatar ElAnanyPwn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.