elasticsearch 麋鹿-基巴纳不';无法识别地理点域,elasticsearch,kibana,geoip,elastic-stack,logstash-configuration,elasticsearch,Kibana,Geoip,Elastic Stack,Logstash Configuration" /> elasticsearch 麋鹿-基巴纳不';无法识别地理点域,elasticsearch,kibana,geoip,elastic-stack,logstash-configuration,elasticsearch,Kibana,Geoip,Elastic Stack,Logstash Configuration" />

elasticsearch 麋鹿-基巴纳不';无法识别地理点域

elasticsearch 麋鹿-基巴纳不';无法识别地理点域,elasticsearch,kibana,geoip,elastic-stack,logstash-configuration,elasticsearch,Kibana,Geoip,Elastic Stack,Logstash Configuration,我正在尝试在Kibana上创建一个带有地理位置点的平铺地图。 出于某种原因,当我尝试创建地图时,我在Kibana上收到以下消息: 没有兼容的字段:“日志”索引模式不包含以下任何字段: 以下字段类型:geo_point 我的设置: 日志存储(版本2.3.1): filter { grok { match => { "message" => "MY PATTERN" } } geoip {

我正在尝试在Kibana上创建一个带有地理位置点的平铺地图。 出于某种原因,当我尝试创建地图时,我在Kibana上收到以下消息:

没有兼容的字段:“日志”索引模式不包含以下任何字段: 以下字段类型:geo_point

我的设置:
日志存储(版本2.3.1):

filter {
    grok {
        match => { 
            "message" => "MY PATTERN"
        }
    }

    geoip {
        source => "ip"
        target => "geoip"
        add_field => [ "location", "%{[geoip][latitude]}, %{[geoip][longitude]}" ] #added this extra field in case the nested field is the problem
    }
}
output {
    stdout { codec => rubydebug }
    elasticsearch { 
        hosts => ["localhost:9200"]
        index => "logs"
    }
}
当日志输入到达时,我可以看到它按应该的方式对其进行解析,并获得给定IP的geoIp数据:

"geoip" => {
           "ip" => "XXX.XXX.XXX.XXX",
           "country_code2" => "XX",
           "country_code3" => "XXX",
            "country_name" => "XXXXXX",
          "continent_code" => "XX",
             "region_name" => "XX",
               "city_name" => "XXXXX",
                "latitude" => XX.0667,
               "longitude" => XX.766699999999986,
                "timezone" => "XXXXXX",
        "real_region_name" => "XXXXXX",
                "location" => [
            [0] XX.766699999999986,
            [1] XX.0667
        ]
    },
    "location" => "XX.0667, XX.766699999999986"
ElasticSearch(版本2.3.1):
GET/logs/_映射返回:

{
   "logs": {
      "mappings": {
         "logs": {
            "properties": {
               "@timestamp": {
                  "type": "date",
                  "format": "strict_date_optional_time||epoch_millis"
               },
               .
               .
               .
               "geoip": {
                  "properties": {
                     .
                     .
                     .
                     "latitude": {
                        "type": "double"
                     },
                     "location": {
                        "type": "geo_point"
                     },
                     "longitude": {
                        "type": "double"
                     }
                  }
              },
              "location": {
                  "type": "geo_point"
               }
            }
         }
      }
   }
}
Kibana(4.5.0版):
我确实看到了所有的数据,一切似乎都很好。 就在我从一个新的搜索“->”地理坐标“转到“可视化”->“平铺地图”->”时,我收到以下错误消息:

 No Compatible Fields: The "logs" index pattern does not contain any of the following field types: geo_point
即使我在elasticsearch映射中看到位置类型是geo_point。 我遗漏了什么?

找到了问题!
我把索引称为“日志”。将索引名称更改为“logstash logs”(需要logstash-*前缀),一切都开始运行

这是一个快速解决方案,但如果索引名不同,则无法解决此问题。这是可能的,但你需要添加一个模板-我不完全确定的细节。有趣的。。。如果只从名为“logs”的索引中读取数据,我想知道为什么Kibana需要索引模式“logstash logs”来正确读取数据。似乎是个小故障或一些不明显的功能。