【问题标题】:Mapping Visualisation with GeoIP in Kibana在 Kibana 中使用 GeoIP 进行映射可视化
【发布时间】:2017-01-28 18:25:21
【问题描述】:

我有一个使用 geoip 的管道

curl -XPUT "http://localhost:9200/_ingest/pipeline/geoip?pretty" -d'
     {
  "description" : "Add geoip info",
  "processors" : [
    {
      "geoip" : {
        "field" : "ip", 
        "ignore_failure": true
      }
    }
  ]
}'

我通过批量 API 将数据传递到 ELK 堆栈。尝试查看数据时,我没有设置地理点。弹性搜索已将此信息自动映射为两个字段中的数字。

client_geoip.location.lat       59.894
client_geoip.location.lon       30.264

我尝试将这两个字段创建为地理点,但由于 client_geoip.location.lat amd client_geoip.location.lon 不存在而导入时失败。

如何让 geoip 创建一个可以用于地图可视化的 geo_point?

【问题讨论】:

    标签: elasticsearch kibana elastic-stack geoip


    【解决方案1】:

    你只需要一个geo_point类型的字段,它包括lat和long。所以你的client_geoip.location应该是geo_point类型

    您可以根据需要配置此管道的目标键名称 像配置你的 geoip-

    "processors" : [
      {
      "geoip" : {
        "field" : "ip",
        "target_field" : "your_field",
        "database_file" : "GeoLite2-Country.mmdb.gz"
       }
     }
    ]
    

    你可以有一些类似的映射

            "location_field" : {
              "path_match" : "your_field.location",
              "mapping" : {
                "type" : "geo_point"
              }
            }
    

    它应该可以工作

    【讨论】:

      猜你喜欢
      • 2020-02-12
      • 1970-01-01
      • 1970-01-01
      • 2018-02-17
      • 1970-01-01
      • 2015-10-01
      • 1970-01-01
      • 2020-04-04
      • 2019-03-21
      相关资源
      最近更新 更多