This means that anytime I will have a new CSV file to track I have to add it to the filebeat.yml file adding the custom app_name field accordingly.
I was wondering if I could use a regex with a capture group in the prospect definition to "automatically" track any new file and assign the right app_name value. Something like this:
hello @gvdm90, Currently, it's not possible to dynamically extract that information from an event and reuse it as a field with Filebeat, but we plan to add something in beats that will work like the dissect filter in Logstash.
But you can solve your problem by either one of the following options:
Use the ingest node feature to do the processing, you can extract the app_name part using a grok processor and do more filtering after.
Use Logstash with the beats inputs and the grok filter and send your events to Logstash instead of sending it directly to Elasticsearch.
at the moment I'm already using an Elasticsearch pipeline to parse the filebeat data, so I would be happy if I could add a behaviour to that pipeline instead of using Logstash for this purpose.
So it is possible to retrieve the path of the filebeat data from the data itself after it has been sent?
I'm responding to myself at the last question: yes, the path is sent by filebeat with the data!
It is the source field. Did you mind that field for my purpose or were you thinking about one another solution?
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.