Logstash filter "if" condition to check if field exist or not

Is there any way in Logstash to check if a certain field exists or not?

My use-case:
I want to add a field "status: missing" when the field "httpStatus" doesn't come in the log document.

Hi,

You can try this:

if !  [httpStatus]  {}
1 Like

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