Hi,
I am trying to use logstash file input plugin. I want to pick files from multiple locations and send them to different indices. Here is my config
nput {
file {
type => "TomEE-logs-passport"
path => "/etc/logstash/logs/TomEE.2023-04-19.log"
}
file {
type => "TomEE-access-passport"
path => "/etc/logstash/logs/localhost_access_log..2023-04-20.txt"
}
}
output {
if [type] == "TomEE-logs-passport" {
elasticsearch {
hosts => "http://ip:9200"
user => "elastic"
password => "pwd"
index => "%{type}-%{+YYYY.MM.dd}"
}
}
if [type] == "TomEE-access-passport" {
elasticsearch {
hosts => "http://IP:9200"
user => "elastic"
password => "pwd"
index => "%{type}-%{+YYYY.MM.dd}"
}
}
}
After this is do config test, it shows ok. Then i restart logstash. There are no errors but there is no data also in elastic stack. Am i missing something. I have installed the file input plugin too