Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10933

API "trigger.update" - updateReal() issue

    XMLWordPrintable

Details

    • Incident report
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 2.2.14rc1
    • API (A)
    • 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
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            JKKim Kim Jongkwon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: