zoukankan      html  css  js  c++  java
  • zabbix+elasticsearch

    curl -X PUT "http://127.0.0.1:9200/_template/uint_template" -H 'Content-Type: application/json' -d'
    {
    "index_patterns": ["uint*"],
    "settings" : {
    "index" : {
    "number_of_replicas" : 1,
    "number_of_shards" : 5
    }
    },
    "mappings" : {
    "values" : {
    "properties" : {
    "itemid" : {
    "type" : "long"
    },
    "clock" : {
    "format" : "epoch_second",
    "type" : "date"
    },
    "value" : {
    "type" : "long"
    }
    }
    }
    }
    }'
    curl -X PUT
    http://127.0.0.1:9200/_template/uint_template
    -H 'content-type:application/json'
    -d '{
    "index_patterns": [
    "uint*"
    ],
    "settings": {
    "index": {
    "number_of_replicas": 1,
    "number_of_shards": 5
    }
    },
    "mappings": {
    "properties": {
    "itemid": {
    "type": "long"
    },
    "clock": {
    "format": "epoch_second",
    "type": "date"
    },
    "value": {
    "type": "long"
    }
    }
    }
    }'
    curl -X PUT
    http://127.0.0.1:9200/_template/db1_template
    -H 'content-type:application/json'
    -d '{
    "index_patterns": [
    "db1*"
    ],
    "settings": {
    "index": {
    "number_of_replicas": 1,
    "number_of_shards": 5
    }
    },
    "mappings": {
    "properties": {
    "itemid": {
    "type": "long"
    },
    "clock": {
    "format": "epoch_second",
    "type": "date"
    },
    "value": {
    "type": "double"
    }
    }
    }
    }'
    curl -X PUT
    http://127.0.0.1:9200/_template/text_template
    -H 'content-type:application/json'
    -d '{
    "index_patterns": [
    "text*"
    ],
    "settings": {
    "index": {
    "number_of_replicas": 1,
    "number_of_shards": 5
    }
    },
    "mappings": {
    "properties": {
    "itemid": {
    "type": "long"
    },
    "clock": {
    "format": "epoch_second",
    "type": "date"
    },
    "value": {
    "fields": {
    "analyzed": {
    "index": true,
    "type": "text",
    "analyzer": "standard"
    }
    },
    "index": false,
    "type": "text"
    }
    }
    }
    }'

    curl -X PUT
    http://127.0.0.1:9200/_template/str_template
    -H 'content-type:application/json'
    -d '{
    "index_patterns": [
    "str*"
    ],
    "settings": {
    "index": {
    "number_of_replicas": 1,
    "number_of_shards": 5
    }
    },
    "mappings": {
    "properties": {
    "itemid": {
    "type": "long"
    },
    "clock": {
    "format": "epoch_second",
    "type": "date"
    },
    "value": {
    "fields": {
    "analyzed": {
    "index": true,
    "type": "text",
    "analyzer": "standard"
    }
    },
    "index": false,
    "type": "text"
    }
    }
    }
    }'


    curl -X PUT
    http://127.0.0.1:9200/_template/log_template
    -H 'content-type:application/json'
    -d '{
    "index_patterns": [
    "log*"
    ],
    "settings": {
    "index": {
    "number_of_replicas": 1,
    "number_of_shards": 5
    }
    },
    "mappings": {
    "properties": {
    "itemid": {
    "type": "long"
    },
    "clock": {
    "format": "epoch_second",
    "type": "date"
    },
    "value": {
    "fields": {
    "analyzed": {
    "index": true,
    "type": "text",
    "analyzer": "standard"
    }
    },
    "index": false,
    "type": "text"
    }
    }
    }
    }'

    curl -X PUT
    http://127.0.0.1:9200/_ingest/pipeline/uint-pipeline
    -H 'content-type:application/json'
    -d '{
    "description": "daily uint index naming",
    "processors": [
    {
    "date_index_name": {
    "field": "clock",
    "date_formats": [
    "UNIX"
    ],
    "index_name_prefix": "uint-",
    "date_rounding": "d"
    }
    }
    ]
    }'


    curl -X PUT
    http://127.0.0.1:9200/_ingest/pipeline/str-pipeline
    -H 'content-type:application/json'
    -d '{
    "description": "daily uint index naming",
    "processors": [
    {
    "date_index_name": {
    "field": "clock",
    "date_formats": [
    "UNIX"
    ],
    "index_name_prefix": "str-",
    "date_rounding": "d"
    }
    }
    ]
    }'

    curl -X PUT
    http://127.0.0.1:9200/_ingest/pipeline/text-pipeline
    -H 'content-type:application/json'
    -d '{
    "description": "daily uint index naming",
    "processors": [
    {
    "date_index_name": {
    "field": "clock",
    "date_formats": [
    "UNIX"
    ],
    "index_name_prefix": "text-",
    "date_rounding": "d"
    }
    }
    ]
    }'

    curl -X PUT
    http://127.0.0.1:9200/_ingest/pipeline/log-pipeline
    -H 'content-type:application/json'
    -d '{
    "description": "daily uint index naming",
    "processors": [
    {
    "date_index_name": {
    "field": "clock",
    "date_formats": [
    "UNIX"
    ],
    "index_name_prefix": "log-",
    "date_rounding": "d"
    }
    }
    ]
    }'

    curl -X PUT
    http://127.0.0.1:9200/_ingest/pipeline/dbl-pipeline
    -H 'content-type:application/json'
    -d '{
    "description": "daily uint index naming",
    "processors": [
    {
    "date_index_name": {
    "field": "clock",
    "date_formats": [
    "UNIX"
    ],
    "index_name_prefix": "dbl-",
    "date_rounding": "d"
    }
    }
    ]
    }'

  • 相关阅读:
    oracle ebs应用产品安全性-交叉验证规则
    ORA-04021 timeout occurred while waiting to lock object
    ORA-04021:timeout occurred while waiting to lock object
    ebs双节点webservice部署问题
    ebs如何将客户化的PL/SQL程序发布到webservice
    adcfgclone.pl appsTier报错Unable to locate 'linkxlC' utility in path
    CS231n 作业1 SVM+softmax+两层神经网络
    ReVision: Automated Classification, Analysisand Redesign of Chart Images
    No.1 Extracting and Retargeting Color Mappings from Bitmap Images of Visualizations
    HankerRank刷题第四天(排序类型)Quicksort In-Place
  • 原文地址:https://www.cnblogs.com/joycezhou/p/13477029.html
Copyright © 2011-2022 走看看