Logstash recieves many .log files such as mongod.log and mysqld.log. I deal with it in logstash by having an if statement for each file such as:
if [log][file][path] =~ "mysqld.log"
I've been asked to also ship data from some old servers where on top of mysqld.log, there's also mysqld-port3308.log. The port number varies and can be anything.
Because the content of these files are formatted the same, I'm trying to have logstash simply include anything that starts with mysql and ends with .log. Basically mysql*.log
I noticed it doesn't accept astriks, is there an alternative for this? Huge thanks ahead!
If I may, I only didn't understand the $ part. May I ask what asserts position at the end of a line - means?
Thanks ahead.
EDIT: btw, am I supposed to change somehting in the regex101 website? I want to learn to use it and when I paste the command it says there's an error https://i.imgur.com/cJuErCm.png
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.