简体   繁体   English

EFK 缺少 geo_point

[英]EFK missing geo_point

I am running EFK using ECK 8.5.3.我正在使用 ECK 8.5.3 运行 EFK。 fluentd ConfigMap :流利的ConfigMap

      @type geoip
      # Specify one or more geoip lookup field which has ip address (default: host)
      geoip_lookup_keys IP

      # Specify optional geoip database (using bundled GeoLiteCity databse by default)
      # geoip_database    "/path/to/your/GeoIPCity.dat"
      # Specify optional geoip2 database
      # geoip2_database   "/path/to/your/GeoLite2-City.mmdb" (using bundled GeoLite2-City.mmdb by default)
      # Specify backend library (geoip2_c, geoip, geoip2_compat)
      backend_library geoip2_c

      # Set adding field with placeholder (more than one settings are required.)
     <record>
        city            ${city.names.en["IP"]}
        latitude        ${location.latitude["IP"]}
        longitude       ${location.longitude["IP"]}
        country_code    ${country.iso_code["IP"]}
        country_name    ${country.names.en["IP"]}
        postal_code     ${postal.code["IP"]}
        location_properties '{ "lat" : ${location.latitude["IP"]}, "lon" : ${location.longitude["IP"]} }'
        location_string     ${location.latitude["IP"]},${location.longitude["IP"]}
        location_array      '[${location.longitude["IP"]},${location.latitude["IP"]}]'
      </record>      

ES template: ES模板:

      "mappings": {
          "properties": {
              "location_properties": { "type": "geo_point" },
              "location_string": { "type": "geo_point" },
              "location_array": { "type": "geo_point" }
          }
      }

I don't see any of the properties in Kibana ECK 8.5.3 at all.我根本看不到 Kibana ECK 8.5.3 中的任何属性。 What do I miss?我想念什么?

The issue can be fixed by using JSON format string.可以使用 JSON 格式字符串修复此问题。

As mentioned in the document :文档中所述:

As with geo_shape and point, geo_point can be specified in GeoJSON and Well-Known Text formats.与 geo_shape 和 point 一样,geo_point 可以用 GeoJSON 和 Well-Known Text 格式指定。 However, there are a number of additional formats that are supported for convenience and historical reasons.但是,出于方便和历史原因,还支持许多其他格式。 In total there are six ways that a geopoint may be specified.总共有六种方法可以指定一个地理点。

You can also refer to this stack post for more information.您还可以参考此堆栈帖子以获取更多信息。

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

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