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

LLD macros jsonpath doesn't work as expected

XMLWordPrintable

    • Prev.Sprint, S24-W34/35
    • 0.25

      when creating a discovery rule based on a http item i encounter weird behaviour

      the LLD macro filter doesnt map the correct data from the json part to the macro

      this is the data from the http item

      {
        "data": [
          {
            "type": "storageUnit",
            "id": "Tapes_LTO8",
            "attributes": {
              "name": "Tapes_LTO8",
              "storageType": "Tape",
              "storageSubType": "Basic",
              "storageCategory": "TAPE",
              "okOnRoot": false,
              "stageData": false,
              "useAnyAvailableMediaServer": false,
              "accelerator": false,
              "replicationCapable": false,
              "replicationSourceCapable": false,
              "replicationTargetCapable": false,
              "snapshot": false,
              "mirror": false,
              "independent": false,
              "primary": false,
              "instantAccessEnabled": false,
              "isCloudSTU": false,
              "freeCapacityBytes": -1,
              "totalCapacityBytes": -1,
              "usedCapacityBytes": -1,
              "mediaServerDetails": [
                {
      .........

       

      using the filter "$.data[*].id" will return me a list of all the ID's in a json query tester like this :

       
      [
      "Tapes_LTO8",
      "dd_6900_sma_stu",
      "media02_bdisk_stu",
      "media_msdp_stu",
      "media01_bdisk_stu",
      "dd_6900_atr_stu"
      ]
      however it doesn't work, in zabbix to get the same result i need to use:
       
      $..id
       
      It doesn't make sense to me.
      Is this a bug ? or is Zabbix doing something with the data that is not in the documentation ?
       
      https://www.zabbix.com/documentation/current/en/manual/discovery/low_level_discovery#custom-macros

            martins-v Martins Valkovskis
            patrik patrik uytterhoeven
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: