0
点赞
收藏
分享

微信扫一扫

Elasticsearch 使用 Index Pattern 配置


文章目录

  • ​​1. Index Pattern​​
  • ​​2. 插入数据​​
  • ​​3. 导入数据​​
  • ​​4. 打开kibana创建第一个index pattern​​
  • ​​5. 创建第二个index pattern​​

1. Index Pattern

Elasticsearch 使用 Index Pattern 配置_插入数据

2. 插入数据

PUT /logstash-2015.05.18
{
"mappings": {
"properties": {
"geo": {
"properties": {
"coordinates": {
"type": "geo_point"
}
}
}
}
}
}



PUT /logstash-2015.05.19
{
"mappings": {
"properties": {
"geo": {
"properties": {
"coordinates": {
"type": "geo_point"
}
}
}
}
}
}


PUT /logstash-2015.05.20
{
"mappings": {
"properties": {
"geo": {
"properties": {
"coordinates": {
"type": "geo_point"
}
}
}
}
}
}

3. 导入数据

# For Mac & Windows
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/_bulk?pretty' --data-binary @logs.jsonl

curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json

4. 打开kibana创建第一个index pattern

Elasticsearch 使用 Index Pattern 配置_插入数据_02
Elasticsearch 使用 Index Pattern 配置_导入数据_03

Elasticsearch 使用 Index Pattern 配置_json_04
Elasticsearch 使用 Index Pattern 配置_json_05

5. 创建第二个index pattern

Elasticsearch 使用 Index Pattern 配置_elasticsearch_06
Elasticsearch 使用 Index Pattern 配置_json_07

举报

相关推荐

0 条评论