Source
zbx_audit_ha_update_field_int(info->ha_nodeid.str, ZBX_AUDIT_HA_STATUS, info->ha_status, ZBX_NODE_STATUS_STOPPED);
/*
** 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.
**/
static pid_t ha_pid = ZBX_THREAD_ERROR;
extern zbx_cuid_t ha_sessionid;
typedef struct
{
zbx_cuid_t ha_nodeid;
/* HA status */
int ha_status;
/* database connection status */
int db_status;
/* timestamp in database time */
int db_time;
int failover_delay;
/* last access time of active node */
int lastaccess_active;
/* number of ticks active node has not been updated its lastaccess */
int offline_ticks_active;
/* 0 if auditlog is disabled */
int auditlog;
const char *name;
char *error;
}
zbx_ha_info_t;
ZBX_THREAD_ENTRY(ha_manager_thread, args);
typedef struct
{
zbx_cuid_t ha_nodeid;
zbx_cuid_t ha_sessionid;
char *name;
char *address;
unsigned short port;
int status;
int lastaccess;
}
zbx_ha_node_t;
ZBX_PTR_VECTOR_DECL(ha_node, zbx_ha_node_t *)
ZBX_PTR_VECTOR_IMPL(ha_node, zbx_ha_node_t *)
static void zbx_ha_node_free(zbx_ha_node_t *node)