Source
DBexecute("UPDATE services SET status=5 WHERE serviceid=".zbx_dbstr($serviceids['Service with problem']));
<?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/>.
**/
class Services {
/**
* Create data for service related test.
*
* @return array
*/
public static function load() {
CDataHelper::call('service.create', [
[
'name' => 'Child service of child service',
'algorithm' => 1,
'sortorder' => 1
],
[
'name' => 'Child service with child service',
'algorithm' => 1,
'sortorder' => 2
],
[
'name' => 'Parent for 2 levels of child services',
'algorithm' => 1,
'sortorder' => 3,
'tags' => [
[
'tag' => 'test',
'value' => 'test123'
]
]
],
[
'name' => 'Service with multiple service tags',
'algorithm' => 1,
'sortorder' => 4,
'tags' => [
[
'tag' => 'test',
'value' => 'test456'
],
[
'tag' => 'problem',
'value' => 'true'
]
]
],
[
'name' => 'Simple actions service',