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

Regular expression Server/GUI inconsistency

    XMLWordPrintable

Details

    • Incident report
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 1.9.0 (alpha)
    • 1.9.1 (alpha)
    • Frontend (F), Proxy (P)
    • None

    Description

      Follow up from ZBX-3260

      Reported by Oleksiy Zagorskyi:

      -----------------------------------

      Some the experiments with different expression (debuglog):

      36950:20101214:221310.009 Get value from agent result: '{
      "vfs.fs.discovery":[
      {
      "

      {#FSNAME}":"A:
      "},
      {
      "{#FSNAME}

      ":"C:
      "},
      {
      "

      {#FSNAME}":"D:
      "},
      {
      "{#FSNAME}

      ":"E:
      "},
      {
      "

      {#FSNAME}":"F:
      "},
      {
      "{#FSNAME}

      ":"G:
      "}]}'
      36950:20101214:221310.009 End of get_value():SUCCEED

      Expression visible in debug log - is the same as it written in front-end.
      I leave an effective information only.

      36950:20101214:214906.224 In DBlld_update_items() filter:'

      {#FSNAME}:^C:\$|^D:\$'
      36950:20101214:214906.224 Query [txnlev:1] [select i.itemid,i.description,i.key....................
      36950:20101214:214906.224 In DBlld_check_record() jp_row:'{"{#FSNAME}

      ":"A:
      "}'
      36950:20101214:214906.224 End of DBlld_check_record():FAIL
      36950:20101214:214906.224 In DBlld_check_record() jp_row:'{"

      {#FSNAME}":"C:
      "}'
      36950:20101214:214906.224 End of DBlld_check_record():FAIL


      36951:20101214:215406.317 In DBlld_update_items() filter:'{#FSNAME}

      :^C:\\$|^D:
      $'
      36951:20101214:215406.317 Query [txnlev:1] [select i.itemid,i.description,i.key_,i.l..........
      36951:20101214:215406.318 In DBlld_check_record() jp_row:'{"

      {#FSNAME}":"A:
      "}'
      36951:20101214:215406.318 End of DBlld_check_record():FAIL
      36951:20101214:215406.318 In DBlld_check_record() jp_row:'{"{#FSNAME}

      ":"C:
      "}'
      36951:20101214:215406.318 End of DBlld_check_record():FAIL

      36949:20101214:220110.074 In DBlld_update_items() filter:'

      {#FSNAME}:^C:|^D:\'
      36949:20101214:220110.074 Query [txnlev:1] [select i.itemid,i.description,i.key_,i.lastvalue,i.type,i.value_type,i.data_type,i.delay,i.delay
      36949:20101214:220110.075 In DBlld_check_record() jp_row:'{"{#FSNAME}

      ":"A:
      "}'
      36949:20101214:220110.075 End of DBlld_check_record():FAIL
      36949:20101214:220110.075 In DBlld_check_record() jp_row:'{"

      {#FSNAME}":"C:
      "}'
      36949:20101214:220110.075 End of DBlld_check_record():FAIL


      36950:20101214:215606.428 In DBlld_update_items() filter:'{#FSNAME}

      :^C:\\|^D:
      '
      36950:20101214:215606.428 Query [txnlev:1] [select i.itemid,i.description,i.key_,i.l..........
      36950:20101214:215606.428 In DBlld_check_record() jp_row:'{"

      {#FSNAME}":"A:
      "}'
      36950:20101214:215606.428 End of DBlld_check_record():FAIL
      36950:20101214:215606.428 In DBlld_check_record() jp_row:'{"{#FSNAME}

      ":"C:
      "}'
      36950:20101214:215606.429 End of DBlld_check_record():SUCCEED
      36950:20101214:215606.429 In DBlld_update_item() jp_row:'{"

      {#FSNAME}":"C:
      "}'
      36950:20101214:215606.429 In substitute_discovery_macros() data:'vfs.fs.size[{#FSNAME}

      ,pfree]'
      36950:20101214:215606.429 End of substitute_discovery_macros() data:'vfs.fs.size[C:\,pfree]'

      36950:20101214:221310.010 In DBlld_update_items() filter:'

      {#FSNAME}:^C:|^D:'
      36950:20101214:221310.010 Query [txnlev:1] [select i.itemid,i.description,i.key_,i.............
      36950:20101214:221310.010 In DBlld_check_record() jp_row:'{"{#FSNAME}

      ":"A:
      "}'
      36950:20101214:221310.010 End of DBlld_check_record():FAIL
      36950:20101214:221310.010 In DBlld_check_record() jp_row:'{"

      {#FSNAME}":"C:
      "}'
      36950:20101214:221310.010 End of DBlld_check_record():SUCCEED
      36950:20101214:221310.010 In DBlld_update_item() jp_row:'{"{#FSNAME}

      ":"C:
      "}'
      36950:20101214:221310.010 In substitute_discovery_macros() data:'vfs.fs.size[

      {#FSNAME},pfree]'
      36950:20101214:221310.010 End of substitute_discovery_macros() data:'vfs.fs.size[C:\,pfree]'



      The strangest thing - why is not working with the expression ^C:\\$|^D:
      $ or ^C:|^D:\ ?
      Perhaps all of this requires your attention.

      But, if i declare expression at global level:
      TWODISCS 1 ยป ^C:\\$|^D:
      $ [Result is TRUE]

      it start working:

      36948:20101214:222910.168 In DBlld_process_discovery_rule() itemid:24910
      36948:20101214:222910.168 Query [txnlev:0] [select hostid,key_,status,filter,snmp_community,snmp_port,snmpv3_securityname,snmpv3_securitylev
      36948:20101214:222910.169 Query [txnlev:1] [begin;]
      36948:20101214:222910.169 In DBlld_update_items() filter:'{#FSNAME}

      :@TWODISCS'
      36948:20101214:222910.169 Query [txnlev:1] [select r.name,e.expression,e.expression_type,e.e......
      36948:20101214:222910.169 Query [txnlev:1] [select i.itemid,i.description,i.key_,i.lastvalue,i.type,i........
      36948:20101214:222910.170 In DBlld_check_record() jp_row:'{"

      {#FSNAME}":"A:
      "}'
      36948:20101214:222910.170 End of DBlld_check_record():FAIL
      36948:20101214:222910.171 In DBlld_check_record() jp_row:'{"{#FSNAME}

      ":"C:
      "}'
      36948:20101214:222910.171 End of DBlld_check_record():SUCCEED

      And what's interesting - in front-end the check text "C:
      " (without quotes of course) in my TWODISCS expressions gives the FALSE result !
      Any comments?

      -----------------------------------

      In the last sentence I was wrong. It would be reasonable to test "C:\" text. Then gives the TRUE result.

      -----------------------------------

      Attachments

        Activity

          People

            sasha Alexander Vladishev
            konstantin Konstantin Buravcov (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: