[ZBX-9005] aggregate item documentation uses old trigger function syntax Created: 2014 Nov 06 Updated: 2017 May 30 Resolved: 2014 Nov 25 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F), Server (S) |
Affects Version/s: | None |
Fix Version/s: | 2.5.0 |
Type: | Incident report | Priority: | Minor |
Reporter: | richlv | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | aggregate, usability | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/aggregate it shows using "0" as a parameter for function last() - that should not be required since 2.2.0 as per also, note "The timeperiod parameter is ignored by the server if the third parameter (item function) is last." should be reviewed - is that still the case ? |
Comments |
Comment by Martins Valkovskis [ 2014 Nov 13 ] |
sasha had a look at the code and apparently the new syntax is not supported in aggregate checks (on server side). So no change to documentation at this point. |
Comment by Alexander Vladishev [ 2014 Nov 13 ] |
Server side and frontend should be fixed to support aggregate checks without fourth parameter for function last(). Now the fourth parameter is mandatory. |
Comment by Igors Homjakovs (Inactive) [ 2014 Nov 19 ] |
Fixed in svn://svn.zabbix.com/branches/dev/ZBX-9005 |
Comment by Aleksandrs Saveljevs [ 2014 Nov 19 ] |
(1) Please review r50669. It fixes error message for non-"last" functions without a parameter: else if (3 == params_num && ZBX_VALUE_FUNC_LAST != item_func) { - SET_MSG_RESULT(result, zbx_strdup(NULL, "Invalid forth parameter.")); + SET_MSG_RESULT(result, zbx_strdup(NULL, "Invalid number of parameters.")); goto out; } igorsh Thank you. Looks good. CLOSED. |
Comment by Aleksandrs Saveljevs [ 2014 Nov 19 ] |
(2) In get_value_aggregate(), variable "funcp" is not initialized for function "last". The server can crash in a further call to zabbix_log() in evaluate_aggregate(). igorsh RESOLVED in r50685. asaveljevs Creating an artificial argument of "0" might be a bit hackish, changed "funcp" to be initialized to NULL in r50696. RESOLVED. igorsh Thank you. Looks good. CLOSED. |
Comment by Aleksandrs Saveljevs [ 2014 Nov 19 ] |
(3) This is not entirely related to this issue, but the following check and the message contradict each other: // type of information if ($fullItem['type'] == ITEM_TYPE_AGGREGATE && $fullItem['value_type'] != ITEM_VALUE_TYPE_FLOAT && $fullItem['value_type'] != ITEM_VALUE_TYPE_UINT64) { self::exception(ZBX_API_ERROR_PARAMETERS, _('Type of information must be "Numeric (float)" for aggregate items.')); } igorsh RESOLVED in r50685. asaveljevs Your suggestion was to change "Numeric (float)" to "Numeric". However, it seems that the explicit listing "Numeric (unsigned)" and "Numeric (float)" might be better, because these are the available options in the dropdown. RESOLVED in r50696. igorsh Thank you. Looks good. CLOSED. |
Comment by Aleksandrs Saveljevs [ 2014 Nov 20 ] |
(4) As per https://www.zabbix.org/wiki/Docs/specs/development_guidelines#Working_with_an_issue , we have to list changed strings. This development changes Type of information must be "Numeric (float)" for aggregate items. to Type of information must be "Numeric (unsigned)" or "Numeric (float)" for aggregate items. igorsh CLOSED. |
Comment by Alexander Vladishev [ 2014 Nov 21 ] |
(5) The code is incorrectly formatted
if (3 > params_num || 4 < params_num)
igorsh RESOLVED in r50711. sasha Thanks! CLOSED asaveljevs In this case the value was checked for being outside of certain bounds, but OK. |
Comment by Igors Homjakovs (Inactive) [ 2014 Nov 21 ] |
(6) Documentation has to be updated. igorsh RESOLVED in asaveljevs In "What's new", it might be better to move aggregate item improvement from "6.2 Daemon improvements" to "6.5 Item changes/improvements". asaveljevs On the aggregate item page, the possibility to omit the fourth argument for third argument "last" is introduced before the possible options for third argument are listed and the meaning of the fourth argument is described. It might be reasonable to do it after (perhaps, by resurrecting the note) and also note that it is available since Zabbix 3.0.0. REOPENED. igorsh RESOLVED. asaveljevs In "What's new", I have replaced "groupfunc item" with "aggregate items", because the mention of "groupfunc" as a general placeholder for "grpsum", "grpavg", etc. only exists in documentation and it might not be apparent what it refers to. asaveljevs On the aggregate item page, I have fixed some style and a typo ("ommited" -> "omitted"). Please review. RESOLVED. igorsh CLOSED. |