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

New Regular Expression Error with logrt

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 6.4.13
    • Agent (G)
    • None
    • Server: Debian 12.
      Agent 2 (active): Windows 11.

      I've been using the following regular expression in logrt to specify the log file without any issues for several weeks:

      Code:
      logrt[C:\Programas\3. Version DEBUG PalStats con Grafico\Logs\Actual\^\d\{4}-\d\{2}-\d\{2}_\d\{2}-\d\{2}-\d\{2}\.log,"ERROR",,,"skip",]
      However, today, unexpectedly, I encountered an error with this item stating:

      "Cannot compile a regular expression describing filename pattern: PCRE2 does not support \F, \L, \l, \N{name}, \U, or \u, position 39, flags:0x2400".

      Enclosing the directory path in quotes does not resolve the issue. I haven't come across any updates that might have impacted this behavior. Does anyone have an idea what could be causing this?

      It seems that even if all the "-s" are escaped to "
      -s", it still doesn't work: it indicates that regular expressions cannot be used in the path route.

      However, if I only escape "
      Logs" in the path, the corresponding item in Zabbix transitions to an "enabled" state without showing any errors. However, it fails to capture the expected logs values. 

      **

      logrt[C:\Programas\3. Version DEBUG PalStats con Grafico\\Logs\Actual\^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}\.log,"ERROR",,,"skip",]

      **
      It's a bit counterintuitive. It seems that in a minor release, someone wanted to improve the debugger by searching for \F, \L, \l, \N{name}, \U, or \u throughout the entire path, forgetting that regular expressions can only be used in the filename.

       

      Thanks.

        1. log.txt
          234 kB
        2. With_error_description.png
          With_error_description.png
          18 kB
        3. With_error_description-1.png
          With_error_description-1.png
          18 kB
        4. With_Escaped_L.png
          With_Escaped_L.png
          11 kB
        5. Without_error_description.png
          Without_error_description.png
          11 kB

            ksalins Karlis Salins
            dotero David Otero
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: