Source
$url = (!$dashboardid) ? 'zabbix.php?action=report.status' : 'zabbix.php?action=dashboard.view&dashboardid='.$dashboardid;
<?php
/*
** Zabbix
** 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 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.
**/
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'