logstash 处理tomcat日志

[root@dr-mysql01 tomcat]# cat logstash_tomcat.conf 
input {
        file {
                type => "zj_api"
                path => ["/data01/applog_backup/zjzc_log/zj-api*"]
        }
    
       file { 
                type => "wj_api" 
                path => ["/data01/applog_backup/winfae_log/wj-api*"] 
        } 

 
}

 filter {
    multiline {  
   pattern => "^\s+%{TIMESTAMP_ISO8601}"
  negate=>true  
  what=>"previous"  
 }  


    }

output {
     if [type] == "zj_api" { 
        redis {
                host => "192.168.32.67"
                data_type => "list"
                key => "zj_api:redis"
                port=>"6379"
                password => "1234567"
        }
}
      else if [type] == "wj_api"{
       redis { 
                host => "192.168.32.67" 
                data_type => "list" 
                key => "wj_api:redis" 
                port=>"6379" 
                password => "1234567" 
        } 
}
}

阅读更多
个人分类: Logstash
想对作者说点什么? 我来说一句

ELK安装及Tomcat日志收集

2016年09月08日 427KB 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭