Hello every one
I need to access to my filename date.
this is the filter i wrote in my logstash
filter {
grok {
match => { "path" => [ "^%{GREEDYDATA}(?<year>[0-9]{4})(?<month>[0-9]{2})(?<day>[0-9]{2})(?<hour>[0-9]{4})%{GREEDYDATA}" ] }
}
}
and this is the output of my file path "path" => "/etc/logstash/conf.d/myfile/202005020759.txt"
but nothing appear to my logstash output as a field of year month and day..even i tried this:
filter {
grok {
match => { "path" => [ "%{GREEDYDATA:some}" ] }
}
}
but still no out put in my logstash.
i check everything on internet but still no luck