Source
zbx_json_addfloat(json, "pitems", (0 == total ? 0 : (double)tcache_stats.items_num / total * 100));
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/******************************************************************************
* *
* Purpose: gets program type (server) specific internal statistics *
* *
* Parameters: json - [IN/OUT] *
* arg - [IN] anonymous argument provided by register *
* *
* Comments: This function is used to gather server specific internal *
* statistics. *
* *
******************************************************************************/
void zbx_server_stats_ext_get(struct zbx_json *json, const void *arg)
{
zbx_vc_stats_t vc_stats;
zbx_uint64_t queue_size, connector_queue_size;
char *value, *error = NULL;
zbx_tfc_stats_t tcache_stats;
ZBX_UNUSED(arg);
/* zabbix[lld_queue] */
if (SUCCEED == zbx_lld_get_queue_size(&queue_size, &error))
{
zbx_json_adduint64(json, "lld_queue", queue_size);
}
else
{
zabbix_log(LOG_LEVEL_WARNING, "cannot get LLD queue size: %s", error);
zbx_free(error);
}
/* zabbix[connector_queue] */
if (SUCCEED == zbx_connector_get_queue_size(&connector_queue_size, &error))
{
zbx_json_adduint64(json, "connector_queue", queue_size);
}
else
{
zabbix_log(LOG_LEVEL_DEBUG, "cannot get connector queue size: %s", error);