# Issue about logstash input snmptrap plugin

**URL:** https://discuss.elastic.co/t/issue-about-logstash-input-snmptrap-plugin/110870
**Category:** Logstash
**Created:** [December 8, 2017, 3:48pm UTC](https://discuss.elastic.co/t/issue-about-logstash-input-snmptrap-plugin/110870 "2017-12-08T15:48:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dangal](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dangal](https://discuss.elastic.co/u/dangal)
#### Post date: [December 8, 2017, 3:48pm UTC](https://discuss.elastic.co/t/issue-about-logstash-input-snmptrap-plugin/110870/1 "2017-12-08T15:48:18Z")

</div>

Hi All....

Here i have an issue with an option yamlmibdir in input snmptrap plugin

```auto
input {
snmptrap {
type => "snmptrap"
community => "public"
port => 162
yamlmibdir => "/opt/logstash-5.4.0/vendor/bundle/jruby/1.9/gems/snmp-1.2.0/data/ruby/snmp/mibs"
}
}
filter{
grok{
match => { "message" => ".*SNMPv1\_Trap\:(?<snmp_trap>.*?)\s{0,}\@.*source\_ip.*?=(?<source>.*?)\,.*@agent_addr=\#\<(?<agent_address>.*?)\>"}
}
}
output {
http {
       format => "json"
       http_method => "post"
        headers => ["X-My-Header", "Content-Type: application/json"]
        url => "xxxxxxxxxxxx"
    mapping => {"app_key" => "xxxxxxxxxxxx" "status" => "critical" "host" => "%{message}" }
   }
stdout { codec => rubydebug }
}

```

the above config file is to push snmp traps.  
but the problem is with yamlmibdir when i set that option in input i am unable to send traps to bigpanda  
if that option is disable it is working

i am getting the below error:

[logstash.inputs.snmptrap] It's a Trap! {:Port=\>162, :Community=\>["public"], :Host=\>"0.0.0.0"}  
[2017-12-08T20:56:41,450][WARN][logstash.inputs.snmptrap] SNMP Trap listener died {:exception=\>#\<SocketError: bind: name or service wn\>, :backtrace=\>["org/jruby/ext/socket/RubyUDPSocket.java:160:in `bind'", "/opt/logstash-5.4.0/vendor/bundle/jruby/1.9/gems/snmp-1.2.nmp/manager.rb:540:in`initialize'", "/opt/logstash-5.4.0/vendor/bundle/jruby/1.9/gems/snmp-1.2.0/lib/snmp/manager.rb:585:in `create_tt'", "/opt/logstash-5.4.0/vendor/bundle/jruby/1.9/gems/snmp-1.2.0/lib/snmp/manager.rb:618:in`initialize'", "/opt/logstash-5.4.0/vendoe/jruby/1.9/gems/logstash-input-snmptrap-3.0.2/lib/logstash/inputs/snmptrap.rb:74:in `build_trap_listener'", "/opt/logstash-5.4.0/vendle/jruby/1.9/gems/logstash-input-snmptrap-3.0.2/lib/logstash/inputs/snmptrap.rb:78:in`snmptrap\_listener'", "/opt/logstash-5.4.0/vendoe/jruby/1.9/gems/logstash-input-snmptrap-3.0.2/lib/logstash/inputs/snmptrap.rb:53:in `run'", "/opt/logstash-5.4.0/logstash-core/lib/lopipeline.rb:443:in`inputworker'", "/opt/logstash-5.4.0/logstash-core/lib/logstash/pipeline.rb:436:in `start\_input'"]}

please suggest to overcome the above error

Thank You.

---

<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: [January 5, 2018, 3:48pm UTC](https://discuss.elastic.co/t/issue-about-logstash-input-snmptrap-plugin/110870/2 "2018-01-05T15:48:27Z")

</div>

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