Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first beta snmp input iteration #1

Merged
merged 1 commit into from
Apr 27, 2018
Merged

first beta snmp input iteration #1

merged 1 commit into from
Apr 27, 2018

Conversation

colinsurprenant
Copy link
Contributor

@colinsurprenant colinsurprenant commented Apr 24, 2018

Initial snmp input plugin iteration. See issue #2 for this release objectives and strategy.

This PR lacks coverage for the plugin code itself lib/logstash/inputs/snmp.rb and for the client class lib/logstash/inputs/snmp/client.rb. These should be added before going GA on the V1.

To test locally on OSX you can enable the snmp service by following these instructions.

Once you have snmp working locally or have access to devices with snmp you can use a configuration like this:

input {
  snmp {
    get => ["1.3.6.1.2.1.1.1.0", "1.3.6.1.2.1.1.3.0", "1.3.6.1.2.1.1.5.0"]
    mib_paths => ["path/to/logstash-input-snmp/test/RFC1213-MIB.dic"]
    hosts => [{host => "udp:127.0.0.1/161" community => "public"}]
  }
  snmp {
    walk => ["1.3.6.1.2.1.1"]
    mib_paths => ["path/to/logstash-input-snmp/test/RFC1213-MIB.dic"]
    hosts => [{host => "udp:127.0.0.1/161" community => "public"}]
  }
}

output {
  stdout {
    codec => rubydebug
  }
  • There is a sample MIB .dic file in the test/ directory.
  • Instructions are provided in the plugin in-line documentation on how to generate a MIB .dic file from a normal ASN.1 MIB file.

Review Notes

  • This is a v1 beta release and is intended to start receiving feedback on the basic functionalities. It is not complete feature wise and still have many rough edges in the code
  • There are a few noted # TODO that will have to be looked at before GA
  • Error handling is incomplete and will have to be looked at before GA
  • Only SNMPv2c over UDP is currently supported. Support for SNMPv1 and TCP will have to be added before GA
  • SNMPv3 is planned shortly after initial GA
  • For beta testing the current naive poll loop is sufficient, we will decide if we want/need to upgrade to a worker thread model before GA

Copy link

@guyboertje guyboertje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as its beta. Will add an issue to add more debug logging before release.

@colinsurprenant
Copy link
Contributor Author

colinsurprenant commented Apr 27, 2018

Thanks @guyboertje 🎉
Rebasing and merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants