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

Preprocessing failed JSONPath

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Commercial support required
    • Icon: Trivial Trivial
    • None
    • 4.2.7
    • API (A), Server (S)
    • Centos 7
    • Team A

      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.

            Unassigned Unassigned
            F Tatyana
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: