要不要也来分享分享一下啊

Logstash接受Snmpstrap报错

Logstash | 作者 qwefdrt | 发布于2018年07月02日 | 阅读数:4689

Logstash部分配置如下:
input{
    snmptrap{
        host => "192.20.1.34"  #收集snmp信息的主机IP
        port => 161
        type => "snmp"
        community => "xxx"
        }
}
 
报错如下:
[2018-07-02T10:08:14,412][WARN ][logstash.inputs.snmptrap ] SNMP Trap listener died {:exception=>#<Errno::EADDRNOTAVAIL: Cannot assign requested address - bind - Cannot assign requested address>, :backtrace=>["org/jruby/ext/socket/RubyUDPSocket.java:190:in `bind'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/snmp-1.2.0/lib/snmp/manager.rb:540:in `initialize'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/snmp-1.2.0/lib/snmp/manager.rb:586:in `create_transport'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/snmp-1.2.0/lib/snmp/manager.rb:618:in `initialize'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-snmptrap-3.0.5/lib/logstash/inputs/snmptrap.rb:75:in `build_trap_listener'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-snmptrap-3.0.5/lib/logstash/inputs/snmptrap.rb:79:in `snmptrap_listener'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-snmptrap-3.0.5/lib/logstash/inputs/snmptrap.rb:54:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:524:in `inputworker'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:517:in `block in start_input'"]}
已邀请:

medcl - 今晚打老虎。

赞同来自: qwefdrt

配置里面的 ip 和端口是在 Logstash 所在服务器的内网 IP 和闲置端口,而 snmp 的数据是发送到这台Logstash 服务器上的这个端口的。

要回复问题请先登录注册