
cd /usr/local/tomcat/bin
sh startup.sh &
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
}
}/opt/logstash/bin/logstash -f /root/tomcat.conf




