我正在尝试使用自定义模板svlogs处理我的日志,但是INEX并未根据我的模板在GO上创建。我正面向以下错误
"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将根据给定的寺庙创建索引
实际上它一直在工作,直到我安装了X-Pack为止。然后,我解决了所有与特权相关的问题,现在我需要手动创建索引以使我的logStash工作。我尝试添加了Managae_temaple为" false"仍然没有帮助。
请提前指导。
问题在我在elasticsearch.yml
中评论以下时解决了问题。#action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*