Answer the question
In order to leave comments, you need to log in
How to make a dependent item in Zabbix LLD (multi-level JSON)?
How to correctly create a dependent element in Zabbix in low-level discovery and read data from JSON?
Here is an example structure:
{
"host": "MR4",
"data": [
{
"{#PROC}": "VIP1_iP11",
"data": [
{
"{#CENCNs}": "CENCN1"
},
{
"{#CENCNs}": "CENCN2"
}
]
},
{
"{#PROC}": "VIP2_iP12"
}
]
}
Answer the question
In order to leave comments, you need to log in
Divide the LLD autodiscovery queries into two different ones, in one you return the top-level objects {#PROC} and only them, in the second you return the list {#CENCN} by the PROC object identifier. Next, along with the prototype of the found PROC object, write the LLD auto-discovery prototype, in which you specify query number two for the search and the prototype of the {#CENCN} element from its results.
Dependent objects in Zabbix mean a slightly different object - for example, if there is a request for the full state of an object that returns data in JSON, Zabbix can store this JSON as text, and by its value you can create dependent objects using the state value as the original and JSON- a transformation like $.path[index].subpath of the required configuration to pull the value from this JSON. In addition, it is possible to convert values with the second (next) preprocessor, for example, decrypt it from the state number, a la 2 - "running".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question