Logstash: how to add file name as a field?
Hi I added a grok filter to do just this. I only wanted to have the filename not the path, but you can change this to your needs. filter { grok { match => [“path”,”%{GREEDYDATA}/%{GREEDYDATA:filename}\.log”] } }