logstash
官网
https://www.elastic.co/products/logstash
文档
https://www.elastic.co/guide/en/logstash/current/index.html
中文教程
https://doc.yonyoucloud.com/doc/logstash-best-practice-cn/index.html
https://www.cnblogs.com/kevingrace/p/5919021.html
教程
最佳实践
https://teddysun.com/357.html
centos7搭建ELK Cluster集群日志分析平台(一):Elasticsearch
http://www.cnblogs.com/ding2016/p/6879584.html
ELK实时日志分析平台环境部署--完整记录
https://www.cnblogs.com/kevingrace/p/5919021.html
启动
进入logstash目录
./bin/logstash -f ../config/xxx.config
例子
redis开启
配置logstash
取数据配置
input {
redis {
host => "127.0.0.1"
data_type => "list"
key => "log_test"
password => "123456"
port =>"6379"
}
}
output {
file {
path => ["/Users/xxx/Documents/final-%{+YYYY-MM-dd}.txt"]
codec => line { format => "%{message}"}
}
}
放数据配置
shipper1
input {
file {
path => ["/Users/xxx/Documents/1.txt"]
}
}
output {
redis {
host => "127.0.0.1"
data_type => "list"
key => "log_test"
password => "123456"
port =>"6379"
}
}
shipper2
input {
file {
path => ["/Users/luokaiwen/Documents/2.txt"]
}
}
output {
redis {
host => "127.0.0.1"
data_type => "list"
key => "log_test"
password => "123456"
port =>"6379"
}
}
格式化
http://www.run-debug.com/?p=633