【问题标题】:logstash geoip filter returns _geoip_lookup_failurelogstash geoip 过滤器返回 _geoip_lookup_failure
【发布时间】:2017-07-25 14:48:55
【问题描述】:

我正在研究 logstash 。我已经成功安装了logstash-filter-geoip

但是当我尝试使用它时,它会返回 _geoip_lookup_failure 这是在我的 logstash.conf 文件中

filter{
    geoip {
    source => "clientip"
  }
}

这是我对 logstash 的输入

 55.3.244.1 GET /index.html 15824 0.043

它返回

{
    "duration" => "0.043",
    "request" => "/index.html",
    "@timestamp" => 2017-07-25T14:33:30.495Z,
    "method" => "GET",
    "bytes" => "15824",
    "@version" => "1",
    "host" => "DEs-0033",
    "client" => "55.3.244.1",
    "message" => "55.3.244.1 GET /index.html 15824 0.043",
    "tried to use this it returns _geoip_lookup_failuretags" => [
        [0] "_geoip_lookup_failure"
    ]
}

【问题讨论】:

  • 你确定你有一个字段clientip吗?我没有出现在您的示例中。

标签: elasticsearch logstash elastic-stack geoip


【解决方案1】:

尝试client 而不是clientip

filter{
    geoip {
    source => "client"
  }
}

【讨论】:

    【解决方案2】:

    clientip 字段在您的情况下不存在。您必须使用client 字段。

    另一方面,您可以查看IP2Location filter plugin tutorial,它提供了您正在做什么的示例。例如:

    filter {
      grok {
        match => { "message" => "%{COMBINEDAPACHELOG}"}
      }
      ip2location {
        source => "clientip"
      }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-28
      • 2015-12-13
      相关资源
      最近更新 更多