[syslog-ng] discussion: Should ptbtool test validate types
Evan Rempel
erempel at uvic.ca
Fri Aug 18 14:53:24 UTC 2023
Now that syslog-ng has type hinting should the pdbtool test also
validate the types of any values specified for a pattern.
<rule id="pid1" class="myclass" provider="me">
<patterns>
<pattern>some pattern @NUMBER:mynum@ with number</pattern>
</patterns>
<tags>
<tag>rate</tag>
</tags>
<values>
<value name="more" type="integer">100A</value>
</values>
<examples>
<example>
<test_message program="some pattern 123 with
number</test_message>
<test_values>
<test_value name="mynum" type="integer">123</test_value>
</test_values>
</example>
</examples>
</rule>
Currently the test_values are verified for both the value, and the type
that the pattern parses, however, none of the values that are used to
enrich this message are verified for type.
This results in a patterndb that passes validation, yet will fail at the
time the pattern matches a log message.
comments?
--
Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20230818/82b3646c/attachment.htm>
More information about the syslog-ng
mailing list