Logstash不是创建默认模板的索引表单或弹性搜索中提供的寺庙名称 [英] Logstash is not creating the Index form the default template or the temple name provided in elastic search

查看:417
本文介绍了Logstash不是创建默认模板的索引表单或弹性搜索中提供的寺庙名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用自定义模板svlogs来处理我的日志,但是Inex根据我的模板不会在路上创建。我面临下面的错误

i am trying to process my logs with custom template svlogs but Inex is not getting created on the go based on my template .i am facing below error

error=> {type=>index_not_found_exception,reason=>no such index,resource.type=>index_expression,resource.id =svlogs-2016.12.29,index_uuid="_ na_,index=>svlogs-2016.12.29}

我的输出是

output {
elasticsearch {
    hosts => [ "192.168.254.129:9200" ]
    user => "logstash"
    password => "selva123"
    template_name => "svlogs"
    index => "svlogs-%{+YYYY.MM.dd}"
    }}

我的模板是:




curl -XPUT  '192.168.254.129:9200/_template/svlogs?pretty' -d'
{
  "template": "svlogs*",
  "settings": {
    "number_of_shards": 1
  },
  "mappings" : {
  "_default_" : {
   "properties" : {
    "MSGID" : {"type": "integer" },
    "debug" : {"type": "string"  , "index" : "not_analyzed" },
    "Error" : { "type" : "string", "index" : "not_analyzed"  },
    "client" : { "type" : "string"  },
    "eno" : { "type" : "integer" },
    "login" : { "type" : "string" },
    "message" : { "type" : "string" },
    "pid" : { "type" : "integer" },
    "process" : { "type" : "string" },
    "sv_date" : { "type": "date", "format": "EEE MMM dd HH:mm:SS yyyy"},
    "type"  : { "type" : "string" }
   }
  }
 }
}'

我期待logstash将创建基于给定的寺庙的索引

i was expecting logstash will create teh Index based on the temple given

其实它是工作,直到我安装x-pack。 Theni已经解决了我所有的特权相关的问题,现在我需要手动创建索引,使我的logstash工作。我尝试将managae_temaple添加为false仍然没有帮助。

Actually it was working till i installed x-pack . Theni have resolved all my privilege related issues , Now i need to create the index manually to make my logstash work . i tried added managae_temaple as "false" still no help .

请事先提前感谢。

推荐答案

问题在我在弹性搜索方式下面的评论下解决了

Issue got resolved after i commented below line in elasticsearch.yml

#action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-‌​history*

这篇关于Logstash不是创建默认模板的索引表单或弹性搜索中提供的寺庙名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆