newly created field by set_field not visible to has_field test in same pipeline stage
newly created field by set_field not visible to has_field test in same pipeline stage
Expected Behavior
newly create field by set_field should be immediately visible for has_field test in same stage
Current Behavior
newly created field by set_field not visible to has_field test in same pipeline stage
Steps to Reproduce (for bugs)
create the following pipeline, and input message will got field following_stage_visible and value being true, but no same_stage_visible field, which means the newly created new_field not visible to has_field test at same stage, only available to following stages.
stage 0 match either
rule "always true";
rule "new_field visible to has_field at same stage";
stage 1 match all
rule "new_field visible to has_field at following stages";
end
rule "always true"
when
true
then
set_field("new_field","something");
end
rule "new_field visible to has_field at same stage"
when
has_field("new_field")
then
set_field("same_stage_visible", true);
end
rule "new_field visible to has_field at following stages"
when
has_field("new_field")
then
set_field("following_stage_visible", true);
end
Your Environment
- Graylog Version: 2.4.3-1
- Elasticsearch Version: 5.6.8-1
- MongoDB Version: mongodb-enterprise-3.6.3-1
- Operating System: CentOS 7.4
- Browser version: firefox-52.7.2-1
more tests show that the new created field is visible to set_field function at same stage, but also not visible to is_null/is_not_null test function also.
if using the newly created field in following rules in the same stage, system will write a WARN message into server.log like following:
2018-04-02T00:15:51.850+08:00 WARN [EqualityExpression] left expression evaluated to null, returning false: $message.field_name
when message rate is high, soon the hard disk will full with logs.
Refs https://community.graylog.org/t/new-fields-visiblity-to-field-test-functions-in-same-stage/4791
@kroepke: Can you comment if this is an issue or by design?
works if field is created before routing to stream and won't after.