• 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"
    }
    }
    ]
    }'

  • 相关阅读:
    Git远程库版本回滚
    微软Connect(); 2017大会梳理:Azure、数据、AI开发工具
    【实验手册】使用Visual Studio Code 开发.NET Core应用程序
    Ocelot API网关的实现剖析
    微软Tech Summit 2017,等你来打Call
    “.Net 社区大会”(dotnetConf) 2017 Day 1 Keynote: .NET Everywhere
    .NET平台微服务项目汇集
    .Net Core下通过Proxy 模式 使用 WCF
    .NET Core 2.0 正式发布信息汇总
    Visual Studio 2017 : client version 1.22 is too old
  • 原文地址:https://www.cnblogs.com/joycezhou/p/13477029.html
Copyright © 2020-2023  润新知