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.

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

              Created:
              Updated:
              Resolved: