安装tomcat服务
上传war包项目到webapps目录

.启动tomcat
cd /usr/local/tomcat/bin
sh startup.sh &
配置
1.添加logstash添加解析文件 tomcat.conf
vim /root/tomcat.conf
input {
file {
path => "/usr/local/tomcat/logs/catalina.out"
start_position => "beginning"
}
}
filter {
date {
match => ["timestamp" , "YYYY-MM-dd HH:mm:ss"]
}
}
output {
elasticsearch {
hosts => ["192.168.0.102:9200"]
}
stdout {
codec => rubydebug
}
}
2.写入logstash
/opt/logstash/bin/logstash -f /root/tomcat.conf
3.点击网站页面,产生日志



四、查看Kibana

