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'"]}
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'"]}
1 个回复
medcl - 今晚打老虎。
赞同来自: qwefdrt