Closed usp-rol closed 6 years ago
jenkins tests are partially failing but it seems not to be caused by the change here (because even when reverting to master tests were failing)
hi @usp-rol many thanks for the PR. I'm a bit confused as to why this solves the issue. Looking at the code, the port value is only used once in the construction of the cmd to be executed.
Can you run logstash with --log.level=debug to show the exception's stack trace?
hey @jsvd
thank you very much for your feedback! sure, here you go:
[DEBUG] 2018-05-08 10:07:10.455 [Ruby-0-Thread-8@[main]>worker0: /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:385] nagiosnsca - Running send_nsca command {:nagios_nsca_command=>"/usr/local/bin/send_nsca.sh -H 127.0.0.1 -p 5667 -d : -c /etc/nagios/send_nsca.cfg", :message=>"host:service:1:message"} [WARN ] 2018-05-08 10:07:10.546 [Ruby-0-Thread-8@[main]>worker0: /usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:385] nagiosnsca - Skipping nagios_nsca output; error calling send_nsca {:error=>#<TypeError: no implicit conversion of Fixnum into String>, :nagios_nsca_command=>"/usr/local/bin/send_nsca.sh -H 127.0.0.1 -p 5667 -d : -c /etc/nagios/send_nsca.cfg", :message=>"host:service:1:message", :missed_event=>#<LogStash::Event:0x209a55ca>}
see attached log for full logs: logstash_nsca_debug.log
as written in !13 if you change to string (for an unknown reason) it works then.
@usp-rol I implemented a fix in a different way in https://github.com/logstash-plugins/logstash-output-nagios_nsca/pull/14, this way we keep the parameter as a number but still solve the exception
Fixed in #14, thanks for the patience @usp-rol
@jsvd Thank you for fixing it!
aim to fix issue #12