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

zabbix[host,,items] and zabbix[host,,items_unsupported] processed by server or proxy?

XMLWordPrintable

      This issue is about the feature implemented under ZBXNEXT-2760. It introduced two new items: ''zabbix[host,,items]'' and ''zabbix[host,,items_unsupported]''.

      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.

            Unassigned Unassigned
            asaveljevs Aleksandrs Saveljevs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: