1. 程式人生 > >logstash server 配置文件

logstash server 配置文件

logstash

input {  
        redis {  
                host => "10.10.45.200"  
                data_type => "list"  
                key => "elk_frontend_access:redis"  
                port =>"5379"  
        }  
}  
output { 
        if [type] == "www1_access"{
                elasticsearch {
                  hosts => "10.10.45.200:8201"
                  index => "logstash-www1-frontend-%{+YYYY.MM.dd}"
        }
        }
       if [type] == "flight1_access"{
                elasticsearch {
                hosts => "10.10.45.200:8201"
                index => "logstash-flight1-frontend-%{+YYYY.MM.dd}"
         }
        }
        if [type] == "www_access"{
                elasticsearch {
                hosts => "10.10.45.200:8201"
                index => "logstash-www-frontend-%{+YYYY.MM.dd}"
}
        }
        if [type] == "m_access"{
                elasticsearch {
                hosts => "10.10.45.200:8201"
                index => "logstash-m-frontend-%{+YYYY.MM.dd}"
         }
        }
        if [type] == "ro_access"{
                elasticsearch {
                hosts => "10.10.45.200:8201"
                index => "logstash-ro-frontend-%{+YYYY.MM.dd}"
         }
        }
}

logstash server 配置文件