logstach怎么往多个Elasticsearch传输数据

已邀请:

ValarMorghulis - ELK使用者

赞同来自:

在output配置里面加几个elasticsearch,或者用if进行判断,举个列子:
 
output {
if [Type] == "IndexType1" {
elasticsearch {
host => localhost
cluster => elasticsearch
index => "IndexType1-%{+YYYY.MM.dd}"
}
}
else {
elasticsearch {
host => localhost
cluster => elasticsearch }
}

要回复问题请先登录注册