[ZBX-13236] ZBX-11411 prevents ability to use items with macro parameters in calculated items Created: 2017 Dec 21  Updated: 2024 Apr 10  Resolved: 2018 Mar 25

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 3.0.12
Fix Version/s: 3.0.16rc1, 3.4.8rc1, 4.0.0alpha5, 4.0 (plan)

Type: Incident report Priority: Major
Reporter: Raymond Kuiper Assignee: Michael Veksler
Resolution: Fixed Votes: 2
Labels: aggregate, usermacros
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Causes
caused by ZBX-11411 Missing check macro value in formula ... Closed
Duplicate
is duplicated by ZBX-13548 lld rule for log items no longer work... Closed
Team: Team C
Sprint: Sprint 27, Sprint 28, Sprint 30
Story Points: 1

 Description   

When using aggregate items that use usermacros to create a new calculated item, the input validation of ZBX-11411 prevents the evaluation of such items:

Using the following configuration:
Marco {$I_AGGR_GROUPNAME}: Routers
Formula: last("grpsum[\"{$I_AGGR_GROUPNAME}\",\"cell.int.usage[monthly]\",last"])/last("CellDataBundleSize")*100

We get the error: "Macro {$I_AGGR_GROUPNAME} value is not numeric"

This is probably true for other items that are using macros as parameters as well.



 Comments   
Comment by Olegs Vasiljevs (Inactive) [ 2017 Dec 28 ]

Hello Raymond!

Marking as approved as per the discussion made in ZBX-2866.

Regards,
Oleg

Comment by Aleksejs Petrovs [ 2018 Jan 02 ]

Hello Raymond,

Could you please try this one:

last("grpsum[\"{$I_AGGR_GROUPNAME}\",\"cell.int.usage[monthly]\",last]")/last("CellDataBundleSize")*100

as with help of additional eyes - I've found that you have " in the wrong place.

Could you please try this one and report if everything is fine?

Regards,
Aleksejs!

Comment by Sergejs Paskevics [ 2018 Jan 29 ]

Succesfully tested.

Comment by Raymond Kuiper [ 2018 Feb 01 ]

Sorry, I've missed the update. Your version seems to work, Aleksejs!
Tested on Zabbix 3.0.12.

Thanks for the feedback

Comment by Michael Veksler [ 2018 Feb 26 ]

Available in:

  • 3.0.16rc1 r78043
  • 3.4.8rc1 r78049
  • 4.0.0alpha5 (trunk) r78054
Generated at Fri Apr 26 12:16:01 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.