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

JSON / JSONPATH escaped value causing unsupported construct in jsonpath

XMLWordPrintable

      Steps to reproduce:

      1. Go to item preprocessing and enter JSONPath.
      2. Use parameter
      $.value.['{#JMXOBJ}']
      
      1. Use value:
        {
          "value":{
            "name=\"PC|Ernesto\" enabled":"5"
          }
        }
        
      1. In test section use macro JMXOBJ as
      name=\"PC|Ernesto\" enabled
      

      Result:
      **

      cannot extract value from json by path 
      "$.value.['name=\"PC|Ernesto\" enabled']": unsupported construct in 
      jsonpath starting with: "\"PC|Ernesto\" enabled']"
      

      Expected:
      5

      The beginning of the issue is that I am collecting JMX attributes as JSON

              {
                  "{#JMXVALUE}":"5",
                  "{#JMXTYPE}":"java.lang.Integer",
                  "{#JMXOBJ}":"name=\"PC|Ernesto\" enabled",
                  "{#JMXDESC}":"Attribute exposed for management",
                  "{#JMXATTR}":"Value"
              },
      

       

      The {#JMXOBJ} is escaped by default.  There is no way to unescape it when giving it to item prototype.

            zabbix.dev Zabbix Development Team
            yurtesen Evren Yurtesen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: