Source
['type' => 'SNMP walk to JSON', 'parameter_table_1_1' => '11_<!@"\' 🙂🙃', 'parameter_table_1_2' => '12_<!@"\' 🙂🙃'],
<?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__).'/../common/testFormPreprocessing.php';
require_once dirname(__FILE__).'/../../include/helpers/CDataHelper.php';
​
/**
* @backup items
*/
class testFormPreprocessingLowLevelDiscovery extends testFormPreprocessing {
​
public $link = 'host_discovery.php?context=host&filter_set=1&filter_hostids%5B0%5D='.self::HOSTID;
public $ready_link = 'host_discovery.php?form=update&context=host&itemid=';
public $button = 'Create discovery rule';
public $success_message = 'Discovery rule created';
public $fail_message = 'Cannot add discovery rule';
​
const IS_LLD = true;
const HOSTID = 40001;
const INHERITANCE_TEMPLATEID = 15000; // 'Inheritance test template'
const INHERITANCE_HOSTID = 15001; // 'Template inheritance test host'
const INHERITANCE_LLDID = 15016; // 'Template inheritance test host' -> 'testInheritanceDiscoveryRule'
const CLONE_LLDID = 133800; // 'Simple form test host' -> 'testFormDiscoveryRule1'
const CLONE_PREPROCESSING = [
[
'type' => '5',
'params' => "regular expression pattern \noutput template",
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '11',
'params' => '/document/item/value/text()',
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '12',
'params' => '$.document.item.value parameter.',
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '14',
'params' => 'regular expression pattern for matching',
'error_handler' => 0,
'error_handler_params' => ''
],
[
'type' => '15',
'params' => 'regular expression pattern for not matching',