-
Incident report
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
2.2.4
-
RHEL 5 and RHEL 6
Hello,
I have an LLD rule that discovers Oracle tablespaces and sets up two items prototypes (tablespace size and tablespace usage). This is working OK.
I need to compute the usage percentage, so I created a new item prototype with type "computed".
This is the formula I'm using:
100*last("oracle.tbs_free[\"{$MONUSER}\",\"{$MONPASS}\",\"{#ORASID}\",\"{#TBS}\"]",0)/last("oracle.tbs_size[\"{$MONUSER}\",\"{$MONPASS}\",\"{$ORASID}\",\"{#TBS}\"]",0)
I see that {#ORASID} and {#TBS} correctly get replaced with their values but {$MONUSER} and {$MONPASS} don't, so the item doesn't get populated (generates "cannot evaluate function last error.
According to the documentation they should be replaced:
https://www.zabbix.com/documentation/2.4/manual/config/items/itemtypes/calculated
"User macros in the formula will be expanded if used to reference a parameter or a constant.
User macros will NOT be expanded if used to reference a function, host name, item key or operator."
I'm not sure if this is a duplicate of this other, now closed, issue: ZBX-5540.
Thanks!
Gabriele Paggi