[ZBX-4247] Error when trigger expression item key contain another trigger expression string Created: 2011 Oct 17  Updated: 2017 May 30  Resolved: 2012 Dec 07

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.8.8, 1.9.6 (beta)
Fix Version/s: 1.8.16rc1, 2.0.4rc1, 2.1.0

Type: Incident report Priority: Major
Reporter: Alexey Fukalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: expressions, triggers
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

It is not possible to save the following trigger expression:

{my replace template:agent.ping.last(0)}

=0 | {my replace template:log["

{my replace template:agent.ping.last(0)}

"].last(0)}=0

Error:

Incorrect trigger expression format "

{constant}={constant}

| {my replace template:log["

{constant}"].last({constant}

)}=

{constant}

" Check expression part starting from "

{my replace template:agent.ping.last(0)}

=0 | {my replace template:log["

{my replace template:agent.ping.last(0)}

"].last(0)}=0 " [CTrigger.update -> CTrigger.checkInput]



 Comments   
Comment by Alexei Vladishev [ 2012 Sep 07 ]

It should be added to regression tests.

Comment by Alexey Fukalov [ 2012 Sep 19 ]

dev branch: svn://svn.zabbix.com/branches/dev/ZBX-4247

Comment by Toms (Inactive) [ 2012 Sep 27 ]

(1) There is problem with multibyte string in trigger expressions. Expression

{my replace template:log["āšē"].last(0)}

=0 gives "Incorrect trigger expression format" error while

{my replace template:log["ase"].last(0)}

=0 does not

Vedmak RESOLVED in r30383

tomtom CLOSED

Comment by Toms (Inactive) [ 2012 Sep 27 ]

TESTED

Comment by Alexey Fukalov [ 2012 Oct 04 ]

Fixed in 2.0.4rc1 r30533, pre-2.1.0 r30534.

Comment by Alexander Vladishev [ 2012 Nov 05 ]

Stay reproducible in latest 2.0 r31248.

Steps to reproduce:

  • add two items:
    • item
    • item[ {host:item.last(0)}
  • add trigger with expression
    {host:item.last(0)}=0 | {host:item[{host:item.last(0)}].last(0)}=0
  • we have incorrect trigger expression in the DB:
    {13123}=0 | {host:item[{13123}].last(0)}=0
Comment by Alexander Vladishev [ 2012 Nov 23 ]

Fixed in pre-1.8.16 r31955, pre-2.0.4 r31650 and pre-2.1.0 r31649.

Generated at Thu Apr 25 06:39:10 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.