您好,有人可以帮我吗,无法在弹性搜索中创建索引, 在这种情况下,我之前已经创建了“ test1”索引及其日志路径用于测试目的,并在弹性搜索中删除了,现在,当我重新创建相同的索引并使用相同的路径时,在弹性搜索中未创建索引,这是新的ELK可以有人帮我吗
我的工作流程是Filebeat-> Logstash-> Elasticsearch
filebeat.yml file
#======== Filebeat prospectors =============================
filebeat.prospectors:
- input_type: log
paths:
- /var/lib/docker/volumes/test1.log
document_type: test1
- input_type: log
paths:
- /var/lib/docker/volumes/test2.log
document_type: test2
#----------------------------- Logstash output -----------------------------
output.logstash:
# The Logstash hosts
hosts: ["localhost:5044"]
===============================================
logstash.conf
===============================================
input {
beats {
port => 5044
}
}
filter {
json {
source => "message"
target => "log"
}
}
output {
if [type]=="test1" {
elasticsearch {
hosts => ["locahost:9200"]
index => "test1"
}
}
if [type]=="test2" {
elasticsearch {
hosts => ["localhost:9200"]
index => "test2"
}
}
}