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}"
}
}
}
转载于:https://blog.51cto.com/linux10000/1941430