【问题标题】:Failed loading the Index Template in Elasticsearch在 Elasticsearch 中加载索引模板失败
【发布时间】:2018-09-28 18:39:47
【问题描述】:

我正在尝试安装 ELK 以实现日志集中。我正在按照数字海洋网站中描述的步骤进行操作:https://www.digitalocean.com/community/tutorials/how-to-install-elasticsearch-logstash-and-kibana-elk-stack-on-ubuntu-14-04

我无法使用 curl 从此链接下载 filebeat 索引模板: https://gist.githubusercontent.com/thisismitch/3429023e8438cc25b86c/raw/d8c479e2a1adcea8b1fe86570e42abab0f10f364/filebeat-index-template.json

有人可以给我另一个来源吗?

【问题讨论】:

    标签: elastic-stack filebeat


    【解决方案1】:

    这是该链接的内容:

    {
      "mappings": {
        "_default_": {
          "_all": {
            "enabled": true,
            "norms": {
              "enabled": false
            }
          },
          "dynamic_templates": [
            {
              "template1": {
                "mapping": {
                  "doc_values": true,
                  "ignore_above": 1024,
                  "index": "not_analyzed",
                  "type": "{dynamic_type}"
                },
                "match": "*"
              }
            }
          ],
          "properties": {
            "@timestamp": {
              "type": "date"
            },
            "message": {
              "type": "string",
              "index": "analyzed"
            },
            "offset": {
              "type": "long",
              "doc_values": "true"
            },
            "geoip"  : {
              "type" : "object",
              "dynamic": true,
              "properties" : {
                "location" : { "type" : "geo_point" }
              }
            }
          }
        }
      },
      "settings": {
        "index.refresh_interval": "5s"
      },
      "template": "filebeat-*"
    }
    

    只需使用以下命令创建一个名为 filebeat-index-template.json 的文件:

    touch filebeat-index-template.json
    

    然后在编辑器中打开文件,如下所示:

    nano filebeat-index-template.json
    

    然后复制并粘贴上面链接中的内容并保存文件(ctrl + x)。

    之后,您应该能够在“加载模板”部分继续完成数字海洋演练。

    【讨论】:

    • 这对我帮助很大。谢谢!
    猜你喜欢
    • 2015-11-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-17
    • 1970-01-01
    • 2016-11-09
    • 1970-01-01
    • 2017-10-16
    相关资源
    最近更新 更多