Source
$px_logline = 'Proxy "' . $this->getConfigurationValue(self::COMPONENT_PROXY, 'Hostname') . '" changed state from \b[a-z]+\b to offline';
<?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/CIntegrationTest.php';
/**
* Test suite for High availability
*
* @backup hosts, proxy, host_rtdata, proxy_rtdata, proxy_group, host_proxy
*/
class testProxyHa extends CIntegrationTest {
private static $proxy_groupid;
private static $proxyid1;
private static $proxyid2;
private static $hostid1;
private static $hostid2;
private static $assigned_proxyids;
const PG_NAME = "Proxy group 1";
const PROXY1_HOSTNAME = "P1";
const PROXY1_HA_HOSTNAME = "P2";
/**
* Component configuration provider for test case 'host is being synced to proxies after reassignment'.
*
* @return array
*/
public function reassignmentConfigurationProvider() {
return [
self::COMPONENT_SERVER => [
'DebugLevel' => 5,
'LogFileSize' => 0,
'UnavailableDelay' => 5,
'UnreachableDelay' => 1
],
self::COMPONENT_PROXY => [
'Hostname' => self::PROXY1_HOSTNAME,
'DebugLevel' => 5,
'LogFileSize' => 0,
'Server' => '127.0.0.1:'.self::getConfigurationValue(self::COMPONENT_SERVER, 'ListenPort')
]
];
}
/**
* Component configuration provider.
*
* @return array
*/
public function configurationProvider() {