当前位置:网站首页>Solution to the problem that kibana's map cannot render longitude and latitude coordinate data
Solution to the problem that kibana's map cannot render longitude and latitude coordinate data
2022-06-24 16:46:00 【An empty box】
Recently, some customers have reported that kibana Of Maps The function cannot display longitude and latitude coordinate data .
Investigation thought :
Index based on customer configuration , stay Maps To configure the map , After configuring the view , An error is reported when an exception is found
Exception error display get geo_point The type field “geoip_location” Field . The preliminary inference is that the field types do not match, so the map cannot be rendered according to the declaration as geo_point The type field is used to render the longitude and latitude coordinates .
Check the customer side index field configuration :
In the template, the customer side is configured with the corresponding location The field is declared as geo_point type ( This is the right step )
In the specific field, the customer is responsible for location The field has been specified again
Specify both longitude and latitude as float type .
Citing official documents for the explanation of longitude and latitude coordinates :
https://www.elastic.co/guide/cn/elasticsearch/guide/current/lat-lon-formats.html
location
The field is declared as geo_point
after , We can index documents that contain longitude and latitude information . The longitude and latitude information can be in the form of string 、 Array or object ;
Official documents about location The fields are configured as follows :
PUT /attractions { "mappings": { "properties": { "name": { "type": "keyword" }, "location": { "type": "geo_point" } } } }
Set the field type directly to geo_point type .
Based on the official website description There are three different ways to process data put;
PUT /attractions/_doc/1?pretty {"name":"Chipotle Mexican Grill","location":"40.715, -74.011"} PUT /attractions/_doc/2?pretty {"name":"Pala Pizza","location":{"lat":40.722,"lon":-73.989}} PUT /attractions/_doc/3?pretty {"name":"Mini Munchies Pizza","location":[-73.983,40.719]}
Then the map creation test ; It can render longitude and latitude .
Then based on the customer side index Adjust the field ( Keep only key fields , Other fields are omitted )
PUT /test-ip-map { "aliases" : { }, "mappings" : { "dynamic_templates" : [ { "geoip.location" : { "match" : "geoip.location", "mapping" : { "type" : "geo_point" } } } } ], "properties" : { "geoip" : { "properties" : { "location" : { "type" : "geo_point" } } } } }
Then the longitude and latitude data of the customer index reindex After entering the new index
location The fields are automatically resolved to longitude and latitude
Then the map is created and tested
Cause analysis :
Because the customer index is location Field specifically specifies float type , Although in the template geo_point Statement of , But the data is written to the index ,Maps Not able to correctly identify . So in the latitude and longitude field, you can directly use geo_point The type is enough .
To configure a map
1. Create contains location Index of field ; And write the data correctly .
2. Index based on longitude and latitude data to be displayed , stay index pattern Create the corresponding view in .
3. stay Kibana Maps in create new map ;
4. Click on add layer, Add a data source to your map ;
5. choice Documents, Add data sources ;
6. Select the view that has been created before
7. then Maps Automatically according to the configured view , To scan the index for location Field , At the same time, you can set different result set return options .
8. And then click add layer; Add map name , Set relevant layer parameters ( If you use the default, you do not need to change the layer parameters ); Click save , The longitude and latitude coordinates of the index contained in the corresponding view can be rendered in the map ;
Maps The principle and of loading data discover The functions are similar .
After the map takes effect , You can add... In the search box at the top filter, Or write KQL sentence , Filter and query data
Kibana Maps Link to the official documentation of the function ; At present, only 6.8 Version reference ;7.x The version has not been updated yet
https://www.elastic.co/guide/en/kibana/6.8/maps-getting-started.html
边栏推荐
- How to get the response body content in gin?
- Object store signature generation
- What is thermal data detection?
- Tencent on the other hand, I was puzzled by the "horse race" problem
- Tencent cloud database mysql:sql flow restriction
- Swift array map/flatmap/compactmap/filter/reduce/chaining Usage Summary
- Problems encountered in the work of product manager
- What is a reptile
- 让UPS“印象派用户”重新认识可靠性
- Clickhouse high performance column storage core principle
猜你喜欢
Applet wxss
A survey of training on graphs: taxonomy, methods, and Applications
Ui- first lesson
Ps\ai and other design software pondering notes
A survey on dynamic neural networks for natural language processing, University of California
Daily algorithm & interview questions, 28 days of special training in large factories - the 15th day (string)
[go] concurrent programming channel
A survey on model compression for natural language processing (NLP model compression overview)
[leetcode108] convert an ordered array into a binary search tree (medium order traversal)
Problems encountered in the work of product manager
随机推荐
zblog判断某个插件是否安装启用的内置函数代码
[web] what happens after entering the URL from the address bar?
Tencent releases the full platform version of reasoning framework TNN, and supports mobile terminal, desktop terminal and server terminal at the same time
During JMeter pressure measurement, time_ The number of requests does not go up due to many waits. The problem is solved
Saying "Dharma" Today: the little "secret" of paramter and localparam
Ramda 鲜为人知的一面
Tencent on the other hand, I was puzzled by the "horse race" problem
Handling of communication failure between kuberbetes pod
问题有多大,中台就有多大
Experience and suggestions on cloud development database
NFT元宇宙源码搭建解析与介绍
Enterprise service growth path (7): what key factors will affect SaaS' sales performance?
FPGA project development: experience sharing of lmk04821 chip project development based on jesd204b (I)
6 things all engineers should know before FEA
Abstract factory pattern
[go] runtime package for concurrent programming and its common methods
Don't let [mana] destroy your code!
Bypass kernel function pointer integrity check
How to perform concurrent stress testing on RTSP video streams distributed by audio and video streaming servers?
A survey of training on graphs: taxonomy, methods, and Applications