zl程序教程

您现在的位置是:首页 >  大数据

当前栏目

Elasticsearch 使用 Index Pattern 配置

配置elasticsearch index pattern 使用
2023-09-11 14:15:46 时间


1. 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

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

5. 创建第二个index pattern

在这里插入图片描述
在这里插入图片描述