当前位置:网站首页>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
边栏推荐
- The mystery of redis data migration capacity
- [idea] dynamic planning (DP)
- FPGA project development: experience sharing of lmk04821 chip project development based on jesd204b (I)
- Tencent cloud database mysql:sql flow restriction
- Percona Toolkit series - Pt deadlock logger
- Abstract factory pattern
- Batch BOM Bapi test
- What is the difference between optical fiber jumper and copper wire
- Cloud + community [play with Tencent cloud] video solicitation activity winners announced
- How to save data to the greatest extent after deleting LV by misoperation under AIX?
猜你喜欢

Applet wxss

Problems encountered in the work of product manager

A survey on model compression for natural language processing (NLP model compression overview)

Daily algorithm & interview questions, 28 days of special training in large factories - the 15th day (string)

Applet - use of template
![[go] concurrent programming channel](/img/6a/d62678467bbc6dfb6a50ae42bacc96.jpg)
[go] concurrent programming channel

Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)

Ui- first lesson

A survey on dynamic neural networks for natural language processing, University of California
![[leetcode108] convert an ordered array into a binary search tree (medium order traversal)](/img/e1/0fac59a531040d74fd7531e2840eb5.jpg)
[leetcode108] convert an ordered array into a binary search tree (medium order traversal)
随机推荐
Page scrolling effect library, a little skinny
Markdown syntax -- Formula
让UPS“印象派用户”重新认识可靠性
未来银行需要用明天的思维,来思考今天架构
TRTC web end imitation Tencent conference microphone mute detection
The mystery of redis data migration capacity
zblog系统如何根据用户ID获取用户相关信息的教程
问题有多大,中台就有多大
Handling of communication failure between kuberbetes pod
Pagoda activities, team members can enjoy a lightweight server 1 core 2g5m 28 yuan for two years
liver failure! My friend made a programming navigation website!
Finite element simulation in design
A survey on model compression for natural language processing (NLP model compression overview)
What is cloud development? Why cloud development? Talk about our story
What is the difference between get and post? After reading it, you won't be confused and forced, and you won't have to fight with your friends anymore
Comparison of jmeter/k6/locust pressure measuring tools (not completed yet)
National standard gb28181 protocol video platform easygbs alarm reporting function adds video alarm reporting and video recording
Enterprise service growth path (7): what key factors will affect SaaS' sales performance?
During JMeter pressure measurement, time_ The number of requests does not go up due to many waits. The problem is solved
API documents are simple and beautiful. It only needs three steps to open