我试图通过logstash摄取metricbeat文件输出,但logstash没有在elasticsearch中创建任何索引。下面是我的logstash .conf 文件
input {
file {
type => "my-metricbeat"
path => ["C:/tmp/metricbeat/metric*"]
codec => "json"
start_position => beginning
sincedb_path => "/dev/null"
}
}
output {
if([type] == "my-metricbeat") {
elasticsearch {
hosts => "http://localhost:9200"
index => "metricbeat-test-%{+YYYY.MM.dd}"
}
}
stdout { codec => rubydebug }
}
ELK 版本是 5.2.1