美文网首页es学习
【原】使用Kibana Dev Tools 操作index

【原】使用Kibana Dev Tools 操作index

作者: 曹赫洋 | 来源:发表于2018-09-22 19:23 被阅读0次

新建index


image.png

返回如下图代表成功:


image.png

删除index,返回右侧代表成功


image.png

使用restapi为index创建mapping规则:


image.png

说明:

http://internal-ALB-Shinho-UAT-1138562230.cn-north-1.elb.amazonaws.com.cn:9200/testlogs/_doc/_mappings

testlogs代表index的名称,_doc为mapping的类型

{
    "_doc": {
        "properties": {
            "level": {
                "type": "keyword"
            },
            "logGroup": {
                "type": "keyword"
            },
            "logStream": {
                "type": "text"
            },
            "loggerName": {
                "type": "text"
            },
            "message": {
                "type": "text"
            },
            "spanId": {
                "type": "keyword"
            },
            "thread": {
                "type": "keyword"
            },
            "time": {
                "type": "date",
                "format": "yyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis" # yyy-MM-dd HH:mm:ss的日期类型
            },
            "timeMillis": {
                 "format":"strict_date_optional_time||epoch_millis", # 时间戳类型,新建 Index Patterns 需要一个日期类型
           "type":"date"
            },
            "traceId": {
                "type": "keyword"
            }
        }
    }
}

相关文章

网友评论

    本文标题:【原】使用Kibana Dev Tools 操作index

    本文链接:https://www.haomeiwen.com/subject/fouxoftx.html