Source
******************************************************************************************************************/
/*
** 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/>.
**/
/* Timeout in milliseconds */
const char *value_type_str[] = {"dbl", "str", "log", "uint", "text"};
static zbx_uint32_t ZBX_ELASTIC_SVERSION = ZBX_DBVERSION_UNDEFINED;
typedef struct
{
char *base_url;
char *post_url;
char *buf;
CURL *handle;
}
zbx_elastic_data_t;
typedef struct
{
unsigned char initialized;
zbx_vector_ptr_t ifaces;
CURLM *handle;
}
zbx_elastic_writer_t;
static zbx_elastic_writer_t writer;
typedef struct
{
char *data;