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__).'/../behaviors/CMessageBehavior.php';
/**
* @backup scripts
*
* @onBefore prepareData
*/
class testManualActionScripts extends CWebTest {
const HOST = 'A host for scripts check';
/**
* Id of host.
*
* @var array
*/
protected static $hostid;
/**
* Attach MessageBehavior to the test.
*
* @return array
*/
public function getBehaviors() {
return [CMessageBehavior::class];
}
public function prepareData() {
// Create host and trapper item for manual user input test.
$host = CDataHelper::createHosts([
[
'host' => self::HOST,
'interfaces' => [
[
'type' => INTERFACE_TYPE_AGENT,
'main' => INTERFACE_PRIMARY,
'useip' => INTERFACE_USE_IP,
'ip' => '127.1.9.1',
'dns' => '',
'port' => '10777'
]
],
'groups' => [
'groupid' => '19' // Applications.
],
'items' => [