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
    • 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.

       

        1. icmp-regexp-validation-preprocessing.yaml
          3 kB
          Rodrigo P
        2. icmp-targets-issue-zbx.yaml
          5 kB
          Rodrigo P
        3. icmp-targets-issue-zbx-v607.yaml
          12 kB
          Rodrigo P
        4. image-2022-10-21-12-12-56-512.png
          38 kB
          Rodrigo P
        5. image-2022-10-21-12-14-12-988.png
          49 kB
          Rodrigo P
        6. image-2022-10-21-12-17-29-997.png
          12 kB
          Rodrigo P
        7. image-2022-10-21-12-22-21-440.png
          13 kB
          Rodrigo P
        8. image-2023-01-25-13-43-56-159.png
          39 kB
          Rodrigo P
        9. image-2023-01-25-13-46-55-601.png
          40 kB
          Rodrigo P
        10. image-2023-01-25-13-48-37-123.png
          31 kB
          Rodrigo P
        11. image-2023-01-25-14-01-45-198.png
          31 kB
          Rodrigo P
        12. image-2023-05-15-10-45-34-027.png
          26 kB
          Dmitrijs Goloscapovs
        13. image-2023-05-15-10-46-22-948.png
          30 kB
          Dmitrijs Goloscapovs
        14. image-2023-05-16-19-21-58-185.png
          20 kB
          Rodrigo P
        15. image-2023-05-16-19-23-12-566.png
          27 kB
          Rodrigo P
        16. image-2023-05-16-19-24-38-829.png
          23 kB
          Rodrigo P
        17. image-2023-05-16-19-27-17-275.png
          20 kB
          Rodrigo P
        18. image-2023-05-16-19-34-42-561.png
          21 kB
          Rodrigo P
        19. image-2023-05-16-19-37-07-566.png
          22 kB
          Rodrigo P
        20. image-2023-05-19-12-41-45-991.png
          25 kB
          Rodrigo P

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

              Created:
              Updated:
              Resolved: