Inserting a dummy value for empty field while parsing using grok logstash

I want to have the dummy value for empty field while parsing grok pattern.
I have used the following condition-->
if ![exception_stacktrace] {
mutate {
replace => [ "exception_stacktrace", "-" ]
}
}
But with this my grok pattern is not working if exception_stacktrace is present.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.