Source
static void ha_set_failover_delay(zbx_ha_info_t *info, zbx_ipc_client_t *client, const zbx_ipc_message_t *message)
/*
** 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
{
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;
const char *name;
char *error;
}
zbx_ha_info_t;
ZBX_THREAD_ENTRY(ha_manager_thread, args);
typedef struct
{