Source
static void proxy_get_history_data_simple(struct zbx_json *j, const char *proto_tag, const zbx_history_table_t *ht,
/*
** 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.
**/
extern char *CONFIG_SERVER;
/* the space reserved in json buffer to hold at least one record plus service data */
/* the maximum number of values processed in one batch */
typedef struct
{
zbx_uint64_t druleid;
zbx_vector_uint64_t dcheckids;
zbx_vector_ptr_t ips;
}
zbx_drule_t;
typedef struct
{
char ip[ZBX_INTERFACE_IP_LEN_MAX];
zbx_vector_ptr_t services;
}
zbx_drule_ip_t;
typedef struct
{
const char *field;
const char *tag;
zbx_json_type_t jt;
const char *default_value;
}
zbx_history_field_t;
typedef struct
{
const char *table, *lastidfield;
zbx_history_field_t fields[ZBX_MAX_FIELDS];
}
zbx_history_table_t;
typedef int (*zbx_client_item_validator_t)(zbx_history_recv_item_t *item, zbx_socket_t *sock, void *args,
char **error);
typedef struct
{
zbx_uint64_t hostid;