(上)—— ELK介紹及搭建 Elasticsearch 分佈式集羣html
http://blog.51cto.com/zero01/2079879json
(下)—— 搭建kibana和logstash服務器ruby
http://blog.51cto.com/zero01/2082794服務器
ELK 日誌相關elasticsearch
https://www.cnblogs.com/zhang-shijie/category/803469.html分佈式
logstash輸出到elasticsearch多索引spa
https://blog.csdn.net/wangyangzhizhou/article/details/53314022.net
elasticsearch索引自動清理debug
https://www.cnblogs.com/kasumi/p/6479733.html日誌
Logstash處理json格式日誌文件的三種方法
https://blog.csdn.net/jiao_fuyou/article/details/49174269/
LogStash的Filter的使用
https://www.cnblogs.com/qq27271609/p/4762562.html
elasticsearch: can not run elasticsearch as root
https://www.cnblogs.com/sandyyeh/p/8413724.html
啓動logstash 用-f
./logstash -f ../config/logstash-sample.conf
Logstash.conf 不要配置5044的端口
目前input只有tags上能帶到輸出裏,能夠作output條件判斷
filter能夠追加處理數據
Logstash.conf demo
input { file { path => "/var/log/system.log" tags => ["system"] #codec => json #start_position => "beginning" #從文件開始處讀寫 } file { path => "/var/log/kibana.log" tags => ["kibana"] codec => json #start_position => "beginning" #從文件開始處讀寫 } } filter { mutate{ add_field => { "tmp2" => "1" } } } output { if "kibana" in [tags] { elasticsearch { hosts => ["http://127.0.0.1:9200"] index => "kibana.log" } } if "system" in [tags] { elasticsearch { hosts => ["http://127.0.0.1:9200"] index => "system.log" } } #elasticsearch { # hosts => ["http://127.0.0.1:9200"] # index => [id] #} stdout { codec => rubydebug } }