Source
'description' => _('Information about a service. Returns integer with param as state, startup; string - with param as displayname, path, user; text - with param as description; Specifically for state: 0 - running, 1 - paused, 2 - start pending, 3 - pause pending, 4 - continue pending, 5 - stop pending, 6 - stopped, 7 - unknown, 255 - no such service; Specifically for startup: 0 - automatic, 1 - automatic delayed, 2 - manual, 3 - disabled, 4 - unknown'),
<?php declare(strict_types = 1);
/*
** Zabbix
** Copyright (C) 2001-2022 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.
**/
/**
* Class containing information about Items.
*/
final class CItemData {
private const KEYS_BY_TYPE = [
ITEM_TYPE_ZABBIX => [
'agent.hostmetadata',
'agent.hostname',
'agent.ping',
'agent.variant',
'agent.version',
'kernel.maxfiles',
'kernel.maxproc',
'kernel.openfiles',
'modbus.get[endpoint,<slaveid>,<function>,<address>,<count>,<type>,<endianness>,<offset>]',
'net.dns.record[<ip>,name,<type>,<timeout>,<count>,<protocol>]',
'net.dns[<ip>,name,<type>,<timeout>,<count>,<protocol>]',
'net.if.collisions[if]',
'net.if.discovery',
'net.if.in[if,<mode>]',
'net.if.list',
'net.if.out[if,<mode>]',
'net.if.total[if,<mode>]',
'net.tcp.listen[port]',
'net.tcp.port[<ip>,port]',
'net.tcp.service.perf[service,<ip>,<port>]',
'net.tcp.service[service,<ip>,<port>]',
'net.tcp.socket.count[<laddr>,<lport>,<raddr>,<rport>,<state>]',
'net.udp.listen[port]',
'net.udp.service.perf[service,<ip>,<port>]',
'net.udp.service[service,<ip>,<port>]',
'net.udp.socket.count[<laddr>,<lport>,<raddr>,<rport>,<state>]',
'perf_counter[counter,<interval>]',
'perf_counter_en[counter,<interval>]',
'perf_instance.discovery[object]',
'perf_instance_en.discovery[object]',
'proc.cpu.util[<name>,<user>,<type>,<cmdline>,<mode>,<zone>]',
'proc.mem[<name>,<user>,<mode>,<cmdline>,<memtype>]',
'proc.num[<name>,<user>,<state>,<cmdline>,<zone>]',
'proc_info[process,<attribute>,<type>]',
'sensor[device,sensor,<mode>]',