相关服务器安装jdk和redis请参考
http://blog.csdn.net/u013619834/article/details/38894649http://blog.csdn.net/u013619834/article/details/38899405
负责发送日志的所有服务器安装logstash
1.下载安装包wget https://download.elastic.co/logstash/logstash/logstash-2.4.1.tar.gz
2.安装
tar zxvf logstash-2.4.1.tar.gz
mv logstash-2.4.1 /usr/local/logstash
mkdir -p /usr/local/logstash/etc
3.修改配置文件
vim /usr/local/logstash/etc/logstash.cnf
添加
input {
file {
type => "tomcat-catalina"
path => "/u02/8080-tomcat/logs/catalina.out"
codec => multiline {
pattern => "^\s"
what => "previous"
}
}
}
output {
redis {
host => "172.17.17.15"
port => 6379
data_type => "li