# Error when trying to use snmp trap with Logstash

**URL:** https://discuss.elastic.co/t/error-when-trying-to-use-snmp-trap-with-logstash/210141
**Category:** Logstash
**Created:** [December 2, 2019, 9:08am UTC](https://discuss.elastic.co/t/error-when-trying-to-use-snmp-trap-with-logstash/210141 "2019-12-02T09:08:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![peterthief](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@peterthief](https://discuss.elastic.co/u/peterthief)
#### Post date: [December 2, 2019, 9:08am UTC](https://discuss.elastic.co/t/error-when-trying-to-use-snmp-trap-with-logstash/210141/1 "2019-12-02T09:08:55Z")

</div>

Hi all,  
I try to use this config below to start logstash:

```
input {
  snmp {
    hosts => [{host => "udp:192.27.18.351/5000" version => "3"}]
    security_name => "admin"
    auth_protocol => "sha2"
    auth_pass => "Local_1234"
    priv_protocol => "aes"
    priv_pass => "Localme_1234"
    security_level => "authPriv"
    get => ["1.3.6"]
  }
}

```

However it returns error when start:

```
[2019-12-02T00:20:06,379][ERROR][logstash.pipeline] Error registering plugin {:pipeline_id=>"main", :plugin=>"<LogStash::Inputs::Snmp auth_protocol=>\"sha2\"...
:error=>"uninitialized constant Java::OrgSnmp4jSecurity::AuthSHA2::ID"
Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}
[2019-12-02T00:20:07,320][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=>9600}
[2019-12-02T00:20:12,383][INFO][logstash.runner] Logstash shut down.

```

Anyone can help me on setup Logstash with snmp version 3?  
Actually, I have Huawei server(A) which was config to public data through snmp v3 to another server (B). I would like to use snmp trap with logstash on server B to collect data, however it seems no snmp v3 configuration for snmp trap plugin.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 30, 2019, 9:08am UTC](https://discuss.elastic.co/t/error-when-trying-to-use-snmp-trap-with-logstash/210141/2 "2019-12-30T09:08:58Z")

</div>

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