[ZBX-10933] API "trigger.update" - updateReal() issue Created: 2016 Jun 23  Updated: 2017 May 30  Resolved: 2016 Jun 30

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: None
Fix Version/s: 2.2.14rc1

Type: Incident report Priority: Blocker
Reporter: Kim Jongkwon Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: API, triggers
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix 2.2.4, Zabbix 2.2.11



 Description   

api/classes/CTrigger.php : updateReal()
$expressionChanged (and $descriptionChanged) are does not initialize or incorrectly initializes

There is a possibility 'trigger.update' API issue.
Zabbix 3.0.3 Can't Reproduce a problem. ZBX-10226 (r57799) is related to this matter. <- 2.2 needed this fix too

Steps to reproduce (Zabbix 2.2.4, 2.2.11)

1. Create this triggers on frontend page :

'triggerid' => '13567', 'description' : 'Threshold-Over_HDD-/_Usage :Critical' , 'expression' => '{HOST:vfs.fs.size[/,pused].count(#3,90,"ge")}=2'
'triggerid' => '13568', 'description' : 'Threshold-Over_HDD-/_Usage :Warning'  , 'expression' => '{HOST:vfs.fs.size[/,pused].count(#3,70,"ge")}=2'
'triggerid' => '13569', 'description' : 'Threshold_HDD-/_Usage :Critical-line' , 'expression' => '{HOST:vfs.fs.size[/,pused].last(0)}>90'       
'triggerid' => '13570', 'description' : 'Threshold_HDD-/_Usage :Warning-line'  , 'expression' => '{HOST:vfs.fs.size[/,pused].last(0)}>70'       

2. Using "trigger.update" via API :

'triggerid' => '13567', 'description' => 'Threshold-Over_HDD-/_Usage :Critical' , 'expression' => '{HOST:vfs.fs.size[/,pused].count(#2,90,"ge")}=3'
'triggerid' => '13568', 'description' => 'Threshold-Over_HDD-/_Usage :Warning'  , 'expression' => '{HOST:vfs.fs.size[/,pused].count(#2,70,"ge")}=3'
'triggerid' => '13569', 'description' => 'Threshold_HDD-/_Usage :Critical-line' , 'expression' => '{HOST:vfs.fs.size[/,pused].last(0)}>90'         
'triggerid' => '13570', 'description' => 'Threshold_HDD-/_Usage :Warning-line'  , 'expression' => '{HOST:vfs.fs.size[/,pused].last(0)}>70'         

3. And this expressions result (WRONG) :

Threshold-Over_HDD-/_Usage :Critical	{HOST:vfs.fs.size[/,pused].count(#2,90,"ge")}=3
Threshold-Over_HDD-/_Usage :Warning		{HOST:vfs.fs.size[/,pused].count(#2,70,"ge")}=3
Threshold_HDD-/_Usage :Critical-line	{HOST:vfs.fs.size[/,pused].count(#2,70,"ge")}=3
Threshold_HDD-/_Usage :Warning-line		{HOST:vfs.fs.size[/,pused].count(#2,70,"ge")}=3


 Comments   
Comment by Alexander Vladishev [ 2016 Jun 26 ]

Related issue: ZBX-10226.

Comment by Gunars Pujats (Inactive) [ 2016 Jun 29 ]

(1) No translation strings changed.

sasha CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Jun 29 ]

RESOLVED in development branch svn://svn.zabbix.com/branches/dev/ZBX-10933

Comment by Alexander Vladishev [ 2016 Jun 30 ]

This bug affects only 2.2 branch and trigger.update() method.

Comment by Gunars Pujats (Inactive) [ 2016 Jun 30 ]

Fixed in:

  • pre-2.2.14rc1 r60831
Comment by Gunars Pujats (Inactive) [ 2016 Jun 30 ]

(2) Documentation:

sasha CLOSED

Generated at Fri Apr 26 12:21:46 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.