Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21794

Preprocessing validation not working when string is empty

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 6.0.8
    • Server (S)
    • None
    • Team A
    • Sprint 96 (Jan 2023), Sprint 97 (Feb 2023), Sprint 98 (Mar 2023), Sprint 99 (Apr 2023), Sprint 100 (May 2023), Sprint 101 (Jun 2023), Sprint 102 (Jul 2023), Sprint 103 (Aug 2023), Sprint 104 (Sep 2023), Sprint 105 (Oct 2023), Sprint 107 (Dec 2023)
    • 0.125

      There is an preprocessing item Matches regular expression with Custom on fail rule.

       

      According to the documentation:

      Matches regular expression Specify a regular expression that a value must match.
      If you mark the Custom on fail checkbox, the item will not become unsupported in case of failed preprocessing step and it is possible to specify custom error handling options: either to discard the value, set a specified value, or set a specified error message.

       

      When testing this rule with empty string, it's working as expected, that is, message "domain not resolved" is presented because the string (empty) does not match the specific regular expression.

       

      But when I check latest value for the item, there is no value. It was supposed to be "domain not resolved".

       

      If a non-empty string is processed by the item and the value does not match the regular expression, value "domain not resolved" is presented for the item.

       

       

      Expected behavior: even if an empty string is processed, if value does not match regular expression, Custom on fail should work.

       

            dgoloscapov Dmitrijs Goloscapovs
            ropesca Rodrigo P
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: