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

Preprocessing failed JSONPath

    XMLWordPrintable

    Details

    • Type: Problem report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Commercial support required
    • Affects Version/s: 4.2.7
    • Fix Version/s: None
    • Component/s: API (A), Server (S)
    • Labels:
    • Environment:
      Centos 7
    • Team:
      Team A

      Description

      Hello!

      I am unable to perform preprocessing with JSONPath.
      My preprocessing JSONPath with a comparison operation - $.data.result[0].metric.container_label_com_docker_swarm_task_name =~ ".*"
      I want get 2 "container_label_com_docker_swarm_task_name" which in this case is efk_fluentd.1 and nexus_nexus.1 for LLD

      My Json data:

      _{ 
         "status":"success",
         "data":{ 
            "resultType":"vector",
            "result":[ 
               { 
                  "metric":{ 
                     "__name__":"fluentd",
                     "instance":"10.0.3.18:9308",
                     "job":"fluentd_exporter",
                     "container_label_com_docker_swarm_task_name":"efk_fluentd.1"
                  },
                  "metric":{ 
                     "__name__":"nexus",
                     "instance":"10.0.3.18:9308",
                     "job":"nexus_exporter",
                     "container_label_com_docker_swarm_task_name":"nexus_nexus.1"
                  },
                  "value":[ 
                     1580296145.761,
                     "3"
                  ]
               }
            ]
         }
      }_
      

      I get an error:

      Preprocessing failed for: {"status":"success","data":{"resultType":"vector","result":[{"metric":{"name_":"container_memo...
      1. Failed: cannot extract value from json by path "$.data.result[0].metric.container_label_com_docker_swarm_task_name =~ "."": unsupported construct in jsonpath starting with: " =~ ".""_
      For this setting, I followed the official Zabbix documentation.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            F Tatyana
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: