Logstash SNMP input error

I am getting some error when running logstash config as below

input {

    snmp {

        get => [".1.3.6.1.2.1.5.1.0", ".1.3.6.1.2.1.5.2.0", ".1.3.6.1.2.1.5.3.0", ".1.3.6.1.2.1.5.4.0", ".1.3.6.1.2.1.5.5.0", ".1.3.6.1.2.1.5.6.0", ".1.3.6.1.2.1.5.7.0", ".1.3.6.1.2.1.5.8.0", ".1.3.6.1.2.1.5.9.0", ".1.3.6.1.2.1.5.10.0", ".1.3.6.1.2.1.5.11.0", ".1.3.6.1.2.1.5.12.0", ".1.3.6.1.2.1.5.13.0", ".1.3.6.1.2.1.5.14.0", ".1.3.6.1.2.1.5.15.0", ".1.3.6.1.2.1.5.16.0", ".1.3.6.1.2.1.5.17.0", ".1.3.6.1.2.1.5.18.0", ".1.3.6.1.2.1.5.19.0", ".1.3.6.1.2.1.5.20.0", ".1.3.6.1.2.1.5.21.0", ".1.3.6.1.2.1.5.22.0", ".1.3.6.1.2.1.5.23.0", ".1.3.6.1.2.1.5.24.0", ".1.3.6.1.2.1.5.25.0", ".1.3.6.1.2.1.5.26.0"]

        oid_path_length => 5

        interval => 600

        add_field => {

            "[event][module]" => "snmp"

            "[event][category]" => "icmp"

            "[Beat-Details][version]" => "1.0"

            "[Beat-Details][company]" => "mycompany"

            "IP_Address" => "%{[@metadata][host_address]}"

        }

        hosts => [

                      { host => "udp:10.60.19.50/161" community => "swmonitor"}

        ]

    }

    snmp {

        get => [".1.3.6.1.2.1.5.1.0", ".1.3.6.1.2.1.5.2.0", ".1.3.6.1.2.1.5.3.0", ".1.3.6.1.2.1.5.4.0", ".1.3.6.1.2.1.5.5.0", ".1.3.6.1.2.1.5.6.0", ".1.3.6.1.2.1.5.7.0", ".1.3.6.1.2.1.5.8.0", ".1.3.6.1.2.1.5.9.0", ".1.3.6.1.2.1.5.10.0", ".1.3.6.1.2.1.5.11.0", ".1.3.6.1.2.1.5.12.0", ".1.3.6.1.2.1.5.13.0", ".1.3.6.1.2.1.5.14.0", ".1.3.6.1.2.1.5.15.0", ".1.3.6.1.2.1.5.16.0", ".1.3.6.1.2.1.5.17.0", ".1.3.6.1.2.1.5.18.0", ".1.3.6.1.2.1.5.19.0", ".1.3.6.1.2.1.5.20.0", ".1.3.6.1.2.1.5.21.0", ".1.3.6.1.2.1.5.22.0", ".1.3.6.1.2.1.5.23.0", ".1.3.6.1.2.1.5.24.0", ".1.3.6.1.2.1.5.25.0", ".1.3.6.1.2.1.5.26.0"]

        oid_path_length => 5

        interval => 600

        add_field => {

            "[event][module]" => "snmp"

            "[event][category]" => "icmp"

            "[Beat-Details][version]" => "1.0"

            "[Beat-Details][company]" => "mycompany"

            "IP_Address" => "%{[@metadata][host_address]}"

        }

        hosts => [

                      { host => "udp:10.50.19.252/161" version => "3"}

        ]

        security_name => "username"

        auth_protocol => "sha"

        auth_pass => "authpassword"

        priv_protocol => "aes128"

        priv_pass => "privpassword"

        security_level => "authPriv"

    }

    snmp {

        get => [".1.3.6.1.2.1.5.1.0", ".1.3.6.1.2.1.5.2.0", ".1.3.6.1.2.1.5.3.0", ".1.3.6.1.2.1.5.4.0", ".1.3.6.1.2.1.5.5.0", ".1.3.6.1.2.1.5.6.0", ".1.3.6.1.2.1.5.7.0", ".1.3.6.1.2.1.5.8.0", ".1.3.6.1.2.1.5.9.0", ".1.3.6.1.2.1.5.10.0", ".1.3.6.1.2.1.5.11.0", ".1.3.6.1.2.1.5.12.0", ".1.3.6.1.2.1.5.13.0", ".1.3.6.1.2.1.5.14.0", ".1.3.6.1.2.1.5.15.0", ".1.3.6.1.2.1.5.16.0", ".1.3.6.1.2.1.5.17.0", ".1.3.6.1.2.1.5.18.0", ".1.3.6.1.2.1.5.19.0", ".1.3.6.1.2.1.5.20.0", ".1.3.6.1.2.1.5.21.0", ".1.3.6.1.2.1.5.22.0", ".1.3.6.1.2.1.5.23.0", ".1.3.6.1.2.1.5.24.0", ".1.3.6.1.2.1.5.25.0", ".1.3.6.1.2.1.5.26.0"]

        oid_path_length => 5

        interval => 600

        add_field => {

            "[event][module]" => "snmp"

            "[event][category]" => "icmp"

            "[Beat-Details][version]" => "1.0"

            "[Beat-Details][company]" => "mycompany"

            "IP_Address" => "%{[@metadata][host_address]}"

        }

        hosts => [

                      { host => "udp:10.50.19.224/161" version => "3"},

                      { host => "udp:10.70.19.1/161" version => "3"}

        ]

        security_name => "username"

        auth_protocol => "sha2"

        auth_pass => "authpassword"

        priv_protocol => "aes128"

        priv_pass => "privpassword"

        security_level => "authPriv"

    }

}

output {

    tcp {

        codec => json_lines

        host => '10.50.19.12'

        ssl_cert => 'C:/Smiforce-Snmp-Agent/certificate/beat.crt'

        ssl_key => 'C:/Smiforce-Snmp-Agent/certificate/beat.key'

        port => 9180

        ssl_cacert => 'C:/Smiforce-Snmp-Agent/certificate/ca.crt'

        ssl_enable => true

    }

}

i am getting error as below

[2022-02-23T12:35:35,972][INFO ][logstash.javapipeline    ] Pipeline Java execution initialization time {"seconds"=>1.14}

[2022-02-23T12:35:36,118][INFO ][logstash.inputs.snmp     ] using plugin provided MIB path C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/mibs/logstash

[2022-02-23T12:35:36,137][INFO ][logstash.inputs.snmp     ] using plugin provided MIB path C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/mibs/ietf

[2022-02-23T12:35:41,576][INFO ][logstash.inputs.snmp     ] using plugin provided MIB path C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/mibs/logstash

[2022-02-23T12:35:41,587][INFO ][logstash.inputs.snmp     ] using plugin provided MIB path C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/mibs/ietf

[2022-02-23T12:35:44,427][INFO ][logstash.inputs.snmp     ] using plugin provided MIB path C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/mibs/logstash

[2022-02-23T12:35:44,429][INFO ][logstash.inputs.snmp     ] using plugin provided MIB path C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/mibs/ietf

[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:in `const_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:in `initialize'", "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:in `each'", "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:in `register'", "C:/Smiforce-Snmp-Agent/logstash/logstash-core/lib/logstash/java_pipeline.rb:232:in `block in register_plugins'", "org/jruby/RubyArray.java:1821:in `each'", "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:in `start_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:in `run'", "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>"}

[2022-02-23T12:35:48,053][INFO ][logstash.javapipeline    ] Pipeline terminated {"pipeline.id"=>"snmp-get-V3-icmp"}

[2022-02-23T12:36:36,667][INFO ][logstash.javapipeline    ] Starting pipeline {:pipeline_id=>"snmp-get-V3-icmp", "pipeline.workers"=>2, "pipeline.batch.size"=>1000, "pipeline.batch.delay"=>500, "pipeline.max_inflight"=>2000, "pipeline.sources"=>["C:/Smiforce-Snmp-Agent/logstash/config/snmp-get-V3-icmp.conf"], :thread=>"#<Thread:0x32814952 run>"}

[2022-02-23T12:36:37,807][INFO ][logstash.javapipeline    ] Pipeline Java execution initialization time {"seconds"=>1.11}

[2022-02-23T12:36:37,912][INFO ][logstash.inputs.snmp     ] using plugin provided MIB path C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/mibs/logstash

[2022-02-23T12:36:37,988][INFO ][logstash.inputs.snmp     ] using plugin provided MIB path C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/mibs/ietf

[2022-02-23T12:36:45,382][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:in `const_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:in `initialize'", "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:in `each'", "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:in `register'", "C:/Smiforce-Snmp-Agent/logstash/logstash-core/lib/logstash/java_pipeline.rb:232:in `block in register_plugins'", "org/jruby/RubyArray.java:1821:in `each'", "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:in `start_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:in `run'", "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:0x32814952 run>"}

[2022-02-23T12:36:45,555][INFO ][logstash.javapipeline    ] Pipeline terminated {"pipeline.id"=>"snmp-get-V3-icmp"}

[2022-02-23T12:37:38,455][INFO ][logstash.javapipeline    ] Starting pipeline {:pipeline_id=>"snmp-get-V3-icmp", "pipeline.workers"=>2, "pipeline.batch.size"=>1000, "pipeline.batch.delay"=>500, "pipeline.max_inflight"=>2000, "pipeline.sources"=>["C:/Smiforce-Snmp-Agent/logstash/config/snmp-get-V3-icmp.conf"], :thread=>"#<Thread:0x430d4aa6@C:/Smiforce-Snmp-Agent/logstash/logstash-core/lib/logstash/java_pipeline.rb:129 run>"}

[2022-02-23T12:37:39,489][INFO ][logstash.javapipeline    ] Pipeline Java execution initialization time {"seconds"=>1.01}

[2022-02-23T12:37:39,579][INFO ][logstash.inputs.snmp     ] using plugin provided MIB path C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/mibs/logstash

[2022-02-23T12:37:39,692][INFO ][logstash.inputs.snmp     ] using plugin provided MIB path C:/Smiforce-Snmp-Agent/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-snmp-1.3.1/lib/mibs/ietf

Hai any solution?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.