Hi Logstash Ninjas,
In my filter{} section, I think I am creating a field with a Boolean value in it:
if SOME CONDITION {
mutate {
add_field => { "MyFlag" => 'true' }
convert => { "MyFlag" => "boolean" }
}
}
else {
mutate {
add_field => { "MyFlag" => 'false' }
convert => { "MyFlag" => "boolean" }
}
}
Later on, I want to check that flag:
if "MyFlag" == 'true' {
mutate {
add_field => { "Result" => "Boolean check worked!" }
}
}
else {
mutate {
add_field => { "Result" => "Boolean check failed..." }
}
}
In my tests, I’ve hard-coded MyFlag to always be TRUE. But that if() statement always fails. I can’t figure out the syntax should be. Any ideas?