I have the following grok filter which extracts the file_extension from a field. It works except fine for files which have no extension, which generate a _grokparsefailure tag. For files with no extension, I would like the file_extension value set to an empty string. How can I accomplish this? Thank you!
grok {
match => { "file_path" => "(?<file_extension>\.[^.]+$)"}
keep_empty_captures => true
}