Ad Widget

Collapse

Zaabbix 6 [RC1 and BETA3] - HTTP-AGENT + JSONPATH + LLD Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eduwutzl
    Senior Member
    Zabbix Certified Specialist
    • Jul 2010
    • 314

    #1

    Zaabbix 6 [RC1 and BETA3] - HTTP-AGENT + JSONPATH + LLD Problem

    Happy Friday everyone, I'm using the latest version (RC1) of zabbix 6 in my lab environment.

    Debian 11.2, MariaDB + Galera Cluster, Zabbix 6 Clustered.




    I created a template with an http-agent item to query an API (laboratory). This API returns exactly this data.

    Code:
    {
    
    "data": [
    
    {
    
    "date": "2022-01-27",
    
    "confirmed": 96834,
    
    "deaths": 1861,
    
    "recovered": 0,
    
    "confirmed_diff": 302,
    
    "deaths_diff": 1,
    
    "recovered_diff": 0,
    
    "last_update": "2022-01-28 04:21:09",
    
    "active": 94973,
    
    "active_diff": 301,
    
    "fatality_rate": 0.0192,
    
    "region": {
    
    "iso": "BRA",
    
    "name": "Brazil",
    
    "province": "Acre",
    
    "lat": "-9.0238",
    
    "long": "-70.812",
    
    "cities": []
    
    }
    
    },



    So, the main item of this template, does not do any processing or pre-processing.

    Soon after, I did a low-level Discovery of the dependent type, querying the main item, without doing any pre-processing but mapping MACROS from LLD to -> {#PROVINCE} ->
    Code:
    $..province.first()



    And then creating an item inside the LLD of type Dependent by querying the first item (json) with the following structure. Name: {#PROVINCE} key: name.[{#PROVINCE}] Master Item: first item created in this template Next Tab: Preprocessing JSONPath: $.data[?(@.region.province == '{#PROVINCE1}')].region.province.first()




    In this environment version 6 (RC1 and BETA3) it does not create the items for the LLD, however in version 5.4.9 it works without giving any error. Did we find a BUG that should be reported in version 6 (RC1 and BETA3)?

    Eduardo Wutzl da Silva
    SRE Engenharia de Monitoração e Observabilidade
Working...