Merge pull request #950 from AKoetsier/master

Fixes exception when not specifying yamlmibdir
This commit is contained in:
Richard Pijnenburg 2014-02-25 09:24:06 +00:00
commit f43bda7f4a

View file

@ -62,7 +62,7 @@ class LogStash::Inputs::Snmptrap < LogStash::Inputs::Base
private private
def snmptrap_listener(output_queue) def snmptrap_listener(output_queue)
traplistener_opts = {:Port => @port, :Community => @community, :Host => @host} traplistener_opts = {:Port => @port, :Community => @community, :Host => @host}
if !@yaml_mibs.empty? if @yaml_mibs && !@yaml_mibs.empty?
traplistener_opts.merge!({:MibDir => @yamlmibdir, :MibModules => @yaml_mibs}) traplistener_opts.merge!({:MibDir => @yamlmibdir, :MibModules => @yaml_mibs})
end end
@logger.info("It's a Trap!", traplistener_opts.dup) @logger.info("It's a Trap!", traplistener_opts.dup)