Hi,
I'm on Zabbix 5.0 and I'm trying to use a LLD macro in calculated item prototype formula like this.
1. First I have a rather simple calculated item with the key "calculated.ldap.services", which returns a float representing the states of the LDAP services on a the host. 1 means they are all ok, less than 1 means that some of them are down.
2. Then I created a discovery rule which is an external check that gives the following json (I've changed the real values for security issue) :
3. Then, I have a calculated item protoype named "Sum of the LDAP services states on the active/passive couple {#NOMSERVEUR}/{#TMOVAL2}" in english with the key "ldap.pra.[{#NOMSERVEUR}]" and with the following formula, where {#TMOVAL2} is the backup host :
The LLD macros seem to be correctly interpreted in the name or the key of the item prototype, but not in the formula since I have this error :
Yet, the documentation of Zabbix 5.0 says the LLD macros are supported in calculated item formula (see attachment)
Can you explain why this isn't working please ?
A test calculated item on one of the hosts with the following formula returns the desired value by the way :
I'm on Zabbix 5.0 and I'm trying to use a LLD macro in calculated item prototype formula like this.
1. First I have a rather simple calculated item with the key "calculated.ldap.services", which returns a float representing the states of the LDAP services on a the host. 1 means they are all ok, less than 1 means that some of them are down.
2. Then I created a discovery rule which is an external check that gives the following json (I've changed the real values for security issue) :
Code:
[{"{#NOMINST}":"XXXXXX","{#NOMSERVEUR}":"masterserver.krj.gie","{#NOMLOG}":"ForgeRock DS Ldap","{#VERLOG}":"ForgeRock DS Ldap 7.1","{#ENV}":"D","{#OS}":"Red Hat Entreprise Linux","{#TMOVAL1}":"55555","{#TMOVAL2}":"backupserveur.krj.gie","{#TMOVAL3}":"XXXXXX","{#TMOVAL4}":"","{#TMOVAL5}":"","{#COULOIR}":""}]
Code:
last("{#NOMSERVEUR}:calculated.ldap.services")+last("{#TMOVAL2}:calculated.ldap.services")
The LLD macros seem to be correctly interpreted in the name or the key of the item prototype, but not in the formula since I have this error :
Code:
[COLOR=#c0392b]Cannot update item, error in formula: Invalid first parameter "{#NOMSERVEUR}:calculated.ldap.services".[/COLOR]
Can you explain why this isn't working please ?
A test calculated item on one of the hosts with the following formula returns the desired value by the way :
Code:
last("masterserver.krj.gie:calculated.ldap.services")+last("backupserveur.krj.gie:calculated.ldap.services")
Comment