mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- Open a named pipe (fifo) in jruby with 'r+' not 'a' (otherwise you get
"illegal seek" exceptions
This commit is contained in:
parent
cc211a29da
commit
4d676dc28f
1 changed files with 3 additions and 2 deletions
|
@ -63,8 +63,9 @@ class LogStash::Outputs::Nagios < LogStash::Outputs::Base
|
|||
|
||||
@logger.debug({"commandfile" => @commandfile, "nagios_command" => cmd})
|
||||
begin
|
||||
File.open(@commandfile, "a") do |f|
|
||||
f.puts cmd
|
||||
File.open(@commandfile, "r+") do |f|
|
||||
f.puts(cmd)
|
||||
f.flush
|
||||
end
|
||||
rescue
|
||||
@logger.warn(["Skipping nagios output; error writing to command file",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue