Ad Widget

Collapse

discovery rule with multiple structures in it. Can that work? (v5.0.16)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ik_zelf
    Member
    • Feb 2015
    • 60

    #1

    discovery rule with multiple structures in it. Can that work? (v5.0.16)

    Hi all, II am a bit confused about LLD macros that I would like to get from this json:
    Code:
    {"data":
    {
    "tenants": [ {"name": ""}, {"name": "t1"} ],
    "backups": [
    {
    "type": "full",
    "name": "db1",
    "tenant": ""
    },
    {
    "type": "incr",
    "name": "db1",
    "tenant": ""
    },
    {
    "type": "full",
    "name": "db2",
    "tenant": ""
    },
    {
    "type": "full",
    "name": "db3",
    "tenant": "t1"
    }
    ]
    }
    }
    is this structure even usable for zabbix discovery?
    I want to generate 2 items using the tenants structure. How should I address them in the LLD macro's JSONPath ?
    and I also want to generate items for the backups structure, in this case 4.

    When I address for example: $.data.tenants.name I get exactly 0 items generated. Also no error on the ldd rule.
    The same with $.data.tenants[*].name

    when the json is valid: no errors in the proxy and no errors in the zabbix server log

    Feeling a bit lost, hoping for a pointer, a similar example maybe?

    My goal is to generate items that get fed using a dependent item per tenant. So the tenant raw should be generated and the generated backup items will become depends of the tenant raw prototype.

    If it is possible to select the unique tenants from the backups structure, that would also help.
    Last edited by ik_zelf; 21-01-2022, 12:44.
Working...