简体   繁体   English

logstash 可以将数据同时发送到多个位置以及弹性搜索

[英]can logstash send data simultaneusly to mulpile location along with elastic search

Normally, in ELK logstash parsed data and send to elastics search.通常,在 ELK logstash 中解析数据并发送到弹性搜索。

I want to know is it possible that logstash send same data to different location at real time.我想知道logstash是否有可能实时将相同的数据发送到不同的位置。

If it is possible, please let me know how to do it.如果可能,请告诉我如何做。

Create several output files that match type and send to different hosts.创建多个匹配类型并发送到不同主机的输出文件。

output {
  if [type] == "syslog" {
    elasticsearch {
          hosts => ["127.0.0.1:9200"]
          index => "logstash-%{+YYYY.MM.dd}"
          codec => "plain"
          workers => 1
          manage_template => true
          template_name => "logstash"
          template_overwrite => false
          flush_size => 100
          idle_flush_time => 1
    }
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM