[ZBX-12270] Zabbix agent item key system.stat[ent] cannot end successful Created: 2017 Jun 09  Updated: 2017 Aug 04  Resolved: 2017 Aug 04

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 2.2.18, 3.2.6
Fix Version/s: 2.2.20rc1, 3.0.11rc1, 3.2.8rc1, 3.4.0alpha2, 3.4 (plan)

Type: Problem report Priority: Major
Reporter: Marc Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: aix, items, patch, system.stat
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

AIX


Attachments: Text File SystemStatEnt.patch    
Issue Links:
Duplicate
is duplicated by ZBX-12454 Don't work item key system.stat[ent] Closed
Team: Team A
Sprint: Sprint 10, Sprint 11, Sprint 12
Story Points: 3.4

 Description   

Here we have two condition blocks. The first one to handle system.stat item keys with a single argument only (exclusively "ent" right now). The second condition block is to handle all related item keys having two arguments.
The problem is, that even if everything went well for the single argument item key in the first condition block, the second block is still run through. Since "ent" does not exist as valid first argument here, we end up in the else clause returning an error:

        [...]
        if (0 == strcmp(section, "ent"))
        {
                        [...]
                        SET_DBL_RESULT(result, collector->vmstat.ent);
        }
        [...]
        
        if (0 == strcmp(section, "kthr"))
        [...]
        else
        {
                SET_MSG_RESULT(result, zbx_strdup(NULL, "Invalid first parameter."));
                return SYSINFO_RET_FAIL;
        }

        return SYSINFO_RET_OK;
}

PS: The issue is likely existent in other releases as well.

PPS: this issue might duplicate ZBX-3049 resp. ZBX-5186. Feel free to close it as such, if this is the case.



 Comments   
Comment by Andris Mednis [ 2017 Jul 12 ]

Fixed in development branch:

  • svn://svn.zabbix.com/branches/dev/ZBX-12270 (for 2.2)
  • svn://svn.zabbix.com/branches/dev/ZBX-12270-30 (for 3.0)

For 3.2 and 3.4 (trunk) the fix for 3.0 can be applied without conflicts.

Comment by Vladislavs Sokurenko [ 2017 Jul 13 ]

Successfully reviewed.

Comment by Andris Mednis [ 2017 Jul 18 ]

Available in versions:

  • pre-2.2.20rc1 r70319
  • pre-3.0.11rc1 r70321
  • pre-3.2.8rc1 r70323
  • pre-3.4.0alpha2 (trunk) r70325
Comment by Andris Mednis [ 2017 Jul 18 ]

No documentation updates required.

Generated at Thu Mar 28 23:55:02 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.