Source
"1. Incorrect \"NodeAddress\" or \"ListenPort\" in the \"zabbix_server.conf\" or server IP/DNS override in the \"zabbix.conf.php\";\n".
<?php
/*
** 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/>.
**/
require_once dirname(__FILE__).'/../../include/CWebTest.php';
require_once dirname(__FILE__).'/../../include/helpers/CDataHelper.php';
class testSystemInformation extends CWebTest {
const FAILOVER_DELAY = 8;
public static $active_lastaccess;
public static $update_timestamp;
public static $standby_lastaccess;
public static $stopped_lastaccess;
public static $unavailable_lastaccess;
public static $skip_fields;
/**
* Function inserts HA cluster data into ha_node table.
*/
public static function prepareHANodeData() {
global $DB;
self::$active_lastaccess = time();
self::$standby_lastaccess = self::$active_lastaccess - 1;
self::$stopped_lastaccess = self::$active_lastaccess - 240;
self::$unavailable_lastaccess = self::$active_lastaccess - 180105;
$nodes = [
[
'ha_nodeid' => 'ckv2kclpg0001pt7pseinx5is',
'name' => 'Standby node',
'address' => '192.168.133.195',
'port' => 10055,
'lastaccess' => self::$standby_lastaccess,
'status' => 0,
'ha_sessionid' => 'ckv6hh1730000q17pci1gocjy'
],
[
'ha_nodeid' => 'ckv2kfmqj0001pipjf0g4pr20',
'name' => 'Stopped node',
'address' => '192.168.133.192',
'port' => 10025,
'lastaccess' => self::$stopped_lastaccess,
'status' => 1,
'ha_sessionid' => 'ckv6gyurt0000vfpjp7b8nad4'
],
[
'ha_nodeid' => 'ckvaw8yny0001l07pm1bk14y5',
'name' => 'Unavailable node',
'address' => '192.168.133.206',