Logstash过滤器用于标识地址匹配

问题描述 投票:0回答:1

我有一个带有客户地址的CSV文件。我还有一个带有我自己地址的Elasticsearch索引。我使用Logstash作为工具导入CSV文件。如果客户地址已经存在,我想使用logstash过滤器来检查我的索引。我发现的只是默认的elasticsearch过滤器(“将Elasticsearch中以前的日志事件中的字段复制到当前事件”),这看起来不正确,无法解决我的问题。我的问题是否存在其他过滤器?

到目前为止我的配置文件:

input {
  file {
    path => "C:/import/Logstash/customer.CSV"
    start_position => "beginning"
    sincedb_path => "NUL"
  }
}
filter {
  csv {
    columns => [
      "Customer",
      "City",
      "Address",
      "State",
      "Postal Code"
      ]
      separator => ";"
  }
}
output {
    elasticsearch {
      hosts => [ "localhost:9200" ]
      index => "customer-unmatched"
    }
    stdout{}
}
elasticsearch filter logstash-configuration
1个回答
0
投票

在处理Logstash事件时,您通常无法访问Elasticsearch中的数据。考虑在pipeline上使用Ingest node

© www.soinside.com 2019 - 2024. All rights reserved.