Source
xxxxxxxxxx
static void ha_set_failover_delay(zbx_ha_info_t *info, zbx_ipc_client_t *client, const zbx_ipc_message_t *message)
/*
** 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/>.
**/
typedef struct
{
char str[CUID_LEN];
}
zbx_cuid_t;
static pid_t ha_pid = ZBX_THREAD_ERROR;
static 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_enabled;
/* 0 if audit logging for autoregistration, network discovery or LLD is disabled */
int auditlog_mode;
const char *name;
char *error;
}
zbx_ha_info_t;
ZBX_THREAD_ENTRY(ha_manager_thread, args);
typedef struct