logstash-plugins / logstash-input-snmptrap

Apache License 2.0
12 stars 20 forks source link

Which SNMP versions are supported for snmptrap plugin? #18

Closed mattcrawfoord closed 8 years ago

mattcrawfoord commented 8 years ago

I’m trying logstash with snmptrap, The following log was generated .

{

" #< SNMP::SNMPv2_Trap:0xc6fb838 @request_id=19345, @error_index=0, @error_status=0, @source_ip=\"1.2.3.4\", @varbind_list=[#@name=[1.3.6.1.2.1.1.3.0], >@value=#@value=922846876>>, #@name=[1.3.6.1.6.3.1.1.4.1.0], @value=>[1.3.6.1.4.1.3607.2.20.0.2030]>, #@name=[1.3.6.1.4.1.3607.2.10.10.20.0], >@value=\"20160425202213S\">, #@name=[1.3.6.1.4.1.3607.2.10.30.20.1.80.1.2030], >@value=#@value=31>>, #@name=[1.3.6.1.4.1.3607.2.10.30.20.1.20.1.2030], >@value=#@value=10>>, #@name=[1.3.6.1.4.1.3607.2.10.30.20.1.60.1.2030], >@value=#@value=1>>, #@name=[1.3.6.1.4.1.3607.2.10.30.20.1.30.1.2030], >@value=#@value=0>>, #@name=[1.3.6.1.4.1.3607.2.10.30.20.1.40.1.2030], >@value=#@value=1>>, #@name=[1.3.6.1.4.1.3607.2.10.30.20.1.50.1.2030], >@value=#@value=0>>, #@name=[1.3.6.1.4.1.3607.2.10.30.20.1.100.1.2030], >@value=\"SYSTEM\">, #@name=[1.3.6.1.6.3.18.1.3.0], @value=#@value=\"\xC0\xA8\v\x0F\">>]>", "@version" => "1", "@timestamp" => "2016-04-25T12:22:08.982Z", "source_ip" => "1.2.3.4", }

my configuration ,

input { snmptrap { type => "snmp_trap" } } output { stdout { codec => rubydebug } }

why the @version is 1 ? is it only v1 supported ? snmptrap plugin does not talk about which versions of SNMP are supported?

ph commented 8 years ago

The current version of the supported snmp protocol is v1/v2.

@version is an internal field in our event class, its not related in any way with snmp.

ph commented 8 years ago

There is request in logstash-plugins/logstash-integration-snmp#49 to add support for v3, I think its a matter of find a library that support that version of the protocol.

ph commented 8 years ago

I am closing this issue fee free to reopen it if needed.