Source
zbx_json_addfloat(json, "pitems", (0 == total ? 0 : (double)tcache_stats.items_num / total * 100));
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/******************************************************************************
* *
* Purpose: get program type (server) specific internal statistics *
* *
* Parameters: param1 - [IN/OUT] the json data *
* *
* Comments: This function is used to gather server specific internal *
* statistics. *
* *
******************************************************************************/
void zbx_get_zabbix_stats_ext(struct zbx_json *json)
{
zbx_vc_stats_t vc_stats;
zbx_uint64_t queue_size;
char *value, *error = NULL;
zbx_tfc_stats_t tcache_stats;
/* 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[triggers] */
zbx_json_adduint64(json, "triggers", DCget_trigger_count());
/* zabbix[vcache,...] */
if (SUCCEED == zbx_vc_get_statistics(&vc_stats))