Source
/*
** Zabbix
** Copyright (C) 2001-2023 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.
**/
typedef struct
{
zbx_uint64_t history_counter; /* the total number of processed values */
zbx_uint64_t history_float_counter; /* the number of processed float values */
zbx_uint64_t history_uint_counter; /* the number of processed uint values */
zbx_uint64_t history_str_counter; /* the number of processed str values */
zbx_uint64_t history_log_counter; /* the number of processed log values */
zbx_uint64_t history_text_counter; /* the number of processed text values */
zbx_uint64_t history_bin_counter; /* the number of processed bin values */
zbx_uint64_t notsupported_counter; /* the number of processed not supported items */
}
zbx_dc_stats_t;
/* the write cache statistics */
typedef struct
{
zbx_dc_stats_t stats;
zbx_uint64_t history_free;
zbx_uint64_t history_total;
zbx_uint64_t index_free;
zbx_uint64_t index_total;
zbx_uint64_t trend_free;
zbx_uint64_t trend_total;
}
zbx_wcache_info_t;
void zbx_sync_history_cache(const zbx_events_funcs_t *events_cbs, int *values_num, int *triggers_num, int *more);
void zbx_log_sync_history_cache_progress(void);
typedef void (*zbx_history_sync_f)(int *values_num, int *triggers_num, const zbx_events_funcs_t *events_cbs, int *more);
int zbx_init_database_cache(zbx_get_program_type_f get_program_type, zbx_history_sync_f sync_history,