GithubHelp home page GithubHelp logo

germandrummer92 / snmpman Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 1and1/snmpman

0.0 2.0 0.0 181 KB

The SNMPMAN is a command-line application that simulates SNMP-capable devices. It may used e.g. to test traffic monitoring applications that execute SNMP queries. Due to to the lack in flexibility of already existing alternatives, it was developed by the 1&1 Internet AG to avoid those deficits. Therefore the SNMPMAN is highly extensible and will feature and will be enhanced in time.

Home Page: http://1and1.github.io/snmpman/

License: Apache License 2.0

Java 97.06% Shell 2.94%

snmpman's Introduction

Current build status: Travis CI Codacy Badge

SNMPMAN

The SNMPMAN is mainly a command-line application that simulates SNMP-capable devices and can also be started and stopped within Unit-Tests. It may used e.g. to test traffic monitoring applications that execute SNMP queries. Due to to the lack in flexibility of already existing alternatives, it was developed by the 1&1 Internet AG to avoid those deficits. Therefore the SNMPMAN is highly extensible and will feature and will be enhanced in time.

Multiple SNMP agents may be started at once and will run in parallel on different parts. These agents will return the data defined in a textual walk file. This file may be created by querying a real device. In addition, several device types may be defined and mapped by the agents. This device type configuration may contain policies on how to dynamically change the query responses. E.g. the response of an ifInOctets may be incremented with each query to simulate traffic. Several variable modifiers are already existing for different data types.

Also checkout the SNMPMAN GitHub IO page here!

Usage

You can include the SNMPMAN as a Maven dependency from Maven Central.

<dependency>
    <groupId>com.oneandone</groupId>
    <artifactId>snmpman</artifactId>
    <version>1.2.56</version>
</dependency>

In order to start and stop the simulation use this code snippet as an example:

/* 
 * creates a new instance of the SNMPMAN by the specified configuration file 
 * and executes all agents 
 */
Snmpman snmpman = Snmpman.start(new File("configuration.yaml"));
/* ... do something with the agents */

/* stop the SNMPMAN and all started agents */
snmpman.stop();

Installation

Prerequisites

  • Java JDK 1.8
  • Gradle 2.2

Packaging

In order to package the SNMPMAN - as either a .deb or .rpm - you have to execute following gradle tasks

  • buildDeb - We strongly advise not to use the debian package, due to bugs
  • buildRpm

You will find the generated output in ./build/distributions and can install the build packages.

Execution

To execute an instance of the SNMPMAN you have to start the execution script and specify a value for the -c or --configuration option that lists the path to the configuration YAML file that should be loaded in the execution context.

Configuration

The SNMPMAN is configured in two main YAML files ...

  • The agent configuration list all agents which should be started
  • The device type configuration defines the modifiers that should be applied to a range of OIDs

You can find some YAML example configuration files within the test resources of this project in the directory

../src/test/resources/configuration

The third component of the configuration are the walk files for the agents as specified in the agent configuration.

This is a basic overview and more information will be provided on the projects Wiki pages.

Contributing

To contribute, use the GitHub way - fork, hack, and submit a pull request!

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.