my ELK version 6.7. i want to add multiple files in logstash conf file and use it conditinally. i have this conf file but it is not working.
input {
file {
type => "back"
path => "E:/xampp/htdocs/project/hq/log/logs_dev.json"
start_position => "beginning"
sincedb_path => "NUL"
codec => "json"
}
file {
type => "api"
path => "E:/xampp/htdocs/project/api/log/logs_dev.json"
start_position => "beginning"
sincedb_path => "NUL"
codec => "json"
}
}
filter
{
}
output {
stdout { codec => rubydebug }
if [type] == "back" {
elasticsearch {
hosts => ["http://127.0.0.1:9200/"]
index => "project_back_18"
}
}
if [type] == "api" {
elasticsearch {
hosts => ["http://127.0.0.1:9200/"]
index => "project_api_18"
}
}
}