logstash-plugins / logstash-integration-snmp

Logstash Integration Plugin for SNMP, including SNMP input and SNMP Trap Plugins
Apache License 2.0
0 stars 3 forks source link

SNMP v3 auth_protocol SHA2 Error #36

Closed Demantel2016 closed 4 months ago

Demantel2016 commented 2 years ago

Hey I am getting error when doing sha2 auth_protocol on SNMP input as below

configuration as shown in the link

https://discuss.elastic.co/t/logstash-snmp-input-error/298106

[2022-02-23T12:35:48,003][ERROR][logstash.javapipeline ] Pipeline error {:pipeline_id=>"snmp-get-V3-icmp", :exception=>#<NameError: uninitialized constant Java::OrgSnmp4jSecurity::AuthSHA2::ID>, :backtrace=>["org/jruby/RubyModule.java:3766:inconst_missing'", "C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/logstash/inputs/snmp/clientv3.rb:124:in parse_auth_protocol'", "C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/logstash/inputs/snmp/clientv3.rb:43:ininitialize'", "C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/logstash/inputs/snmp.rb:185:in block in register'", "org/jruby/RubyArray.java:1821:ineach'", "C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/logstash/inputs/snmp.rb:153:in register'", "C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-mixin-ecs_compatibility_support-1.3.0-java/lib/logstash/plugin_mixins/ecs_compatibility_support/target_check.rb:48:inregister'", "C:/Smiforce-Snmp-Agent/logstash/logstash-core/lib/logstash/java_pipeline.rb:232:in block in register_plugins'", "org/jruby/RubyArray.java:1821:ineach'", "C:/Smiforce-Snmp-Agent/logstash/logstash-core/lib/logstash/java_pipeline.rb:231:in register_plugins'", "C:/Smiforce-Snmp-Agent/logstash/logstash-core/lib/logstash/java_pipeline.rb:390:instart_inputs'", "C:/Smiforce-Snmp-Agent/logstash/logstash-core/lib/logstash/java_pipeline.rb:315:in start_workers'", "C:/Smiforce-Snmp-Agent/logstash/logstash-core/lib/logstash/java_pipeline.rb:189:inrun'", "C:/Smiforce-Snmp-Agent/logstash/logstash-core/lib/logstash/java_pipeline.rb:141:in block in start'"], "pipeline.sources"=>["C:/Smiforce-Snmp-Agent/logstash/config/snmp-get-V3-icmp.conf"], :thread=>"#<Thread:0x2d6a57a2@C:/Smiforce-Snmp-Agent/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:54 run>"}

edmocosta commented 4 months ago

Thanks for reporting!

We've moved this issue into this new SNMP integration plugin, which combines the logstash-input-snmp and logstash-input-snmptrap plugins into one.

There's a bug with the sha2 auth_protocol on the individual logstash-input-snmp plugin. It's fixed already on this integration plugin, so my suggestion is to upgrate to this one (migration guide).

Please feel free to re-open this issue if the problem still persists. Thanks!