解決logstash1.4.2在windows上文件源讀會對文件進行鎖定的問題

解決logstash1.4.2在windows上文件源讀會對文件進行鎖定的問題
從github上下載useJavatoOpenFile    https://github.com/edwinf/ruby-filewatch/tree/useJavatoOpenFile
wget https://github.com/jordansissel/ruby-filewatch/archive/master.zip
以上二選一
1.找到JRubyFileExtension.jar 並把他複製到1.4.2 LOGSTASH_HOME/vendor/bundle/jruby/2.1/gems/filewatch-0.5.1/lib同級目錄下
2.將filewatch 文件夾完全複製到1.4.2 LOGSTASH_HOME/vendor/bundle/jruby/2.1/gems/filewatch-0.5.1/lib,2.1爲版本號,爲了穩定,如有多個版本,都給他複製了.讀取jar文件是在tail.rb的第10行
這時應該沒問題了.

3.如果有問題可以嘗試設置 set CloseAfterRead=true





reference:http://stackoverflow.com/questions/20592142/logstash-elasticsearch-reloads-the-same-data/28523646#28523646

reference2:http://blog.csdn.net/xiaohelong2005/article/details/43833939

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章