[ZBXNEXT-3904] calculated item formula: reference source item by ID instead of key Created: 2017 May 31  Updated: 2017 Dec 19

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: 3.2.5
Fix Version/s: None

Type: New Feature Request Priority: Major
Reporter: itcbsops Assignee: Unassigned
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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 :
func(<key>|<hostname:key>,<parameter1>,<parameter2>,...)

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)



 Comments   
Comment by Glebs Ivanovskis (Inactive) [ 2017 May 31 ]

May be considered a duplicate of ZBXNEXT-3441 and ZBXNEXT-3444.

Comment by richlv [ 2017 May 31 ]

the user-visible formula should not use item ids, but the internal representation might. as mentioned, it would be somewhat similar to triggers then. ZBXNEXT-3441 glebs.ivanovskis mentioned might make it possible (current syntax might be hard to handle)

Comment by itcbsops [ 2017 May 31 ]

none of the two duplicate this ticket, though it looks like a duplicate of ZBX-5857, which is closed.
I would like to challenge that.

Comment by itcbsops [ 2017 May 31 ]

I agree with richlv : the item ID should be used internally. Right now it's not. It is free text. Which is silly.
If you've got a lot of calculated items, it's a catastrophe to handle.
This needs to be improved.

Comment by itcbsops [ 2017 Dec 19 ]

Hi,

Any progress on this Jira ?
The fact that calculated items use source item's keys are reference is a pain.
We have a huge quantity of items and we have calculated items. Each time we change an item key, it will make the calculated item fail.
The link between a source item and a calculated item should be the unique ID of the source item. Not the Key.
Please address this.

Comment by Glebs Ivanovskis (Inactive) [ 2017 Dec 19 ]

No, no progress. As you see at the moment there are literally zero votes on this issue. Bringing more votes and/or sponsorship may draw some attention to the problem.

Generated at Wed Apr 24 14:24:45 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.