I try to launch logstash pipeline for 3 configuration files (just duplication of conf file) but unfortunately, this leads to an indefinitely looping message :
Looping message without end
This is the command : (Only one conf file is executed, the other are never reached ! because of looping message )
bin/logstash -f /etc/logstash/conf.d/app1.conf -f /etc/logstash/conf.d/app2.conf -f /etc/logstash/conf.d/app3.conf --log.level debug
This is the log file : which seems correct because of the conf file is executed and ingest data on elasticsearch
Log capture
This is the sample logstash conf file :
input {
file {
path => "/home/app1/log_app1.log"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
grok{
match => { "message" => "%{LOGLEVEL:log_level} %{GREEDYDATA:log_message}" }
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "app1_data"
}
stdout { codec => rubydebug }
}
Finally, this is the sample log file :
INFO APP log message 01
ERROR APP log message 02
DEBUG APP log message 03
WARN APP log message 04
Indefinitely looping message blocking the execution of the seconde and third pipeline configuration file !
onepiece123 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.