如何通过snmptrap配置logstash监听?

时间:2014-12-16 16:57:50

标签: logstash

我是lostash和elastichsearch的新用户。我想通过snmptrap收集网络设备的日志。我有一个logstash的问题。请帮帮我!!!

+ logstash.log

  

{:timestamp =>“2014-12-12T16:17:28.744000 + 0700”,:message =>“SNMP陷阱监听器已死亡”,:exception =>#,:backtrace => [“org /jruby/ext/socket/RubyUDPSocket.java:160:in bind'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/snmp-1.1.1/lib/snmp/manager.rb:527:in初始化' “” /opt/logstash/vendor/bundle/jruby/1.9/gems/snmp-1.1.1/lib/snmp/manager .rb:572:在create_transport'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/snmp-1.1.1/lib/snmp/manager.rb:605:in initialize'“,”/ opt / logstash / lib / logstash / inputs / snmptrap.rb:69:in snmptrap_listener'", "/opt/logstash/lib/logstash/inputs/snmptrap.rb:54:in run'“,”/ opt / logstash / lib /logstash/pipeline.rb:163:in inputworker'", "/opt/logstash/lib/logstash/pipeline.rb:157:in start_input'“],:level =>:warn}

  • logstash.conf
  

输入{       snmptrap {       type => “SNMPTRAP”       port => 162       host => “0.0.0.0”       社区=> “测试”       }       }      输出{       elasticsearch {       host => “10.100.28.29”       }       }

p / s:对不起英语不好。

1 个答案:

答案 0 :(得分:2)

在Unix系统上,非root进程通常无法绑定到1024以下的端口。您有几个选项:

补充阅读:https://unix.stackexchange.com/questions/16564/why-are-the-first-1024-ports-restricted-to-the-root-user-only