Source
$response = $this->call('item.get', ['hostids' => $hostid,'search' => ['key_' => self::ITEM_KEY_PRE]]);
<?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/CIntegrationTest.php';
require_once dirname(__FILE__).'/../include/helpers/CDataHelper.php';
/**
* Test suite for graph linking.
*
* @required-components server
* @configurationDataProvider serverConfigurationProvider
* @hosts test_graph_linking
* @backup history
*/
class testGraphLinking extends CIntegrationTest {
const HOST_NAME = 'test_graph_linking';
const TEMPLATE_NAME_PRE = 'strata_template_name';
const ITEM_NAME_PRE = 'strata_item_name';
const ITEM_KEY_PRE = 'strata_item_key';
const GRAPH_HEIGHT = 33;
const GRAPH_WIDTH = 319;
const GRAPH_NAME_PRE = 'strata_graph_name';
const GRAPH_TYPE = 1;
const GRAPH_PERCENT_LEFT = 1;
const GRAPH_PERCENT_RIGHT = 100;
const GRAPH_SHOW_3D = 1;
const GRAPH_SHOW_LEGEND = 1;
const GRAPH_SHOW_WORK_PERIOD = 1;
const GRAPH_SHOW_TRIGGERS = 1;
const GRAPH_YAXISMAX = 417;
const GRAPH_YAXISMIN = 18;
const GRAPH_YMAX_TYPE = 2;
const GRAPH_YMIN_TYPE = 1;
const GRAPH_ITEM_COLOR = '00AA';
const NUMBER_OF_TEMPLATES = 5;
const NUMBER_OF_GRAPHS_PER_TEMPLATE = 5;
private static $templateids = array();
private static $stringids = array();
private static $colors = array();