Type: New Feature Request
Affects Version/s: 3.2.5
Fix Version/s: None
Component/s: Server (S)
Currently, a calculated item takes a formula in which you can reference another item (let's call it a source item) by specifying its key. See manual here : https://www.zabbix.com/documentation/3.4/manual/config/items/itemtypes/calculated
The syntax of the formula is :
The problem with that are :
- the key to reference the source item can be a long and complicated string of characters; some characters must be escaped. It makes formulas very difficult to read and it is a hell !
- if the source item's key changes, you have to manually reflect those changes manually into the calculated item. Come on ! Manually ...
- when you change the source item's key, you must disable the calculated item first otherwise it stays in some kind of error state and it's a misery to get it back even after fixing the formula.
- inconsistency creates confusion : when an item is part of a trigger expression, that trigger expression is automatically updated whenever an item changes. My assumption is that, internally, the trigger expression refers items by their unique item ID. Therefore when an item's name or key changes, there is no impact on the trigger. That's an inconsistent compared to the way calculated items work (as explained earlier)...
Proposed improvement: why not adopting an alternative syntax for calcultated item's formula that would take an item's refernce by its ID instead of key ?
Here is an example of a formula from a calulated item we have in our system:
not nodata("logrt[\"/stelink/bdl_scripts/FIXEngine/logs/^TSOX.log*\", \".*BLPSOX.incoming.*8=FIX.4.4.*35=(0|8|9|j|AE|J).*\"]", 120s)
in the future, the formula could be instead :
not nodata(itemID=86139, 120s)
(could be displayed as item's name as it is in the trigger expression editor, for instance)