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

Regular expressions (preprocessing) escape sequence

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Workaround proposed
    • Icon: Trivial Trivial
    • None
    • 5.4.3
    • Appliance (L), Server (S)

      Hello, everyone)

      When I tried to use regular expressions in preprocessing form, I found that Zabbix could not find the second occurrence (second escape sequence) of the regular expression.

      Example (file monitoring):

      {
          "outcome" => "success",
          "result" => {
              "heap-memory-usage" => {
                  "init" => 2147483648L,
                  "used" => 50779204512L,
                  "committed" => 75376689152L,
                  "max" => 75376689152L
              },
              "non-heap-memory-usage" => {
                  "init" => 2555904L,
                  "used" => 390467544L,
                  "committed" => 405086208L,
                  "max" => -1L
              },
              "object-name" => "java.lang:type=Memory",
              "object-pending-finalization-count" => 0,
              "verbose" => true
          }
      }

      My regular expr is like:

      committed.*\s(\S+)L

       

      Previously, I checked the functionality of the regular expression on the site regex 101.com

      https://regex101.com/delete/hd9sQqB2FfUmM2WpKtd1KXAW 

       

      After that I made this one:

       

      and it's OK (nice), but when I'm trying to make something like this (using \2 for finding second occurrence) :

       

      Zabbix app tells me that it fails on it step...

       

      On Zabbix off  website page: https://www.zabbix.com/documentation/current/manual/config/items/preprocessing 

       

      Where am I wrong? I ask for your help.

        1. image-2021-08-25-11-02-41-829.png
          58 kB
          Igor Litvinov
        2. image-2021-08-25-11-04-40-645.png
          48 kB
          Igor Litvinov
        3. image-2021-08-25-11-06-33-451.png
          49 kB
          Igor Litvinov
        4. image-2021-08-25-11-08-48-014.png
          47 kB
          Igor Litvinov
        5. image-2021-09-08-11-25-00-611.png
          71 kB
          Antons Sincovs
        6. image-2021-09-08-11-27-20-498.png
          477 kB
          Antons Sincovs
        7. image-2021-09-08-11-52-32-186.png
          65 kB
          Antons Sincovs
        8. image-2021-09-08-11-54-38-971.png
          24 kB
          Antons Sincovs

            asincovs Antons Sincovs
            frostwar Igor Litvinov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: