Hello, I want to ask for help. I tried a lot, including the Chatgpt. Many tests but I am still not able to crack this simple problem.
I have script on server what return JSON Array like this:
I create the host and Item "Capsman data" as the key I use
I created the discovery rule "Cap interface discovery" and set it as a Dependent item on the previously created Item. As a key I use
but I am not able to find a solution to create item prototypes right.
If I create the Item prototype with name: Cap clients for {#CAP} it create the Items with valid name but I do not know what set to type and key to fill the #NOC as the Item value.
The result should be to create Item with name "Cap clients for {#CAP}" and the item values should be the value from {#NOC}
Thanks for any help.
I have script on server what return JSON Array like this:
Code:
[{"{#CAP}": "AP-07-1", "{#NOC}": 4}, {"{#CAP}": "AP-12-1", "{#NOC}": 4}, {"{#CAP}": "AP-08-1", "{#NOC}": 5}, {"{#CAP}": "cap8", "{#NOC}": 10}, {"{#CAP}": "AP-10-1", "{#NOC}": 4}, {"{#CAP}": "AP-09-1",
"{#NOC}": 5}, {"{#CAP}": "Office-AP01-1", "{#NOC}": 2}]
Code:
system.run[python3 /home/zabbix/zabbix_capsman_interfaces.py {$CAPS_HOST} {$CAPS_USER} {$CAPS_PASS}]
Code:
capsman.discovery[{#CAP}]
If I create the Item prototype with name: Cap clients for {#CAP} it create the Items with valid name but I do not know what set to type and key to fill the #NOC as the Item value.
The result should be to create Item with name "Cap clients for {#CAP}" and the item values should be the value from {#NOC}
Thanks for any help.
Comment