[ZBX-5814] Incorrect error message for saving trigger with illegal trigger expression Created: 2012 Nov 06  Updated: 2017 May 30  Resolved: 2012 Dec 07

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

Type: Incident report Priority: Trivial
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: expressions
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

Error message incorrect when trigger expression contains line break. For example:

Incorrect trigger expression format "

{constant}={constant}

&

{constant}={constant}

&

{constant}={constant}

&

{constant}={constant}

&

{constant}={constant}

&

{constant}={constant}

". Check expression part starting from "

{test6:snmp.test1.last(0)}

=0&

{test6:snmp.test2.last(0)}

=0&

{test6:snmp.test3.last(0)}

=0&

{test6:snmp.test4.last(0)}

=0&

{test6:snmp.test5.last(0)}

=0&

{test6:snmp.test6.last(0)}

=0".
for trigger expression:

{test6:snmp.test1.last(0)}

=0&

{test6:snmp.test2.last(0)}

=0&

{test6:snmp.test3.last(0)}

=0&

{test6:snmp.test4.last(0)}

=0&\n

{test6:snmp.test5.last(0)}

=0&

{test6:snmp.test6.last(0)}

=0

where \n - new line break. Used here only for demonstration the problem.



 Comments   
Comment by richlv [ 2012 Nov 06 ]

and what is that error message ?

edit : as in, what's incorrect about the message ? i believe i figured it out, but it took some staring at the summary, and i'm still not 100% sure
dotneft Expression part does no start from line break, it starts from first symbol of trigger expression.

Comment by Alexander Vladishev [ 2012 Nov 07 ]

It will be fixed in trunk only.

Comment by Oleg Egorov (Inactive) [ 2012 Nov 12 ]

This issue actual not only for "enter", but also for the letters
Example:

{ZBX:11111.last(0)}

=i0&

{ZBX:11111.abschange(0)}

<0

Incorrect trigger expression format
Check expression part starting from "

{ZBX:11111.last(0)}

=i0&

{ZBX:11111.abschange(0)}

<0

Comment by Oleg Egorov (Inactive) [ 2012 Nov 12 ]

Under this ZBX will be fixed only line breaks

oleg.egorov RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-5814 r31407

sasha This change will not included in stable branches. CLOSED

Comment by Oleg Egorov (Inactive) [ 2012 Nov 13 ]

Sub issues will be fixed under this fix

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.

Comment by Tony den Haan [ 2013 Jul 03 ]

I ran into this on 2.0.3, so it has not been fixed. Not sure if it should simply remove linebreaks before parsing, or show proper error message.

Comment by Michael Brown [ 2015 Apr 21 ]

What's the status of this? Do newlines in trigger expressions throw an error still or are they stripped before parsing?

Comment by richlv [ 2016 Apr 08 ]

newlines were likely supported in 2.4, but documentation on that seems to be lacking - see ZBX-10636

Generated at Sat Apr 20 15:01:17 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.