Ad Widget

Collapse

New Regular Expression Error with logrt

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Otero
    Junior Member
    • Apr 2024
    • 2

    #1

    New Regular Expression Error with logrt

    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?

    Thanks.
  • Answer selected by David Otero at 10-04-2024, 08:31.
    David Otero
    Junior Member
    • Apr 2024
    • 2

    Thank you for the response.

    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, it works.

    Solution: 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.

    Solved.
    Last edited by David Otero; 10-04-2024, 08:50.

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #2
      \Logs maybe this one? try replacing all \-s with \\-s

      Comment

      • David Otero
        Junior Member
        • Apr 2024
        • 2

        #3
        Thank you for the response.

        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, it works.

        Solution: 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.

        Solved.
        Last edited by David Otero; 10-04-2024, 08:50.

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #4
          If it looks like bug, walks like bug, acts like a but, then it probably is a bug... https://support.zabbix.com/browse/ZBX you can report it and see what devs think of this...

          Comment

          Working...