Hi bro and sis
I will be sending file from filebeat to logstash. Is there a way I can extract file name on logstash filter? I want to add as a new field
My file name Path/sample.log Path/sample.20210821
Your small advice and example is big help to me
There are many ways to do this. See here and here for examples.
I tried as below
``` filter { grok { match => ["path","%{GREEDYDATA}/%{GREEDYDATA:filename}\.log"] } } ```
But in filename field it giving .log .how to have only name without extension?
© 2020. All Rights Reserved - Elasticsearch
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.