gpt4 book ai didi

elasticsearch - ELK-Kibana无法识别geo_point字段

转载 作者:行者123 更新时间:2023-12-02 23:30:44 26 4
gpt4 key购买 nike

我正在尝试在Kibana上创建带有GEO定位点的Tile map 。
由于某些原因,当我尝试创建 map 时,我在Kibana上收到以下消息:

No Compatible Fields: The "logs" index pattern does not contain any of the following field types: geo_point



我的设置:
Logstash(版本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 / _mapping返回:
{
"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):
我确实看到了所有数据,并且一切似乎都很好。
就在我转到“可视化”->“瓷砖 map ”->“来自新搜索”->“地理坐标”时,我得到以下错误消息:
 No Compatible Fields: The "logs" index pattern does not contain any of the following field types: geo_point

甚至我在Elasticsearch映射中也看到位置类型为geo_point。
我想念什么?

最佳答案

找到了问题!
我称索引为“logs”。将索引名称更改为“logstash-logs”(需要使用logstash- *前缀),一切都开始起作用!

关于elasticsearch - ELK-Kibana无法识别geo_point字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36747137/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com