elasticsearch 在elasticsearch模板中创建geoip字段,elasticsearch,geolocation,logstash,elasticsearch,Geolocation,Logstash" /> elasticsearch 在elasticsearch模板中创建geoip字段,elasticsearch,geolocation,logstash,elasticsearch,Geolocation,Logstash" />

elasticsearch 在elasticsearch模板中创建geoip字段

elasticsearch 在elasticsearch模板中创建geoip字段,elasticsearch,geolocation,logstash,elasticsearch,Geolocation,Logstash,我正在使用logstash的geoip插件获取主机的地理信息 我正在使用 geoip { source => "dst" } 这似乎有效,但在我的elasticsearch文档中创建了以下两个字段 如何在geoip条目中连接这些 类似于复合json对象的内容如下: "geoip" : { "properties" : { "latitude" : { "type" : "half_float" },

我正在使用
logstash
geoip
插件获取主机的地理信息

我正在使用

          geoip {
            source => "dst"
          }
这似乎有效,但在我的
elasticsearch
文档中创建了以下两个字段

如何在
geoip
条目中连接这些

类似于复合json对象的内容如下:

"geoip"  : {
  "properties" : {
    "latitude" : { "type" : "half_float" },
    "longitude" : { "type" : "half_float" }
  }
}

您需要在索引模板中创建以下字段:

{
  "properties": {
     ...
     "geoip": {
       "type": "object",
       "properties": {
         "location": {
           "type": "geo_point"
         }
       }
     }
  }
}

您需要在索引模板中创建以下字段:

{
  "properties": {
     ...
     "geoip": {
       "type": "object",
       "properties": {
         "location": {
           "type": "geo_point"
         }
       }
     }
  }
}