Update configuration.md

Show an example of conditionals that just check the presence of a
field. It's not immediately obvious how to do this from the existing
docs.

Fixes #2442
This commit is contained in:
Wilfred Hughes 2015-01-27 18:18:58 +00:00 committed by Jordan Sissel
parent fbf8e1e320
commit 940b90c32b

View file

@ -278,6 +278,13 @@ You can also do multiple expressions in a single condition:
}
}
}
You can test whether a field was present, regardless of its value:
if [exception_message] {
# If the event has an exception_message field, set the level
mutate { add_field => { "level" => "ERROR" } }
}
Here are some examples for testing with the in conditional: