[ZBX-10248] zabbix[host,,items] and zabbix[host,,items_unsupported] processed by server or proxy? Created: 2016 Jan 08 Updated: 2017 May 30 Resolved: 2016 Feb 29 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Proxy (P), Server (S) |
Affects Version/s: | 3.0.0alpha5 |
Fix Version/s: | 3.0.2rc1, 3.2.0alpha1 |
Type: | Incident report | Priority: | Minor |
Reporter: | Aleksandrs Saveljevs | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | notsupported | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
This issue is about the feature implemented under Unfortunately, it is unclear whether these items should be processed by server or proxy, and the specification at https://www.zabbix.org/wiki/Docs/specs/ZBXNEXT-2760 does not touch on the issue. For instance, we have the following function in dbconfig.c: /****************************************************************************** * * * Function: is_item_processed_by_server * * * * ... * * * * Comments: list of the items, always processed by server * * ,------------------+--------------------------------------, * * | type | key | * * +------------------+--------------------------------------+ * * | Zabbix internal | zabbix[host,,maintenance] | * * | Zabbix internal | zabbix[proxy,<proxyname>,lastaccess] | * * | Zabbix aggregate | * | * * | Calculated | * | * * '------------------+--------------------------------------' * * * ******************************************************************************/ Note that both items are not on the list. However, comments in checks_internal.c say that these items should be processed by Zabbix server: else if (0 == strcmp(tmp, "items")) /* zabbix["host",,"items"] */ { /* this item is always processed by server */ if (NULL != (tmp = get_rparam(&request, 1)) && '\0' != *tmp) { error = zbx_strdup(error, "Invalid second parameter."); goto out; } SET_UI64_RESULT(result, DCget_item_count(item->host.hostid)); } else if (0 == strcmp(tmp, "items_unsupported")) /* zabbix["host",,"items_unsupported"] */ { /* this item is always processed by server */ if (NULL != (tmp = get_rparam(&request, 1)) && '\0' != *tmp) { error = zbx_strdup(error, "Invalid second parameter."); goto out; } SET_UI64_RESULT(result, DCget_item_unsupported_count(item->host.hostid)); } In addition to this inconsistency, it is a bit unclear which daemon should process these items. On the one hand, they should be processed by proxy, because the proxy may be offline and at that time only proxy knows which items are currently supported and which are not. On the other hand, they should be processed by server, because calculated and aggregate items are not sent to proxy and so proxy does not know about them. |
Comments |
Comment by Oleksii Zagorskyi [ 2016 Jan 25 ] |
I'd leave to process them by server, as it's more correct approach. |
Comment by Andris Zeila [ 2016 Feb 16 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-10248 |
Comment by Aleksandrs Saveljevs [ 2016 Feb 16 ] |
How was it fixed? What was the logic behind the fix? wiper by executing zabbix[host,,items*] on server rather than proxy |
Comment by Aleksandrs Saveljevs [ 2016 Feb 23 ] |
(1) There is the following warning when compiled with clang: dbconfig.c:581:73: warning: '&&' within '||' [-Wlogical-op-parentheses] if (0 != strcmp(arg3, "maintenance") && 0 != strcmp(arg3, "items") && ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ dbconfig.c:581:73: note: place parentheses around the '&&' expression to silence this warning if (0 != strcmp(arg3, "maintenance") && 0 != strcmp(arg3, "items") && ^ 1 warning generated. asaveljevs RESOLVED in r58677. wiper Reviewed, thanks. |
Comment by Andris Zeila [ 2016 Feb 29 ] |
Released in:
|