[ZBXNEXT-6954] New macros for debugging trigger expressions Created: 2021 Sep 28  Updated: 2024 Aug 30  Resolved: 2021 Nov 08

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: 6.0.0alpha6, 6.0 (plan)

Type: New Feature Request Priority: Trivial
Reporter: Rostislav Palivoda Assignee: Dmitrijs Goloscapovs
Resolution: Fixed Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot from 2022-01-11 11-38-10.png     PDF File ✅ ACC_ New macros for trigger expressions - v1.0.pdf    
Issue Links:
Causes
causes ZBX-25141 {FUNCTION.VALUE<1-9>} → Event names Closed
caused by ZBXNEXT-3008 add macro {FUNCTION.VALUE<1-9>} to ca... Closed
Team: Team A
Sprint: Sprint 80 (Sep 2021), Sprint 81 (Oct 2021), Sprint 82 (Nov 2021)
Story Points: 3

 Description   

Currently, Zabbix doesn't provide good ways to debug trigger expression nor to put parts of trigger expression in alert messages in a convenient and unified way. There are some half-measures, such as {ITEM.VALUE}, default operational data or expression macros but these require additional efforts to deal with.

Zabbix must provide a convenient way to access an evaluated trigger expression or its parts.



 Comments   
Comment by Alexei Vladishev [ 2021 Oct 18 ]

This functionality is coming in Zabbix 6.0 soon. New macros {FUNCTION.VALUE<N>} and {TRIGGER.EXPRESSION.EXPLAIN} will be supported.

Comment by Dmitrijs Goloscapovs [ 2021 Oct 22 ]

Available in versions:

Documentation updated:

Comment by Dimitri Bellini [ 2022 Jan 11 ]

Hi Guys,
I have played with this new feature (very useful!) but something is not working as "I'm expected".

Trigger Expression: (last(/test2/item.test1) + last(/test2/item.test2)) > {$MYMACRO}
Event Name: Trg exp: {TRIGGER.EXPRESSION.EXPLAIN} - Trg fn1: {FUNCTION.VALUE1} - Trg fn2: {FUNCTION.VALUE2}

Problem View during an event:

The User MACRO is not expanded, is my fault?
I think is very useful to also see an optional User MACRO defined inside the Trigger Expression.
Thanks so much

Comment by Dimitri Bellini [ 2022 Feb 11 ]

Hi DevTeam,
the problem of "No expanded" USER MACRO is still present on 6.0rc2.
Thanks so much

Generated at Mon May 05 08:55:47 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.