Giter VIP home page Giter VIP logo

fluent-plugin-snmptrap's Introduction

Fluent::Plugin::SnmpTrap

fluent-plugin-snmptrap is an input plug-in for Fluentd

Status

Gem Version Build Status Coverage Status

Installation

These instructions assume you already have fluentd installed. If you don't, please run through [quick start for fluentd] (https://github.com/fluent/fluentd#quick-start)

Now after you have fluentd installed you can follow either of the steps below:

Add this line to your application's Gemfile:

gem 'fluent-plugin-snmptrap'

Or install it yourself as:

$ gem install fluent-plugin-snmptrap

Usage

Add the following into your fluentd config.

<source>
  type snmptrap       # required, chossing the input plugin.
  host 127.0.0.1      # optional, interface to listen on, default 0 for all.
  port 162            # optional, port to listen for traps, default is 1062
                      # ports under 1024 range will require sudo to start fluentd
  tag alert.snmptrap  # optional, tag to assign to events, default is alert.snmptrap 
</source>

<match alert.snmptrap>
  type stdout
</match>

Now startup fluentd

$ sudo fluentd -c fluent.conf &

Send a test trap using net-snmp tools

& sudo snmptrap -v 1 -c public localhost:1062 1.3.6.1.4.1.10300.1.1.1.12 localhost 3 0 ''  

To Do

Things left to do, not in any particular order.

  • wrap snmp-trap listener and have it restart on failure.
  • add support for loading MIBs
  • explode the var binds
  • snmp-trap output plug-in that exposes common fields and lets them be overwritten before forwarding.

fluent-plugin-snmptrap's People

Contributors

bigel0w avatar repeatedly avatar shingo78 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fluent-plugin-snmptrap's Issues

error with using fluent-plugin-snmptrap, with the latest version of fluentd (fluentd 0.14.8)

I get the following error message while using snmptrap input plugin (fluent-plugin-snmptrap) with the latest version of fluentd (fluentd 0.14.8), the fix for this adding require 'fluent/input' in the "in_snmptrap.rb", but Its better if we get a update with the gem !!!

2016-11-04 12:09:34 +0530 [info]: adding source type="snmptrap"
2016-11-04 12:09:34 +0530 [error]: unexpected error error="uninitialized constant Fluent::Input"
2016-11-04 12:09:34 +0530 [error]: /var/lib/gems/2.2.0/gems/fluent-plugin-snmptrap-0.0.1/lib/fluent/plugin/in_snmptrap.rb:2:in <module:Fluent>' 2016-11-04 12:09:34 +0530 [error]: /var/lib/gems/2.2.0/gems/fluent-plugin-snmptrap-0.0.1/lib/fluent/plugin/in_snmptrap.rb:1:in <top (required)>'
2016-11-04 12:09:34 +0530 [error]: /usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' 2016-11-04 12:09:34 +0530 [error]: /usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require'

explode the var binds

Currently var binds all get sucked into the big value object create by trap.inspect, we should split these out to be able to use them in resending the events later on.

new ruby gem release

Please release the latest master version as a gem.
I hope to install simply in a Dockerfile with gem command.

multiple port config support

If we configure snmptraps on multiple ports using this plugin to get traps from different devices on separate ports then the plugin ignores all the configs after the first one and only opens single port.

snmp-trap output plug-in

  1. create snmp-trap output plug-in

  2. It should exposes common fields and lets them be overwritten before forwarding.

  3. Should also support input snmptrap -> output snmptrap to diff listener which very overhead and 0 loss of trap information.

add support for loading MIBs

Need to add support for loading MIBs.

Not too well versed in what that entails yet but will probably need to figure this out before integrating with other tools.

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.