当前位置:网站首页>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
边栏推荐
- ClassNotFoundException v/s NoClassDefFoundError
- Handling of communication failure between kuberbetes pod
- Coding's first closed door meeting on financial technology exchange was successfully held
- Hook graphics kernel subsystem
- Scuffle on China's low code development platform -- make it clear that low code
- Ps\ai and other design software pondering notes
- What does the router pin mean?
- AI video structured intelligent security platform easycvr intelligent security monitoring scheme for protecting community residents
- National standard gb28181 protocol video platform easygbs alarm reporting function adds video alarm reporting and video recording
- Percona Toolkit series - Pt deadlock logger
猜你喜欢

Daily algorithm & interview questions, 28 days of special training in large factories - the 15th day (string)
![[go] concurrent programming channel](/img/6a/d62678467bbc6dfb6a50ae42bacc96.jpg)
[go] concurrent programming channel

Problems encountered in the work of product manager

Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)
![[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)

A survey on dynamic neural networks for natural language processing, University of California

A survey of training on graphs: taxonomy, methods, and Applications

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

Ui- first lesson

Ps\ai and other design software pondering notes
随机推荐
Annual contribution! Tencent cloud middleware product upgrade conference is in hot registration!
[security] graphical CSRF injection of Web Security (II)
A survey on dynamic neural networks for natural language processing, University of California
An error is reported during SVN uploading -svn sqlite[s13]
Ramda 鲜为人知的一面
Introduction to koa (III) koa routing
Private domain defense in the cotton Era
Handling of communication failure between kuberbetes pod
[the activity is over, and the list of winners is announced] in March, techo youth university open class demo practice
Cloud + community [play with Tencent cloud] video solicitation activity winners announced
What is a server
@There is a free copyright protection service for enterprises in Dawan District
In those years, I insisted on learning the motivation of programming
A survey of training on graphs: taxonomy, methods, and Applications
How to perform concurrent stress testing on RTSP video streams distributed by audio and video streaming servers?
【prometheus】1. Monitoring overview
TRTC web end imitation Tencent conference microphone mute detection
Applet wxss
What is the difference between a network card and a port
Enterprise service growth path (7): what key factors will affect SaaS' sales performance?