I have a few log files like below data_log_01.log data_log_02.log data_log_03.log data_log_04.log
Is there any way that I can parse these logs one by one using a single config file in logstash?
How about using the file input plugin with a wildcard?
An exmaple configuration could look like this, assuming your log files are located /home/of/your/logs/
:
input {
file {
path => [
"/home/of/your/logs/*.log"
]
}
}
}
The path
value has to be an absolute path! You might want to see the docs on using path.