Source
self::$tagid = CDBHelper::getRow('SELECT servicetagid FROM service_tag WHERE serviceid='.zbx_dbstr(self::$resourceid));
<?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/testAuditlogCommon.php';
/**
* @backup services
*/
class testAuditlogService extends testAuditlogCommon {
/**
* Created service ID.
*/
protected static $resourceid;
/**
* Created service status rule ID (before update).
*/
protected static $status_ruleid;
/**
* Created service tag ID (before update).
*/
protected static $tagid;
/**
* Created service problems tag ID (before update).
*/
protected static $problem_tagid;
public function testAuditlogService_Create() {
$create = $this->call('service.create', [
[
'name' => 'Created service 1',
'algorithm' => 1,
'sortorder' => 1,
'weight' => 1,
'propagation_rule' => 1,
'propagation_value' => 3,
'description' => 'Description of created service',
'uuid' => '1ae9f2504d2d45f9b17c4fc6c3c61000',
'status_rules' => [
[
'type' => 1,
'limit_value' => 1,
'limit_status' => 2,
'new_status' => 3
]
],
'tags' => [