Details

    • Type: Change Request
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.0.1
    • Fix Version/s: None
    • Component/s: Frontend (F)
    • Labels:
    • Environment:
      Zabbix 4.0.0
      CentOS 7.0

      Description

      I need to search specific item and get another one. So I have created test json from example at http://jsonpath.com/ from https://www.zabbix.org/wiki/Testing_Of_Preprocessing

      <?php
      
      $data["firstname"] = "John";
      $data["lastName"] = "doe";
      $data["age"] = 26;
      $data["address"]["streetAddress"] = "naist street";
      $data["address"]["city"] = "Nara";
      $data["address"]["postalCode"] = "630-0192";
      $data["phoneNumbers"][0]["type"] = "iPhone";
      $data["phoneNumbers"][0]["number"] = "0123-4567-8888";
      $data["phoneNumbers"][1]["type"] = "home";
      $data["phoneNumbers"][1]["number"] = "0123-4567-8910";
      
      echo json_encode($data);
      ?>
      $.phoneNumbers[?(@.type=="iPhone")].number

      also created HTTP agent and one dependent item, and after all a got this:

      Item preprocessing step #1 failed: cannot extract value from json by path "$.phoneNumbers[?(@.type=="iPhone")].number": unsupported character in json path starting with: "[?(@.type=="iPhone")].number"

      Please add searh item support in JSONPath

        Attachments

          Activity

            People

            • Assignee:
              vmurzins Valdis Murzins
              Reporter:
              Rostislav Gutsycat
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: