Coder Social home page Coder Social logo

snmp's Introduction

SNMP Poller

This program periodically polls a set of SNMP agents for the values of certain OIDs. The responses are logged to a file or database.

Current limitations

The results are printed to standard output, and not logged to a database. The first database to be supported will be someting like SQLite.

There's a seeming bug where the first two requests are sent in quick succession, before the specified delay starts being used.

Only ASN.1 values of type string, integer, and null, are supported. Responses containing other values can't be parsed properly. General ASN.1 values should be supported.

The polling isn't especially efficient: no priority queues, and no batching of requests to the same host. Additionally, host name and port are used each time a request is sent, rather than a cached sockaddr object.

Command line

poller [options]

Options include:

-v            verbose mode
-p PORT       port to listen for replies on
-c FILENAME   config file to use

The list of hosts and OIDs to poll is read from the config file, which defaults to poller.conf. If this file cannot be read, the poller will act as if an empty file is specified.

The poller will reread the config file when it receives a SIGQUIT signal.

Configuration file

The configuration file is a plain text file, with fields separated by white space. Each line is of the form:

hostname[:port]    oid    frequency

Hostname is a host name or address; port is optional and defaults to 161. OID is an OID in numeric form. Frequency is a positive value and represents the delay in seconds between successive requests for that OID from that host.

Text after the # character is treated as a comment, and blank lines are ignored.

See sample.conf for an example configuration file.

snmp's People

Contributors

ejrh avatar

Watchers

 avatar  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.