en-us	#### Predefined scripts  All scripts (webhook, script, SSH, Telnet, IPMI) that are available for action operations are defined in [global scripts](/manual/web_interface/frontend_sections/administration/scripts).  For example:      sudo /etc/init.d/apache restart   In this case, Zabbix will try to restart an Apache process. With this command, make sure that the command is executed on Zabbix agent (click the *Zabbix agent* button against *Execute on*).  ::: noteimportant Note the use of **sudo** - Zabbix user does not have permissions to restart system services by default. See below for hints on how to configure **sudo**. :::  ::: noteclassic Zabbix agent should run on the remote host and accept incoming connections. Zabbix agent executes commands in background. :::  Remote commands on Zabbix agent are executed without timeout by the system.run\[,nowait\] key and are not checked for execution results. On Zabbix server and Zabbix proxy, remote commands are executed with timeout as set in the TrapperTimeout parameter of zabbix\_server.conf or zabbix\_proxy.conf file and are [checked](/manual/appendix/command_execution#exit_code_checking) for execution results.
zh-cn	#### 预定义脚本  动作可用的所有脚本（webhook,、脚本、SSH、Telnet、IPMI） 定义在 [全局脚本](/manual/web_interface/frontend_sections/administration/scripts)。  例如：       sudo /etc/init.d/apache restart   此例中，Zabbix会尝试重启一个Apache进程。确保这个命令在Zabbix agent上执行（点击*Zabbix agent*按钮为*Execute on*）。  ::: noteimportant 注意**sudo**的用法——Zabbix用户默认没有权限重启系统服务 。请查看以下关于配置**sudo**的提示。  :::  ::: noteclassic Zabbix agent应该运行在远程主机上并接受入方向的连接。Zabbix agent在后台执行命令。 :::  Zabbix agent上的远程命令由system.run\[,nowait\]键执行时没有timeout，并且不检查执行的结果。在Zabbix Server 和Zabbix Agent上，远程命令执行时有timeout，在zabbix\_server.conf或zabbix\_proxy.conf文件里配置TrapperTimeout参数，并且[检查](/manual/appendix/command_execution#exit_code_checking) 执行的结果。

en-us	#### Prediction functions  |FUNCTION|<|<| |--|--|--| |**Description**|**Function-specific parameters**|**Comments**| |**forecast** (/host/key,(sec\|\#num)<:time shift>,time,<fit>,<mode>)|<|<| |Future value, max, min, delta or avg of the item.|See [common parameters](#common-parameters).<br><br>**time** - forecasting horizon in seconds (time suffixes can be used); negative values are supported<br><br>**fit** (optional; must be double-quoted) - function used to fit historical data<br><br>Supported `fits`:<br>*linear* - linear function<br>*polynomialN* - polynomial of degree N (1 <= N <= 6)<br>*exponential* - exponential function<br>*logarithmic* - logarithmic function<br>*power* - power function<br><br>Note that:<br>*linear* is default, *polynomial1* is equivalent to *linear*<br><br>**mode** (optional; must be double-quoted) - demanded output<br><br>Supported `modes`:<br>*value* - value (default)<br>*max* - maximum<br>*min* - minimum<br>*delta* - *max*-*min*<br>*avg* - average<br><br>Note that:<br>*value* estimates item value at the moment `now` + `time`<br>*max*, *min*, *delta* and *avg* investigate item value estimate on the interval between `now` and `now` + `time`|Supported value types: float, int<br><br>If value to return is larger than 1.7976931348623157E+308 or less than -1.7976931348623157E+308, return value is cropped to 1.7976931348623157E+308 or -1.7976931348623157E+308 correspondingly.<br><br>Becomes unsupported only if misused in expression (wrong item type, invalid parameters), otherwise returns -1 in case of errors.<br><br>Examples:<br>=> **forecast**(/host/key,**\#10**,**1h**) → forecast item value in one hour based on the last 10 values<br>=> **forecast**(/host/key,**1h**,**30m**) → forecast item value in 30 minutes based on the last hour data<br>=> **forecast**(/host/key,**1h:now-1d**,**12h**) → forecast item value in 12 hours based on one hour one day ago<br>=> **forecast**(/host/key,**1h**,**10m**,"exponential") → forecast item value in 10 minutes based on the last hour data and exponential function<br>=> **forecast**(/host/key,**1h**,**2h**,"polynomial3","max") → forecast the maximum value the item can reach in the next two hours based on last hour data and cubic (third degree) polynomial<br>=> **forecast**(/host/key,**\#2**,**-20m**) → estimate the item value 20 minutes ago based on the last two values (this can be more precise than using last(), especially if item is updated rarely, say, once an hour)<br><br>See also additional information on [predictive trigger functions](/manual/config/triggers/prediction).| |**timeleft** (/host/key,(sec\|\#num)<:time shift>,threshold,<fit>)|<|<| |Time in seconds needed for an item to reach a specified threshold.|See [common parameters](#common-parameters).<br><br>**threshold** - value to reach ([unit suffixes](/manual/appendix/suffixes) can be used)<br><br>**fit** (optional; must be double-quoted) - see forecast()|Supported value types: float, int<br><br>If value to return is larger than 1.7976931348623157E+308, return value is cropped to 1.7976931348623157E+308.<br><br>Returns 1.7976931348623157E+308 if threshold cannot be reached.<br><br>Becomes unsupported only if misused in the expression (wrong item type, invalid parameters), otherwise returns -1 in case of errors.<br><br>Examples:<br>=> **timeleft**(/host/key,**\#10**,**0**) → time until the item value reaches zero based on the last 10 values<br>=> **timeleft**(/host/key,**1h**,**100**) → time until the item value reaches 100 based on the last hour data<br>=> **timeleft**(/host/key,**1h:now-1d**,**100**) → time until the item value reaches 100 based on one hour one day ago<br>=> **timeleft**(/host/key,**1h**,**200**,"polynomial2") → time until the item value reaches 200 based on the last hour data and assumption that the item behaves like quadratic (second degree) polynomial<br>See also additional information on [predictive trigger functions](/manual/config/triggers/prediction).|
zh-cn	#### 预测函数  |函数|<|<|<| |--------|-|-|-| |<|**描述**|**函数专用参数**|**注释**| |**forecast** (/host/key,(sec\|\#num)<:time shift>,time,<fit>,<mode>)|<|<|<| |<|监控项的未来值、最大值、最小值、增量或平均值|参见[常用参数](#common-parameters).<br><br>**time** - 以秒为单位的预测范围（可以使用时间后缀）；支持负值<br><br>**fit** （可选；必须双引号） - 用于拟合历史数据的函数<br><br>支持`fits`:<br>*linear* - 线性函数<br>*polynomialN* -N 次多项式 (1 <= N <= 6)<br>*exponential* - 指数函数<br>*logarithmic* - 对数函数<br>*power* - 幂函数<br><br>注意：<br>*linear* 是默认值，*polynomial1* 等价于*linear*<br><br>**mode** （可选；必须双引号） - 要求的输出<br><br>支持`modes`:<br>*value* - 值（默认值）<br>*max* - 最大值<br>*min* - 最小值<br>*delta* - 最大值-最小值<br>*avg* - 平均值<br><br>注意：<br>*value* 估计当前监控值`now` + `time`<br>*max*, *min*, *delta* 和*avg* 调查监控项值评估的时间间隔`now` 和 `now` + `time`|支持的值类型：float, int<br><br>如果要返回的值大于1.7976931348623157E+308 或小于-1.7976931348623157E+308，则返回值相应裁剪为1.7976931348623157E+308 或-1.7976931348623157E+308。<br><br>仅当在表达式中误用（错误的监控项类型，无效参数）时才变得不受支持，否则在错误的情况下返回-1。<br><br>示例：<br>=> **forecast**(/host/key,**\#10**,**1h**) → 根据最后10个值预测一小时内的监控项值<br>=> **forecast**(/host/key,**1h**,**30m**) → 根据最后1小时的数据预测30分钟内的监控项值<br>=> **forecast**(/host/key,**1h:now-1d**,**12h**) →根据前一天的一小时预测12小时内的监控项值<br>=> **forecast**(/host/key,**1h**,**10m**,"exponential") → 根据最后1小时的数据和指数函数预测 10分钟内的监控项值<br>=> **forecast**(/host/key,**1h**,**2h**,"polynomial3","max") → 根据最后1小时的数据和三次多项式预测未来2个小时监控项可以达到最大的值<br>=> **forecast**(/host/key,**\#2**,**-20m**) → 根据最后两个值估计20分钟前的监控项值（这可能比使用last()更精确，特别是如果监控项很少更新，比如每小时一次）<br><br>另见有关[预测触发器函数](/manual/config/triggers/prediction)的附加信息。| |**timeleft** (/host/key,(sec\|\#num)<:time shift>,threshold,<fit>)|<|<|<| |<|监控项达到指定阈值所需的时间（以秒为单位）|参见[常用参数](#common-parameters).<br><br>**threshold** - 要达到的值（可以使用的[单位后缀](/manual/appendix/suffixes)）<br><br>**fit** （可选；必须双引号） - 见forecast()|支持的值类型：float, int<br><br>如果要返回的值大于1.7976931348623157E+308，则返回值被裁剪为1.7976931348623157E+308。<br><br>如果无法达到阈值，则返回1.7976931348623157E+308。<br><br>仅当在表达式中误用（错误的监控项类型，无效参数）时才变得不受支持，否则在错误的情况下返回 -1。<br><br>Examples:<br>=> **timeleft**(/host/key,**\#10**,**0**) → 根据最后10个值，预测直到监控项值达到零的时间<br>=> **timeleft**(/host/key,**1h**,**100**) → 根据最后一小时的数据，预测直到监控项值达到100的时间<br>=> **timeleft**(/host/key,**1h:now-1d**,**100**) → 根据一天前的一小时数据，预测直到监控项值达到100的时间<br>=> **timeleft**(/host/key,**1h**,**200**,"polynomial2") →最后一小时的数据和假设该监控项的行为类似于二次多项式，预测直到监控项值达到200的时间<br>另见有关 [预测触发器函数](/manual/config/triggers/prediction)的附加信息。|

en-us	#### Pre-installation summary  Review a summary of settings.  ![](../../../assets/en/manual/installation/install_5.png){width="550"}
zh-cn	#### 预安装总概  查看配置概要。  ![](../../../assets/en/manual/installation/install_5.png){width="550"}

en-us	##### Preparation  Zabbix agent is distributed as a zip archive. After you download the archive you need to unpack it. Choose any folder to store Zabbix agent and the configuration file, e. g.      C:\zabbix  Copy bin\\zabbix\_agentd.exe and conf\\zabbix\_agentd.conf files to c:\\zabbix.  Edit the c:\\zabbix\\zabbix\_agentd.conf file to your needs, making sure to specify a correct "Hostname" parameter.
zh-cn	 ##### 准备  Zabbix agent 作为 zip 压缩文件分发。下载该文件后，您需要将其解压缩。 选择任何文件夹来存储Zabbix代理和配置文件，例如：     C:\zabbix  复制二进制文件 bin\\zabbix\_agentd.exe 和配置文件 conf\\zabbix\_agentd.conf 到 c:\\zabbix 下。  按需编辑 c:\\zabbix\\zabbix\_agentd.conf 配置文件，确保指定了正确的 "Hostname" 参数。

en-us	##### Preparing frontend  Make sure that Zabbix server address:port is **not defined** in the  frontend configuration (found in `conf/zabbix.conf.php` of the frontend  files directory).  ![](../../../../assets/en/manual/config/frontend_conf_server_port.png){width="600"}  Zabbix frontend will autodetect the active node by reading settings  from the nodes table in Zabbix database. Node address of the active node  will be used as the Zabbix server address.
zh-cn	 ##### 准备前端  确保Zabbix server地址:端口在前端配置中**没有定义** (在frontend文件目录的`conf/zabbix.conf.php`中找到)。  ![](../../../../assets/en/manual/config/frontend_conf_server_port.png){width="600"}  Zabbix前端将通过读取Zabbix数据库中节点表的设置来自动检测活动节点。使用主节点的节点地址作为Zabbix server地址。

en-us	#### Preprocessing  The **Preprocessing** tab allows to define transformation rules to apply to the result of discovery. One or several transformations are possible in this step. Transformations are executed in the order in which they are defined. All preprocessing is done by Zabbix server.  See also:  -   [Preprocessing     details](/manual/config/items/preprocessing/preprocessing_details) -   [Preprocessing testing](/manual/config/items/preprocessing#testing)  ![](../../../assets/en/manual/discovery/low_level_discovery/lld_fs_b.png)   |Type|<|<| |-|----------|----------------------------------------| | |*Transformation*|Description| |Text|<|<| |<|*Regular expression*|Match the received value to the <pattern> regular expression and replace value with the extracted <output>. The regular expression supports extraction of maximum 10 captured groups with the \\N sequence.<br>Parameters:<br>**pattern** - regular expression<br>**output** - output formatting template. An \\N (where N=1…9) escape sequence is replaced with the Nth matched group. A \\0 escape sequence is replaced with the matched text.<br>If you mark the *Custom on fail* checkbox, it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message.| |^|*Replace*|Find the search string and replace it with another (or nothing). All occurrences of the search string will be replaced.<br>Parameters:<br>**search string** - the string to find and replace, case-sensitive (required)<br>**replacement** - the string to replace the search string with. The replacement string may also be empty effectively allowing to delete the search string when found.<br>It is possible to use escape sequences to search for or replace line breaks, carriage return, tabs and spaces "\\n \\r \\t \\s"; backslash can be escaped as "\\\\" and escape sequences can be escaped as "\\\\n". Escaping of line breaks, carriage return, tabs is automatically done during low-level discovery.<br>Supported since 5.0.0.| |Structured data|<|<| |<|*JSONPath*|Extract value or fragment from JSON data using [JSONPath functionality](/manual/config/items/preprocessing/jsonpath_functionality).<br>If you mark the *Custom on fail* checkbox, the item will not become unsupported in case of failed preprocessing step and it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message.| |<|*XML XPath*|Extract value or fragment from XML data using XPath functionality.<br>For this option to work, Zabbix server must be compiled with libxml support.<br>Examples:<br>`number(/document/item/value)` will extract `10` from `<document><item><value>10</value></item></document>`<br>`number(/document/item/@attribute)` will extract `10` from `<document><item attribute="10"></item></document>`<br>`/document/item` will extract `<item><value>10</value></item>` from `<document><item><value>10</value></item></document>`<br>Note that namespaces are not supported.<br>Supported since 4.4.0.<br>If you mark the *Custom on fail* checkbox, it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message.| |<|*CSV to JSON*|Convert CSV file data into JSON format.<br>For more information, see: [CSV to JSON preprocessing](/manual/config/items/preprocessing/csv_to_json#csv_header_processing).<br>Supported since 4.4.0.| |^|*XML to JSON*|Convert data in XML format to JSON.<br>For more information, see: [Serialization rules](/manual/config/items/preprocessing/javascript/javascript_objects#serialization_rules).<br>If you mark the *Custom on fail* checkbox, it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message.| |Custom scripts|<|<| |<|*JavaScript*|Enter JavaScript code in the block that appears when clicking in the parameter field or on *Open*.<br>Note that available JavaScript length depends on the [database used](/manual/config/items/item#custom_script_limit).<br>For more information, see: [Javascript preprocessing](/manual/config/items/preprocessing/javascript)| |Validation|<|<| |<|*Does not match regular expression*|Specify a regular expression that a value must not match.<br>E.g. `Error:(.*?)\.`<br>If you mark the *Custom on fail* checkbox, it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message.| |^|*Check for error in JSON*|Check for an application-level error message located at JSONpath. Stop processing if succeeded and message is not empty; otherwise continue processing with the value that was before this preprocessing step. Note that these external service errors are reported to user as is, without adding preprocessing step information.<br>E.g. `$.errors`. If a JSON like `{"errors":"e1"}` is received, the next preprocessing step will not be executed.<br>If you mark the *Custom on fail* checkbox, it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message.| |^|*Check for error in XML*|Check for an application-level error message located at xpath. Stop processing if succeeded and message is not empty; otherwise continue processing with the value that was before this preprocessing step. Note that these external service errors are reported to user as is, without adding preprocessing step information.<br>No error will be reported in case of failing to parse invalid XML.<br>Supported since 4.4.0.<br>If you mark the *Custom on fail* checkbox, it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message.| |Throttling|<|<| |<|*Discard unchanged with heartbeat*|Discard a value if it has not changed within the defined time period (in seconds).<br>Positive integer values are supported to specify the seconds (minimum - 1 second). Time suffixes can be used in this field (e.g. 30s, 1m, 2h, 1d). User macros and low-level discovery macros can be used in this field.<br>Only one throttling option can be specified for a discovery item.<br>E.g. `1m`. If identical text is passed into this rule twice within 60 seconds, it will be discarded.<br>*Note*: Changing item prototypes does not reset throttling. Throttling is reset only when preprocessing steps are changed.| |Prometheus|<|<| |<|*Prometheus to JSON*|Convert required Prometheus metrics to JSON.<br>See [Prometheus checks](/manual/config/items/itemtypes/prometheus) for more details.|  Note that if the discovery rule has been applied to the host via template then the content of this tab is read-only.
zh-cn	#### 预处理  **预处理** 选项卡定义发现结果的转换规则。可以定义一个或多个转换规则。 转换规则执行的顺序以定义的顺序为准。所有预处理均由Zabbix server来执行。 参阅:  -   [预处理详细信息](/manual/config/items/preprocessing/preprocessing_details) -   [预处理测试](/manual/config/items/preprocessing#testing)  ![](../../../assets/en/manual/discovery/low_level_discovery/lld_fs_b.png)  |类型|转换|描述| |----|--------------|-----------| |Text|<|<| |<|*正则表达式*|将接收的值匹配正则表达式的匹配模式<pattern>，并替换为输出<output>。正则表达式可以使用 \\N 转义字符提取最多10个匹配的组。<br>参数:<br>**匹配模式** - 正则表达式<br>**输出** - 输出格式化的模板。一个 \\N (N=1…9) 转义字符会替换为第N个匹配的组。一个 \\0 转义字符替换为匹配的文本。<br>如果选取了 *自定义失败* 检查框, 则可以自定义错误处理选项: 要么舍弃该值并设置一个特定值，要么设置一个错误信息。| |^|*替换*|搜索字符串并替换为另一个字符串或空字符串。所有搜索结果均会被替换。<br>参数:<br>**搜索字符串** - 需要搜索的字符串, 大小写敏感(强制要求)<br>**替换** - 最终替换成为的字符串。替换成为的字符串可以是空值，通常用于删除搜索字符串。<br>可使用转义字符 "\\n \\r \\t \\s" 查找替换换行符, 回车, 制表符和空格; 反斜线可以用 "\\\\" 转义，转义序列可以用 "\\\\n"转义。底层自动发现过程中，换行符, 回车和制表符自动转义。<br>从5.0.0版本开始支持。| |结构化数据|<|<| |<|*JSONPath*| 使用[JSONPath功能](/manual/config/items/preprocessing/jsonpath_functionality)提取数据或将JSON数据分片。<br>如果选取了 *自定义失败* 检查框, 万一预处理失败，监控项不会变为不支持。另外还可以自定义错误处理选项: 要么舍弃该值并设置一个特定值，要么设置一个错误信息。| |<|*XML XPath*|使用XPath功能提取数据或将XML数据分片。<br>要使用此功能，Zabbix server服务器需要安装libxml库。<br>例子:<br>`number(/document/item/value)` 会从 `<document><item><value>10</value></item></document>`提取 `10` <br>`number(/document/item/@attribute)` 会从 `<document><item attribute="10"></item></document>`提取 `10` <br>`/document/item` 会从 `<document><item><value>10</value></item></document>`提取 `<item><value>10</value></item>` <br>注意，不支持命名空间。<br>从4.4.0版本开始支持此特性。<br>如果选取了 *自定义失败* 检查框, 则可以自定义错误处理选项: 要么舍弃该值并设置一个特定值，要么设置一个错误信息。| |<|*CSV to JSON*|转换CSV数据到JSON格式。<br>更多信息请参考: [CSV到JSON数据预处理](/manual/config/items/preprocessing/csv_to_json#csv_header_processing).<br>从4.4.0版本开始支持此特性。| |^|*XML to JSON*|转换XML数据到JSON格式。<br>更多信息请参阅: [序列化规则](/manual/config/items/preprocessing/javascript/javascript_objects#serialization_rules).<br>如果选取了 *自定义失败* 检查框, 则可以自定义错误处理选项: 要么舍弃该值并设置一个特定值，要么设置一个错误信息。| |自定义脚本|<|<| |<|*JavaScript*|点击参数区域或点击 *打开* 输入Javascript代码。 <br>注意，可输入的Javascript代码长度取决于 [使用的数据库](/manual/config/items/item#custom_script_limit).<br>更多信息请参考: [Javascript代码预处理](/manual/config/items/preprocessing/javascript)| |验证|<|<| |<|*不匹配正则表达式*|指定一个不匹配任何取值的正则表达式。<br>例如 `Error:(.*?)\.`<br>如果选取了 *自定义失败* 检查框, 则可以自定义错误处理选项: 要么舍弃该值并设置一个特定值，要么设置一个错误信息。| |^|*检查JSON数据错误*|检查JSONpath路径下的应用层错误信息。如果执行成功并且信息不为空则不检查; 否则继续检查此预处理步骤之前的值。注意，这些外部服务错误原封不动报告给用户，不会添加预处理步骤信息。<br>例如 `$.errors`。如果收到一个这样的JSON数据`{"errors":"e1"}` ，则下个预处理步骤不会执行。<br>如果选取了 *自定义失败* 检查框, 则可以自定义错误处理选项: 要么舍弃该值并设置一个特定值，要么设置一个错误信息。| |^|*检查XML数据错误*|检查xpath路径下的应用层错误信息。如果执行成功并且信息不为空则不检查; 否则继续检查此预处理步骤之前的值。注意，这些外部服务错误原封不动报告给用户，不会添加预处理步骤信息。<br>无效的XML分析失败不会报告给用户。<br>从4.4.0版本开始支持此特性。<br>如果选取了 *自定义失败* 检查框, 则可以自定义错误处理选项: 要么舍弃该值并设置一个特定值，要么设置一个错误信息。| |限流|<|<| |<|*丢弃心跳时间内未改变的值*|如果一个值在定义的时间周期内(秒)未改变，则丢弃该值。<br>秒数的范围为正整数(最小1秒)。可使用时间后缀 (如 30s, 1m, 2h, 1d)。可使用用户宏和底层自动发现宏。<br>一个自动发现监控项只能指定一个限流选项。<br>比如 `1m`. 如果规则在60秒内收到两次相同的值，则相同的值会被丢弃。<br>*注意*: 改变监控项原型不会重置限流。仅当预处理步骤发生变化时，限流才会重置。| |Prometheus|<|<| |<|*Prometheus到JSON格式*|转换Prometheus度量到JSON格式。<br>参阅 [Prometheus检查](/manual/config/items/itemtypes/prometheus) 获取更多信息。|  注意，如果自动发现规则已经通过模板应用到主机上，则此选项卡的内容是只读的。

en-us	#### Preprocessing workers  Zabbix server configuration file allows users to set count of preprocessing worker processes. StartPreprocessors configuration parameter should be used to set number of pre-forked instances of preprocessing workers. Optimal number of preprocessing workers can be determined by many factors, including the count of "preprocessable" items (items that require to execute any preprocessing steps), count of data gathering processes, average step count for item preprocessing, etc.  But assuming that there is no heavy preprocessing operations like parsing of large XML / JSON chunks, number of preprocessing workers can match total number of data gatherers. This way, there will mostly (except for the cases when data from gatherer comes in bulk) be at least one unoccupied preprocessing worker for collected data.  ::: notewarning Too many data gathering processes (pollers, unreachable pollers, ODBC pollers, HTTP pollers, Java pollers, pingers, trappers, proxypollers) together with IPMI manager, SNMP trapper and preprocessing workers can exhaust the per-process file descriptor limit for the preprocessing manager. This will cause Zabbix server to stop (usually shortly after the start, but sometimes it can take more time). The configuration file should be revised or the limit should be raised to avoid this situation. :::
zh-cn	#### 预处理进程  Zabbix server 配置文件允许用户设置预处理工作进程的数量。StartPreprocessors配置参数应用于设置预处理进程的预分配实例数。 预处理进程的最佳数量可以由许多因素决定，包括“可预处理”监控项（需要执行任何预处理步骤的监控项）的数量、数据收集过程的数量、监控项预处理的平均步骤数等。  但是假设没有像解析大型 XML/JSON 块这样的繁重的预处理操作，预处理进程的数量可以匹配数据收集器的总数。 这样，大多数情况下（除了来自收集器的数据大量进入的情况）至少有一个空闲的预处理进程来处理收集的数据。  ::: notewarning 太多的数据收集进程（轮询器、无法访问的轮询器、ODBC 轮询器、HTTP 轮询器、Java 轮询器、pingers、陷阱器、代理轮询器）连同 IPMI 管理器、SNMP 陷阱器和预处理进程可能会耗尽预处理管理器的每个进程的文件描述符限制。 这将导致 Zabbix server停止（通常在启动后不久，但有时可能需要更多时间）。 应修改配置文件或提高限制以避免出现这种情况。 :::

en-us	### Pre-requisites  Install MySQL database from the [official repository](https://dev.mysql.com/downloads/repo/yum/).  See [MySQL documentation](https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/) for details on how to use MySQL repo.  MySQL server is ready to accept secure connections using a self-signed certificate.  To see, which users are using an encrypted connection, run the following query (Performance Schema should be turned ON):      mysql> SELECT sbt.variable_value AS tls_version, t2.variable_value AS cipher, processlist_user AS user, processlist_host AS host              FROM performance_schema.status_by_thread  AS sbt             JOIN performance_schema.threads AS t ON t.thread_id = sbt.thread_id             JOIN performance_schema.status_by_thread AS t2 ON t2.thread_id = t.thread_id             WHERE sbt.variable_name = 'Ssl_version' and t2.variable_name = 'Ssl_cipher'             ORDER BY tls_version;
zh-cn	### 先决条件  安装MySQL请参照 [official repository](https://dev.mysql.com/downloads/repo/yum/).  有关如何使用 MySQL 存储库的详细信息 请参照[MySQL documentation](https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/)  MySQL服务器已准备好使用自签名证书接受安全连接.  若想查看哪些用户正在使用加密连接，请运行以下查询 (Performance Schema 选项应打开):      mysql> SELECT sbt.variable_value AS tls_version, t2.variable_value AS cipher, processlist_user AS user, processlist_host AS host              FROM performance_schema.status_by_thread  AS sbt             JOIN performance_schema.threads AS t ON t.thread_id = sbt.thread_id             JOIN performance_schema.status_by_thread AS t2 ON t2.thread_id = t.thread_id             WHERE sbt.variable_name = 'Ssl_version' and t2.variable_name = 'Ssl_cipher'             ORDER BY tls_version;

en-us	### Pre-requisites  Install the PostgreSQL database using the [official repository](https://www.postgresql.org/download/linux/redhat/).  PostgreSQL is not configured to accept TLS connections out-of-the-box. Please follow instructions from PostgreSQL documentation for [certificate preparation with postgresql.conf](https://www.postgresql.org/docs/13/ssl-tcp.html) and also for [user access control](https://www.postgresql.org/docs/13/auth-pg-hba-conf.html) through ph\_hba.conf.  By default, the PostgreSQL socket is binded to the localhost, for the network remote connections allow to listen on the real network interface.  PostgreSQL settings for all [modes](/manual/appendix/install/db_encrypt#terminology) can look like this:  **/var/lib/pgsql/13/data/postgresql.conf:**      ...     ssl = on     ssl_ca_file = 'root.crt'     ssl_cert_file = 'server.crt'     ssl_key_file = 'server.key'     ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL'     ssl_prefer_server_ciphers = on     ssl_min_protocol_version = 'TLSv1.3'     ...  For access control adjust */var/lib/pgsql/13/data/pg\_hba.conf*:      ...     ### require     hostssl all all 0.0.0.0/0 md5      ### verify CA     hostssl all all 0.0.0.0/0 md5 clientcert=verify-ca      ### verify full     hostssl all all 0.0.0.0/0 md5 clientcert=verify-full     ...
zh-cn	### 先决条件  安装 PostgreSQL 请参照[official repository](https://www.postgresql.org/download/linux/redhat/).  PostgreSQL未配置开箱即用的TLS连接。请按照 PostgreSQL 文档中的说明进行操作 [certificate preparation with postgresql.conf](https://www.postgresql.org/docs/13/ssl-tcp.html) 也适用于 [user access control](https://www.postgresql.org/docs/13/auth-pg-hba-conf.html) \ph_hba.conf.  默认情况下，PostgreSQL套接字绑定到本地主机，因为网络远程连接允许侦听真实的网络接口。  PostgreSQL 所有配置请参见 [modes](/manual/appendix/install/db_encrypt#terminology) 像这样:  **/var/lib/pgsql/13/data/postgresql.conf:**      ...     ssl = on     ssl_ca_file = 'root.crt'     ssl_cert_file = 'server.crt'     ssl_key_file = 'server.key'     ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL'     ssl_prefer_server_ciphers = on     ssl_min_protocol_version = 'TLSv1.3'     ...   */var/lib/pgsql/13/data/pg\_hba.conf* 配置文件用于访问控制的调整:      ...     ### require     hostssl all all 0.0.0.0/0 md5      ### verify CA     hostssl all all 0.0.0.0/0 md5 clientcert=verify-ca      ### verify full     hostssl all all 0.0.0.0/0 md5 clientcert=verify-full     ...

en-us	 ### Pre-requisites  Prior to configuring service monitoring, you need to have the hosts configured:  - *HA node 1* with at least one trigger and a tag (preferably set on a trigger level) `component:HA node 1` - *HA node 2* with at least one trigger and a tag (preferably set on a trigger level) `component:HA node 2`
zh-cn	 ### 先决条件  在配置服务监控前，需要先配置对应的主机:  - *HA node 1* 至少一个触发器，至少一个标签(最好是在触发器级别设置) `component:HA node 1` - *HA node 2* 至少一个触发器，至少一个标签(最好是在触发器级别设置) `component:HA node 2`

en-us	 ### Primary keys  Primary keys are now used for all tables, including history tables, in new installations.  There is no automatic upgrade to primary keys for existing installations.  Instructions for a **manual upgrade** of history tables to primary keys in  pre-existing installations are available for  [MySQL/MariaDB](/manual/appendix/install/db_primary_keys#mysql),  [PostgreSQL](/manual/appendix/install/db_primary_keys#postgresql),  [TimescaleDB v1](/manual/appendix/install/db_primary_keys#timescaledb-v1) and  [v2](/manual/appendix/install/db_primary_keys#timescaledb-v2),  and [Oracle](/manual/appendix/install/db_primary_keys#oracle).
zh-cn	### 主键  主键现在用于新安装中的所有表，包括历史表。  现有安装不会自动升级主键。在现有安装中 **手动升级** 历史表主键的说明适用于[MySQL/MariaDB](/manual/appendix/install/db_primary_keys#mysql)、[PostgreSQL](/manual/appendix/install/db_primary_keys#postgresql)、[TimescaleDB v1](/manual/appendix/install/db_primary_keys#timescaledb-v1) 和 [v2](/manual/appendix/install/db_primary_keys#timescaledb-v2) 以及 [Oracle](/manual/appendix/install/db_primary_keys#oracle)。

en-us	 #### Primary keys  Primary keys are now used for all tables, including history tables, in new installations.  There is no automatic upgrade to primary keys for existing installations.  Instructions for a **manual upgrade** of history tables to primary keys in  pre-existing installations are available for  [MySQL/MariaDB](/manual/appendix/install/db_primary_keys#mysql),  [PostgreSQL](/manual/appendix/install/db_primary_keys#postgresql),  [TimescaleDB v1](/manual/appendix/install/db_primary_keys#timescaledb-v1) and  [v2](/manual/appendix/install/db_primary_keys#timescaledb-v2),  and [Oracle](/manual/appendix/install/db_primary_keys#oracle).  
zh-cn	 #### Primary keys  Primary keys are now used for all tables, including history tables, in new installations.  There is no automatic upgrade to primary keys for existing installations.  Instructions for a **manual upgrade** of history tables to primary keys in  pre-existing installations are available for  [MySQL/MariaDB](manual/appendix/install/db_primary_keys#mysql),  [PostgreSQL](manual/appendix/install/db_primary_keys#posgresql),  [TimescaleDB v1](manual/appendix/install/db_primary_keys#timescaledb-v1) and  [v2](manual/appendix/install/db_primary_keys#timescaledb-v2),  and [Oracle](manual/appendix/install/db_primary_keys#oracle).  

en-us	 #### Primary keys  Primary keys are now used for all tables, including history tables, in new installations.  There is no automatic upgrade to primary keys for existing installations.  Instructions for a **manual upgrade** of history tables to primary keys in  pre-existing installations are available for  [MySQL/MariaDB](/manual/appendix/install/db_primary_keys#mysql),  [PostgreSQL](/manual/appendix/install/db_primary_keys#postgresql),  [TimescaleDB v1](/manual/appendix/install/db_primary_keys#timescaledb-v1) and  [v2](/manual/appendix/install/db_primary_keys#timescaledb-v2),  and [Oracle](/manual/appendix/install/db_primary_keys#oracle).  
zh-cn	 #### Primary keys  Primary keys are now used for all tables, including history tables, in new installations.  There is no automatic upgrade to primary keys for existing installations.  Instructions for a **manual upgrade** of history tables to primary keys in  pre-existing installations are available for  [MySQL/MariaDB](manual/appendix/install/db_primary_keys#mysql),  [PostgreSQL](manual/appendix/install/db_primary_keys#posgresql),  [TimescaleDB v1](manual/appendix/install/db_primary_keys#timescaledb-v1) and  [v2](manual/appendix/install/db_primary_keys#timescaledb-v2),  and [Oracle](manual/appendix/install/db_primary_keys#oracle).  

en-us	 ##### Primary keys  Primary keys are now used for all tables, including history tables, in new installations.  There is no automatic upgrade to primary keys for existing installations.  Instructions for a **manual upgrade** of history tables to primary keys in  pre-existing installations are available for  [MySQL/MariaDB](/manual/appendix/install/db_primary_keys#mysql),  [PostgreSQL](/manual/appendix/install/db_primary_keys#postgresql),  [TimescaleDB v1](/manual/appendix/install/db_primary_keys#timescaledb-v1) and  [v2](/manual/appendix/install/db_primary_keys#timescaledb-v2),  and [Oracle](/manual/appendix/install/db_primary_keys#oracle).
zh-cn	##### 主键  主键现在用于新安装中的所有表，包括历史表。  现有安装不会自动升级主键。在现有安装中 **手动升级** 历史表为主键的说明适用于一下数据库： [MySQL/MariaDB](/manual/appendix/install/db_primary_keys#mysql)， [PostgreSQL](/manual/appendix/install/db_primary_keys#postgresql)， [TimescaleDB v1](/manual/appendix/install/db_primary_keys#timescaledb-v1) 和 [v2](/manual/appendix/install/db_primary_keys#timescaledb-v2) 以及 [Oracle](/manual/appendix/install/db_primary_keys#oracle)。

en-us	#### Principle of least privilege  The principle of least privilege should be used at all times for Zabbix. This principle means that user accounts (in Zabbix frontend) or process user (for Zabbix server/proxy or agent) have only those privileges that are essential to perform intended functions. In other words, user accounts at all times should run with as few privileges as possible.  ::: noteimportant Giving extra permissions to 'zabbix' user will allow it to access configuration files and execute operations that can compromise the overall security of the infrastructure. :::  When implementing the least privilege principle for user accounts, Zabbix [frontend user types](/manual/config/users_and_usergroups/permissions) should be taken into account. It is important to understand that while a "Admin" user type has less privileges than "Super Admin" user type, it has administrative permissions that allow managing configuration and execute custom scripts.  ::: noteclassic Some information is available even for non-privileged users. For example, while *Administration* → *Scripts* is not available for non-Super Admins, scripts themselves are available for retrieval by using Zabbix API. Limiting script permissions and not adding sensitive information (like access credentials, etc) should be used to avoid exposure of sensitive information available in global scripts. :::
zh-cn	#### 最小权限原则  Zabbix应该始终遵守最小权限原则。 该原则意味着用户的账号（在Zabbix前端）或流程用户（对于Zabbix server/proxy或agent）仅具有执行预期功能所必需的权限。 换句话说，用户账号应始终以尽可能小的权限运行。  ::: noteimportant 赋予“zabbix”用户提供额外权限将允许其访问配置文件，并执行可能损害基础架构整体安全性的操作。 :::  最小权限原则，应考虑 Zabbix [前端用户类型](/manual/config/users_and_usergroups/permissions)。 重要的是要理解，虽然“管理员”用户类型的权限低于“超级管理员”用户类型，但它具有允许管理配置和执行自定义脚本的管理权限。   ::: noteclassic 某些信息甚至适用于非特权用户。例如，虽然 *Administration* → *Scripts* 不适用于非超级管理员，但脚本本身可通过使用 Zabbix API 来进行检索。 应使用限制脚本权限和不添加敏感信息（如访问凭据等）来避免暴露全局脚本中可用的敏感信息。 :::

en-us	#### Problem event popup  The problem event popup includes the list of problem events for this trigger and, if defined, the trigger description and a clickable URL.  ![](../../../../../assets/en/manual/web_interface/problem_event_popup.png){width="600"}  To bring up the problem event popup:  -   roll a mouse over the problem duration in the *Duration* column of     the *Problems* widget. The popup disappears once you remove the     mouse from the duration. -   click on the duration in the *Duration* column of the *Problems*     widget. The popup disappears only if you click on the duration     again.  ::: noteimportant Resolved values of {ITEM.VALUE} and {ITEM.LASTVALUE} macros in trigger descriptions are truncated to 20 characters. To see the entire values you may use [macro functions](/manual/config/macros/macro_functions) with these macros, e.g. `{{ITEM.VALUE}.regsub("(.*)", \1)}`, `{{ITEM.LASTVALUE}.regsub("(.*)", \1)}` as a workaround. :::
zh-cn	#### 问题事件弹窗  问题事件弹窗包括此触发器的问题事件列表和问题描述和可点击的URL（如果定义了）。  ![](../../../../../assets/en/manual/web_interface/problem_event_popup.png){width="600"}  要显示问题事件弹窗：  -   滚动鼠标到问题时间的上方（*问题*组件的*时间*栏）。当您把鼠标从时间移开时，弹窗会消失。 -   点击问题时间（*问题*组件的*时间*栏）。弹窗只会在您再次点击问题时间时消失。  ::: noteimportant 触发器描述中的 {ITEM.VALUE} 和 {ITEM.LASTVALUE} 的解析值被截取为20个字符。 查看完整数据，您可以使用通过宏使用[宏函数](/manual/config/macros/macro_functions)， 例如 `{{ITEM.VALUE}.regsub("(.*)", \1)}`, `{{ITEM.LASTVALUE}.regsub("(.*)", \1)}`。 :::

en-us	#### Problem events  A problem event is created:  -   when a trigger expression evaluates to TRUE if the trigger is in OK     state; -   each time a trigger expression evaluates to TRUE if multiple problem     event generation is enabled for the trigger.
zh-cn	#### 问题事件  以下情况，会创建一个问题事件：  -   当触发器状态正常，触发器表达式评估结果为TRUE时； -   当触发器启用了多重问题事件生成，每次触发器表达式评估结果为TRUE时。

en-us	# problem.get
zh-cn	# 获取

en-us	#### Problems  Retrieve problems according to the given parameters.  [Problem API](/manual/api/reference/problem)
zh-cn	#### 问题  根据给定的参数检索问题。  [Problem API](/manual/api/reference/problem)

en-us	### Problem tag  Problem tags allow linking services with problem events. The problem tag object has the following properties.  | Property              | [Type](/manual/api/reference_commentary#data_types) | Description                                                                                 | |-----------------------|-----------------------------------------------------|---------------------------------------------------------------------------------------------| | **tag**<br>(required) | string                                              | Problem tag name.                                                                           | | operator              | integer                                             | Mapping condition operator.<br><br>Possible values:<br>0 - *(default)* equals;<br>2 - like. | | value                 | string                                              | Problem tag value.                                                                          |
zh-cn	 ### 问题标签  问题标签允许将服务和故障事件关联起来。问题标签对象有如下属性。  | 属性              | [类型](/manual/api/reference_commentary#数据_类型) | 描述                                                                                 | |-----------------------|-----------------------------------------------------|---------------------------------------------------------------------------------------------| | **tag**<br>(必须) | string                                              | 问题标签名称。                                                                           | | operator              | integer                                             | 条件运算符映射。<br><br>可能的值<br>0 - *(默认)* 等于；<br>2 - 类似。| | value                 | string                                              | 问题标签值。                                                                          |

en-us	 #### Problem tags  Problem tags are used to match problems and services. These tags are specified at the primary service configuration tab.   Only child services of the lowest hierarchy level may have problem tags defined and be directly correlated to problems. If problem tags match,  the service status will change to the same status as the problem has. In case of several problems, a service will have the status of the most severe one. Status of a  parent service is then calculated based on child services statuses according to Status calculation rules.   If several tags are specified, *AND* logic is used: a problem must have all tags  specified in the service configuration to be mapped to the service.   ![](../../../assets/en/manual/config/problem_tags.png){width=600}   :::noteclassic A problem in Zabbix inherits tags from the whole chain of templates, hosts, items, web scenarios, and triggers. Any of these tags can be used for matching problems to services. ::: 
zh-cn	#### 问题标签  问题标签用于匹配问题和服务。这些标签在主服务配置选项卡中指定。  只有最低层次级别的子服务可以定义问题标签并直接关联问题。如果问题标签匹配，服务状态将更改为与问题相同的状态。在多个问题的情况下，服务将具有最严重的状态。然后根据状态计算规则基于子服务状态计算父服务的状态。  如果指定了多个标签，则使用 *AND* 逻辑：问题必须将服务配置中指定的所有标签都映射到服务。  ![](../../../assets/en/manual/config/problem_tags.png){width=600}   :::noteclassic Zabbix 中的问题从模板、主机、项目、Web 场景和触发器的整个链中继承标签。这些标签中的任何一个都可用于匹配问题与服务。 ::: 

en-us	### Problem tag  The problem tag object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |tag|string|Problem tag name.| |value|string|Problem tag value.|
zh-cn	### 问题标签  问题标签对象具有以下属性。  |属性|[类型](/manual/api/reference_commentary#数据类型)|描述| |--------|---------------------------------------------------|-----------| |tag|string|问题标签名称。| |value|string|问题标签值。|

en-us	### Problem tag  The problem tag object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--------|---------------------------------------------------|-----------| |tag|string|Problem tag name.| |value|string|Problem tag value.|
zh-cn	### 问题标签  问题标签对象具有以下属性。  |属性|[类型](/manual/api/reference_commentary#数据类型)|描述| |--------|---------------------------------------------------|-----------| |tag|string|问题标签名称。| |value|string|问题标签值。|

en-us	### Problem tag  The problem tag object is used to define which problems must be suppressed when the maintenance comes into effect. It has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--------|---------------------------------------------------|-----------| |**tag**<br>(required)|string|Problem tag name.| |operator|integer|Condition operator.<br><br>Possible values:<br>0 - Equals;<br>2 - *(default)* Contains.| |value|string|Problem tag value.|
zh-cn	 ### 问题标签  问题标签对象用于定义维护生效时必须抑制哪些问题。它具有以下属性。  |属性|[类型](/manual/api/reference_commentary#数据类型)|描述| |--------|---------------------------------------------------|-----------| |**tag**<br>(必需)|string|问题标签名字。| |operator|integer|条件运算符。<br><br>可能的值:<br>0 - 等于;<br>2 - *(默认值)* 包含。| |value|string|问题标签值。|

en-us	### Problem tag  The problem tag object is used to define which problems must be suppressed when the maintenance comes into effect. It has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |**tag**<br>(required)|string|Problem tag name.| |operator|integer|Condition operator.<br><br>Possible values:<br>0 - Equals;<br>2 - *(default)* Contains.| |value|string|Problem tag value.|  Tags can only be specified for maintenance periods with data collection (`"maintenance_type":0`).
zh-cn	 ### 问题标签  问题标签对象用于定义维护生效时必须抑制哪些问题。它具有以下属性。  |属性|[类型](/manual/api/reference_commentary#数据类型)|描述| |--------|---------------------------------------------------|-----------| |**tag**<br>(必需)|string|问题标签名字。| |operator|integer|条件运算符。<br><br>可能的值:<br>0 - 等于;<br>2 - *(默认值)* 包含。| |value|string|问题标签值。|

en-us	# Problem  This class is designed to work with problems.  Object references:\  -   [Problem](/manual/api/reference/problem/object#problem)  Available methods:\  -   [problem.get](/manual/api/reference/problem/get) - retrieving     problems
zh-cn	# 问题  此类设计用于管理问题。  对象引用：\  -   [问题](/manual/api/reference/problem/object#问题)  可用方法：\  -   [problem.get](/manual/api/reference/problem/get) - 获取问题

en-us	##### Problem update window  If a problem arises for a trigger with the *Manual close* flag, you can open the [problem update](/manual/acknowledges#updating_problems) popup window of that problem and close the problem manually.  To close the problem, check the *Close problem* option in the form and click on *Update*.  ![](../../../../assets/en/manual/config/close_problem1.png)  All mandatory input fields are marked with a red asterisk.  The request is processed by Zabbix server. Normally it will take a few seconds to close the problem. During that process *CLOSING* is displayed in *Monitoring* → *Problems* as the status of the problem.
zh-cn	##### 问题更新窗口  如果触发器配置了*手动关闭*标识的问题出现，你可以打开这个问题的[问题更新](/manual/acknowledges#updating_problems)弹窗手动关闭。  要关闭问题，勾选列表中的*关闭问题*选项并单击*更新*。  ![](../../../../assets/en/manual/config/close_problem1.png)  所有必填输入字段都标有红色星号。  请求由Zabbix服务器处理。一般关闭问题只需要几秒钟。在*关闭中*的过程问题的状态显示在*监控* → *问题*里。

en-us	##### Problem with dots  So far so good. But what if an attribute name or a hash key contains dot symbol? Here is an example:      jmx[com.example:Type=Hello,all.fruits.apple.weight]  That's a problem. How to tell Zabbix that attribute name is "all.fruits", not just "all"? How to distinguish a dot that is part of the name from the dot that separates an attribute name and hash keys?  Before **2.0.4** Zabbix Java gateway was unable to handle such situations and users were left with UNSUPPORTED items. Since 2.0.4 this is possible, all you need to do is to escape the dots that are part of the name with a backslash:      jmx[com.example:Type=Hello,all\.fruits.apple.weight]  Same way, if your hash key contains a dot you escape it:      jmx[com.example:Type=Hello,all\.fruits.apple.total\.weight]
zh-cn	 ##### 关于点的问题  当属性名或哈希键包含点，下面就是个例子:      jmx[com.example:Type=Hello,all.fruits.apple.weight]  如何告诉Zabbix属性名是"all.fruits"，而不只是“all”呢？如何区分作为属性名称一部分的点与分隔属性名和哈希键的点呢？这是一个问题。  在 **2.0.4** 版本之前，Zabbix Java Gateway是无法处理此类情况的,在监控项里,用户只能留下UNSUPPORTED项了。 从2.0.4开始解决了此问题，你所需要做的就是用反斜杠来转义名字的一部分点：      jmx[com.example:Type=Hello,all\.fruits.apple.weight]  同样，如果哈希键包含一个点，你也可以转义它：      jmx[com.example:Type=Hello,all\.fruits.apple.total\.weight]

en-us	##### Process data  |Item key|<|<|<| |--|--|------|------| |Description|Return value|Parameters|Comments| |**proc.cpu.util**\[<name>,<user>,<type>,<cmdline>,<mode>,<zone>\]|<|<|<| |Process CPU utilization percentage.|Float|**name** - process name (default is *all processes*)<br>**user** - user name (default is *all users*)<br>**type** - CPU utilization type:<br>*total* (default), *user*, *system*<br>**cmdline** - filter by command line (it is a regular [expression](/manual/regular_expressions#overview))<br>**mode** - data gathering mode: *avg1* (default), *avg5*, *avg15*<br>**zone** - target zone: *current* (default), *all*. This parameter is supported on Solaris only.|Examples:<br>=> proc.cpu.util\[,root\] → CPU utilization of all processes running under the "root" user<br>=> proc.cpu.util\[zabbix\_server,zabbix\] → CPU utilization of all zabbix\_server processes running under the zabbix user<br><br>The returned value is based on single CPU core utilization percentage. For example CPU utilization of a process fully using two cores is 200%.<br><br>The process CPU utilization data is gathered by a collector which supports the maximum of 1024 unique (by name, user and command line) queries. Queries not accessed during the last 24 hours are removed from the collector.<br><br>*Note* that when setting the `zone` parameter to *current* (or default) in case the agent has been compiled on a Solaris without zone support, but running on a newer Solaris where zones are supported, then the agent will return NOTSUPPORTED (the agent cannot limit results to only the current zone). However, *all* is supported in this case.<br><br>This key is supported since Zabbix 3.0.0 and is available on several platforms (see [Items supported by platform](/manual/appendix/items/supported_by_platform)).| |**proc.mem**\[<name>,<user>,<mode>,<cmdline>,<memtype>\]|<|<|<| |Memory used by process in bytes.|Integer - with `mode` as *max*, *min*, *sum*<br><br>Float - with `mode` as *avg*|**name** - process name (default is *all processes*)<br>**user** - user name (default is *all users*)<br>**mode** - possible values:<br>*avg*, *max*, *min*, *sum* (default)<br>**cmdline** - filter by command line (it is a regular [expression](/manual/regular_expressions#overview))<br>**memtype** - [type of memory](/manual/appendix/items/proc_mem_notes) used by process|Examples:<br>=> proc.mem\[,root\] → memory used by all processes running under the "root" user<br>=> proc.mem\[zabbix\_server,zabbix\] → memory used by all zabbix\_server processes running under the zabbix user<br>=> proc.mem\[,oracle,max,oracleZABBIX\] → memory used by the most memory-hungry process running under oracle having oracleZABBIX in its command line<br><br>*Note*: When several processes use shared memory, the sum of memory used by processes may result in large, unrealistic values.<br><br>See [notes](/manual/appendix/items/proc_mem_num_notes) on selecting processes with `name` and `cmdline` parameters (Linux-specific).<br><br>When this item is invoked from the command line and contains a command line parameter (e.g. using the agent test mode: `zabbix_agentd -t proc.mem[,,,apache2]`), one extra process will be counted, as the agent will count itself.<br><br>The `memtype` parameter is supported on several [platforms](/manual/appendix/items/supported_by_platform) since Zabbix 3.0.0.| |**proc.num**\[<name>,<user>,<state>,<cmdline>,<zone>\]|<|<|<| |The number of processes.|Integer|**name** - process name (default is *all processes*)<br>**user** - user name (default is *all users*)<br>**state** (*disk* and *trace* options since version 3.4.0) - possible values:<br>*all* (default),<br>*disk* - uninterruptible sleep,<br>*run* - running,<br>*sleep* - interruptible sleep,<br>*trace* - stopped,<br>*zomb* - zombie<br>**cmdline** - filter by command line (it is a regular [expression](/manual/regular_expressions#overview))<br>**zone** - target zone: *current* (default), *all*. This parameter is supported on Solaris only.|Examples:<br>=> proc.num\[,mysql\] → number of processes running under the mysql user<br>=> proc.num\[apache2,www-data\] → number of apache2 processes running under the www-data user<br>=> proc.num\[,oracle,sleep,oracleZABBIX\] → number of processes in sleep state running under oracle having oracleZABBIX in its command line<br><br>See [notes](/manual/appendix/items/proc_mem_num_notes) on selecting processes with `name` and `cmdline` parameters (Linux-specific).<br><br>On Windows, only the `name` and `user` parameters are supported.<br><br>When this item is invoked from the command line and contains a command line parameter (e.g. using the agent test mode: `zabbix_agentd -t proc.num[,,,apache2]`), one extra process will be counted, as the agent will count itself.<br><br>*Note* that when setting the `zone` parameter to *current* (or default) in case the agent has been compiled on a Solaris without zone support, but running on a newer Solaris where zones are supported, then the agent will return NOTSUPPORTED (the agent cannot limit results to only the current zone). However, *all* is supported in this case.|
zh-cn	##### 进程数据  |键值|<|<|<| |---|---|---|---| |描述|返回值|参数|注释| |**proc.cpu.util**\[<name>,<user>,<type>,<cmdline>,<mode>,<zone>\]|<|<|<| |进程CPU使用百分比.|浮点型|**name** -进程名 (默认是 *all processes*)<br>**user** - 用户名称 (默认是*all users*)<br>**type** -CPU使用率类型:<br>*total* (默认), *user*, *system*<br>**cmdline** - 可按命令行过滤(它是一个正则[表达式](/manual/regular_expressions#overview))<br>**mode** - 数据搜集模式: *avg1* (默认), *avg5*, *avg15*<br>**zone** - 目标区域: *current* (默认), *all*. 这个参数仅在Solaris平台上支持|例:<br>=> proc.cpu.util\[,root\] → 在root用户下运行的所有进程的CPU使用率<br>=> proc.cpu.util\[zabbix\_server,zabbix\] →在zabbix用户下运行的所有 zabbix\_server 进程的CPU使用率<br><br>T返回值基于单个 CPU 核心利用率百分比。例如，完全使用两个内核的进程的 CPU 利用率为 200%。<br><br>进程 CPU 利用率数据由支持最多 1024 个唯一（按名称、用户和命令行）查询的收集器收集。在过去 24 小时内未访问的查询将从收集器中删除。<br><br>*请注意* 将zone参数设置为*current* （或默认值）如果agent已在不支持区域的 Solaris 上编译，但在支持区域的较新 Solaris 上运行，则agent将返回 NOTSUPPORTED（agent不能将结果限制为仅当前区域）。但是，在这种情况下，*all*都支持。<br><br>自 Zabbix 3.0.0 起支持此键，并且可在多个平台上使用 (请参阅 [平台支持的监控项](/manual/appendix/items/supported_by_platform))。| |**proc.mem**\[<name>,<user>,<mode>,<cmdline>,<memtype>\]|<|<|<| |进程使用的内存（以字节为单位）|整型 - 当 `mode` 为 *max*, *min*, *sum*时<br><br>浮点数 - 当 `mode` 为 *avg*时|**name** -进程名 (默认是 *all processes*)<br>**user** - 用户名 (默认是 *all users*)<br>**mode** - 可能的值:<br>*avg*, *max*, *min*, *sum* (默认)<br>**cmdline** - 按命令行过滤(它是一个正则 [表达式](/manual/regular_expressions#overview))<br>**memtype** - 进程使用的[内存类型](/manual/appendix/items/proc_mem_notes) |例如:<br>=> proc.mem\[,root\] → 运行在root用户下的所有进程使用的内存<br>=> proc.mem\[zabbix\_server,zabbix\] → 运行在zabbix用户下的所有zabbix\_server进程使用的内存<br>=> proc.mem\[,oracle,max,oracleZABBIX\] → 在oracle用户下，包含有oracleZABBIX命令行运行的所有内存最多的内存<br><br>*需要注意*:当多个进程使用共享内存时，进程使用的内存总和可能会导致大到不切实际。<br><br>参考 [说明](/manual/appendix/items/proc_mem_num_notes) 关于选择进程 `name` 和 `cmdline` 参数 (指定为Linux).<br><br>当此监控项从命令行调用并包含命令行参数时 (例如 使用agent测试模式: `zabbix_agentd -t proc.mem[,,,apache2]`), 一个额外的进程将被计算在内，因为agent将计算自己。<br><br>从Zabbix3.0.0起， `memtype` 参数开始支持多个 [平台](/manual/appendix/items/supported_by_platform) | |**proc.num**\[<name>,<user>,<state>,<cmdline>,<zone>\]|<|<|<| |进程数量|整型|**name** - 进程名称 (默认为 *all processes*)<br>**user** - 用户名 (默认为 *all users*)<br>**state** (*disk* 和 *trace* 选项从3.4.0起) - 可能值:<br>*all* (默认),<br>*disk* - 不间断睡眠,<br>*run* - 运行,<br>*sleep* - 可中断的睡眠,<br>*trace* - 停止,<br>*zomb* - 僵尸<br>**cmdline** - 按命令行过滤(它是一个正则[表达式](/manual/regular_expressions#overview))<br>**zone** -目标区域: *current* (默认), *all*. 此参数仅在 Solaris 上受支持。|例如:<br>=> proc.num\[,mysql\] → 在mysql用户下运行的进程数<br>=> proc.num\[apache2,www-data\] → www-data 用户下运行的 apache2 进程数<br>=> proc.num\[,oracle,sleep,oracleZABBIX\] → 在oracleZABBIX命令行下的oracle用户运行的睡眠状态进程数<br><br> [说明](/manual/appendix/items/proc_mem_num_notes) 关于选择进程 `name` 和 `cmdline` 参数 (指定于Linux)。<br><br>在Windows上仅支持`name`和`user`参数<br><br>当此监控项从命令行调用并包含命令行参数时 (例如 使用agent测试模式: `zabbix_agentd -t proc.num[,,,apache2]`), 一个额外的进程将被计算在内，因为agent将计算自己。<br><br>*请注意* 将zone参数设置为*current* （或默认值）如果agent已在不支持区域的 Solaris 上编译，但在支持区域的较新 Solaris 上运行，则agent将返回 NOTSUPPORTED（agent不能将结果限制为仅当前区域）。但是，在这种情况下，*all*都支持。|

en-us	#### Processes modifying their commandline  Some programs use modifying their commandline as a method for displaying their current activity. A user can see the activity by running `ps` and `top` commands. Examples of such programs include *PostgreSQL*, *Sendmail*, *Zabbix*.  Let's see an example from Linux. Let's assume we want to monitor a number of Zabbix agent processes.  `ps` command shows processes of interest as      $ ps -fu zabbix     UID        PID  PPID  C STIME TTY          TIME CMD     ...     zabbix    6318     1  0 12:01 ?        00:00:00 sbin/zabbix_agentd -c /home/zabbix/ZBXNEXT-1078/zabbix_agentd.conf     zabbix    6319  6318  0 12:01 ?        00:00:01 sbin/zabbix_agentd: collector [idle 1 sec]                               zabbix    6320  6318  0 12:01 ?        00:00:00 sbin/zabbix_agentd: listener #1 [waiting for connection]                 zabbix    6321  6318  0 12:01 ?        00:00:00 sbin/zabbix_agentd: listener #2 [waiting for connection]                 zabbix    6322  6318  0 12:01 ?        00:00:00 sbin/zabbix_agentd: listener #3 [waiting for connection]                 zabbix    6323  6318  0 12:01 ?        00:00:00 sbin/zabbix_agentd: active checks #1 [idle 1 sec]                        ...  Selecting processes by name and user does the job:      $ zabbix_get -s localhost -k 'proc.num[zabbix_agentd,zabbix]'     6  Now let's rename `zabbix_agentd` executable to `zabbix_agentd_30` and restart it.  `ps` now shows      $ ps -fu zabbix     UID        PID  PPID  C STIME TTY          TIME CMD     ...     zabbix    6715     1  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30 -c /home/zabbix/ZBXNEXT-1078/zabbix_agentd.conf     zabbix    6716  6715  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30: collector [idle 1 sec]                               zabbix    6717  6715  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30: listener #1 [waiting for connection]                 zabbix    6718  6715  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30: listener #2 [waiting for connection]                 zabbix    6719  6715  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30: listener #3 [waiting for connection]                 zabbix    6720  6715  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30: active checks #1 [idle 1 sec]                        ...  Now selecting processes by name and user produces an incorrect result:      $ zabbix_get -s localhost -k 'proc.num[zabbix_agentd_30,zabbix]'     1  Why a simple renaming of executable to a longer name lead to quite different result ?  Zabbix agent starts with checking the process name. `/proc/<pid>/status` file is opened and the line `Name` is checked. In our case the `Name` lines are:      $ grep Name /proc/{6715,6716,6717,6718,6719,6720}/status     /proc/6715/status:Name:   zabbix_agentd_3     /proc/6716/status:Name:   zabbix_agentd_3     /proc/6717/status:Name:   zabbix_agentd_3     /proc/6718/status:Name:   zabbix_agentd_3     /proc/6719/status:Name:   zabbix_agentd_3     /proc/6720/status:Name:   zabbix_agentd_3  The process name in `status` file is truncated to 15 characters.  A similar result can be seen with `ps` command:      $ ps -u zabbix       PID TTY          TIME CMD     ...      6715 ?        00:00:00 zabbix_agentd_3      6716 ?        00:00:01 zabbix_agentd_3      6717 ?        00:00:00 zabbix_agentd_3      6718 ?        00:00:00 zabbix_agentd_3      6719 ?        00:00:00 zabbix_agentd_3      6720 ?        00:00:00 zabbix_agentd_3      ...  Obviously, that is not equal to our `proc.num[]` `name` parameter value `zabbix_agentd_30`. Having failed to match the process name from `status` file the Zabbix agent turns to `/proc/<pid>/cmdline` file.  How the agent sees the "cmdline" file can be illustrated with running a command      $ for i in 6715 6716 6717 6718 6719 6720; do cat /proc/$i/cmdline | awk '{gsub(/\x0/,"<NUL>"); print};'; done     sbin/zabbix_agentd_30<NUL>-c<NUL>/home/zabbix/ZBXNEXT-1078/zabbix_agentd.conf<NUL>     sbin/zabbix_agentd_30: collector [idle 1 sec]<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>...     sbin/zabbix_agentd_30: listener #1 [waiting for connection]<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>...     sbin/zabbix_agentd_30: listener #2 [waiting for connection]<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>...     sbin/zabbix_agentd_30: listener #3 [waiting for connection]<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>...     sbin/zabbix_agentd_30: active checks #1 [idle 1 sec]<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>...  `/proc/<pid>/cmdline` files in our case contain invisible, non-printable null bytes, used to terminate strings in *C* language. The null bytes are shown as "<NUL>" in this example.  Zabbix agent checks "cmdline" for the main process and takes a `zabbix_agentd_30`, which matches our `name` parameter value `zabbix_agentd_30`. So, the main process is counted by item `proc.num[zabbix_agentd_30,zabbix]`.  When checking the next process, the agent takes `zabbix_agentd_30: collector [idle 1 sec]` from the `cmdline` file and it does not meet our `name` parameter `zabbix_agentd_30`. So, only the main process which does not modify its commandline, gets counted. Other agent processes modify their command line and are ignored.  This example shows that the `name` parameter cannot be used in `proc.mem[]` and `proc.num[]` for selecting processes in this case.  Using `cmdline` parameter with a proper regular expression produces a correct result:      $ zabbix_get -s localhost -k 'proc.num[,zabbix,,zabbix_agentd_30[ :]]'     6  Be careful when using `proc.mem[]` and `proc.num[]` items for monitoring programs which modify their commandlines.  Before putting `name` and `cmdline` parameters into `proc.mem[]` and `proc.num[]` items, you may want to test the parameters using `proc.num[]` item and `ps` command.
zh-cn	#### 修改其命令行的进程  一些程序使用修改它们的命令行作为显示当前活动的方法。 用户可以通过运行  `ps`  和  `top`  命令来查看活动。这些程序的例子包括  *PostgreSQL*, *Sendmail*, *Zabbix*.  让我们来看一个Linux的例子，假设我们想要监视许多Zabbix agent进程。  `ps`  命令显示的进程如下      $ ps -fu zabbix     UID        PID  PPID  C STIME TTY          TIME CMD     ...     zabbix    6318     1  0 12:01 ?        00:00:00 sbin/zabbix_agentd -c /home/zabbix/ZBXNEXT-1078/zabbix_agentd.conf     zabbix    6319  6318  0 12:01 ?        00:00:01 sbin/zabbix_agentd: collector [idle 1 sec]                               zabbix    6320  6318  0 12:01 ?        00:00:00 sbin/zabbix_agentd: listener #1 [waiting for connection]                 zabbix    6321  6318  0 12:01 ?        00:00:00 sbin/zabbix_agentd: listener #2 [waiting for connection]                 zabbix    6322  6318  0 12:01 ?        00:00:00 sbin/zabbix_agentd: listener #3 [waiting for connection]                 zabbix    6323  6318  0 12:01 ?        00:00:00 sbin/zabbix_agentd: active checks #1 [idle 1 sec]                        ...  通过名称和用户选择进程来完成任务:      $ zabbix_get -s localhost -k 'proc.num[zabbix_agentd,zabbix]'     6   现在让我们将  `zabbix_agentd`  重命名为  `zabbix_agentd_30`  并重新启动它。  `ps`  现在显示为      $ ps -fu zabbix     UID        PID  PPID  C STIME TTY          TIME CMD     ...     zabbix    6715     1  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30 -c /home/zabbix/ZBXNEXT-1078/zabbix_agentd.conf     zabbix    6716  6715  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30: collector [idle 1 sec]                               zabbix    6717  6715  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30: listener #1 [waiting for connection]                 zabbix    6718  6715  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30: listener #2 [waiting for connection]                 zabbix    6719  6715  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30: listener #3 [waiting for connection]                 zabbix    6720  6715  0 12:53 ?        00:00:00 sbin/zabbix_agentd_30: active checks #1 [idle 1 sec]                        ...  现在根据名称和用户选择进程会产生不正确的结果:      $ zabbix_get -s localhost -k 'proc.num[zabbix_agentd_30,zabbix]'     1   为什么将可执行文件重命名为更长的名称会导致完全不同的结果?  Zabbix agent 启动时检查进程名字，  `/proc/<pid>/status`  文件是打开的并且检查  `Name`  行。 我们的例子中  `Name`  行如下:      $ grep Name /proc/{6715,6716,6717,6718,6719,6720}/status     /proc/6715/status:Name:   zabbix_agentd_3     /proc/6716/status:Name:   zabbix_agentd_3     /proc/6717/status:Name:   zabbix_agentd_3     /proc/6718/status:Name:   zabbix_agentd_3     /proc/6719/status:Name:   zabbix_agentd_3     /proc/6720/status:Name:   zabbix_agentd_3   `status`  文件中的进程名会被截断为15个字符。  `ps`  命令会产生相似的结果:      $ ps -u zabbix       PID TTY          TIME CMD     ...      6715 ?        00:00:00 zabbix_agentd_3      6716 ?        00:00:01 zabbix_agentd_3      6717 ?        00:00:00 zabbix_agentd_3      6718 ?        00:00:00 zabbix_agentd_3      6719 ?        00:00:00 zabbix_agentd_3      6720 ?        00:00:00 zabbix_agentd_3      ...  显然, 跟我们的  `proc.num[]`  `name`  参数值  `zabbix_agentd_30`并不一样。 Zabbix agent从`status`  文件中匹配进程名失败后，会转到  `/proc/<pid>/cmdline`文件。  agent如何看待“cmdline”文件，可以通过运行一个命令来说明      $ for i in 6715 6716 6717 6718 6719 6720; do cat /proc/$i/cmdline | awk '{gsub(/\x0/,"<NUL>"); print};'; done     sbin/zabbix_agentd_30<NUL>-c<NUL>/home/zabbix/ZBXNEXT-1078/zabbix_agentd.conf<NUL>     sbin/zabbix_agentd_30: collector [idle 1 sec]<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>...     sbin/zabbix_agentd_30: listener #1 [waiting for connection]<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>...     sbin/zabbix_agentd_30: listener #2 [waiting for connection]<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>...     sbin/zabbix_agentd_30: listener #3 [waiting for connection]<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>...     sbin/zabbix_agentd_30: active checks #1 [idle 1 sec]<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>...  `/proc/<pid>/cmdline`  文件包含在 *C* 语言中用于终止字符的隐藏的、 不可显示的空字符 。 这个例子中空字符以 "<NUL>" 形式出现。  Zabbix agent 检查 "cmdline" ，得到  `zabbix_agentd_30`值， 该值匹配我们的`name`  参数值  `zabbix_agentd_30`。 因此, 主进程会被监控项  `proc.num[zabbix_agentd_30,zabbix]`计数。  当检查下一进程时, agent 从`cmdline`文件中得到  `zabbix_agentd_30: collector [idle 1 sec]`  ，但不匹配  `name`  参数值  `zabbix_agentd_30`。 所以，只有不改变命令行的主进程被计数， 其他的 agent 进程改变了命令行而被忽略。  这个例子展示了  `name`  参数不能用在  `proc.mem[]`  和  `proc.num[]`  监控项中来选择进程。  `cmdline`  参数使用恰当的正则表达式会达到一个正确的结果:      $ zabbix_get -s localhost -k 'proc.num[,zabbix,,zabbix_agentd_30[ :]]'     6  使用 proc.mem[] 和 proc.num[] 项监视修改其命令行的程序时要小心  在将 `name` 和 `cmdline` 参数放入 `proc.mem[]` 和 `proc.num[]` 项之前，您可能需要使用 `proc.num[]` 项和 `ps` 命令测试参数.

en-us	#### Process user  Zabbix agent on UNIX is designed to run as a non-root user. It will run as whatever non-root user it is started as. So you can run agent as any non-root user without any issues.  If you will try to run it as 'root', it will switch to a hardcoded 'zabbix' user, which must be present on your system. You can only run agent as 'root' if you modify the 'AllowRoot' parameter in the agent configuration file accordingly.
zh-cn	 #### 进程用户  Zabbix agent 在 UNIX 上允许使用非 root 用户运行。它将以任何非 root 用户的身份运行。因此，使用非 root 用户运行 agent 是没有任何问题的.  如果你试图以“root”身份运行它，它将会切换到一个已经“写死”的“zabbix”用户，该用户必须存在于您的系统上。如果您只想以“root”用户运行 agent，您必须在 agent 配置文件里修改‘AllowRoot‘参数。

en-us	##### Process user  Zabbix proxy is designed to run as a non-root user. It will run as whatever non-root user it is started as. So you can run proxy as any non-root user without any issues.  If you will try to run it as 'root', it will switch to a hardcoded 'zabbix' user, which must be present on your system. You can only run proxy as 'root' if you modify the 'AllowRoot' parameter in the proxy configuration file accordingly.
zh-cn	##### 进程用户  Zabbix proxy被设计为以非root用户的身份运行。它将以任何非root用户的身份运行。因此，您可以作为任何非root用户运行代理而没有任何问题。  如果您尝试以“root”身份运行它，它将切换到硬编码的“zabbix”用户，这必须在您的系统上。如果你相应地修改了代理配置文件中的AllowRoot参数，那么你只能以root身份运行proxy。

en-us	##### Process user  Zabbix server is designed to run as a non-root user. It will run as whatever non-root user it is started as. So you can run server as any non-root user without any issues.  If you will try to run it as 'root', it will switch to a hardcoded 'zabbix' user, which must be [present](/manual/installation/install) on your system. You can only run server as 'root' if you modify the 'AllowRoot' parameter in the server configuration file accordingly.  If Zabbix server and [agent](agent) are run on the same machine it is recommended to use a different user for running the server than for running the agent. Otherwise, if both are run as the same user, the agent can access the server configuration file and any Admin level user in Zabbix can quite easily retrieve, for example, the database password.
zh-cn	##### 进程用户  Zabbix server 允许使用非 root 用户运行。它将以任何非 root 用户的身份运行。因此，使用非 root 用户运行 server 是没有任何问题的.  如果你试图以“root”身份运行它，它将会切换到一个已经“写死”的“zabbix”用户，您可以参考 [安装](/manual/installation/install) 章节。按此相应地修改 Zabbix server 配置文件中的“AllowRoot”参数，则可以只以“root”身份运行 Zabbix server。  如果 Zabbix server 和 [agent](agent) 均运行在同一台服务器上，建议您使用不同的用户运行 server 和 agent 。否则,，如果两者都以相同的用户运行，Agent 可以访问 Server 的配置文件, 任何 Zabbix 管理员级别的用户都可以很容易地检索到 Server 的信息。例如，数据库密码。

en-us	#### Prometheus to JSON  Data from Prometheus can be used for low-level discovery. In this case data in JSON format are needed and the *Prometheus to JSON* preprocessing option will return exactly that.  For more details, see [Discovery using Prometheus data](/manual/discovery/low_level_discovery/examples/prometheus).
zh-cn	#### Prometheus转JSON  来自Prometheus 的数据可以被低级别自动发现使用。要这样使用数据，必须要转化为JSON格式。Zabbix提供了*Prometheus转JSON*作为预处理步骤的选项，这可以直接按照格式要求返回数据。  详情参见[在低级别自动发现中，使用Prometheus数据](/manual/discovery/low_level_discovery/examples/prometheus)。

en-us	##### Prometheus to JSON  In the discovery rule, go to the Preprocessing tab and select the *Prometheus to JSON* preprocessing option. Data in JSON format are needed for discovery and the *Prometheus to JSON* preprocessing option will return exactly that, with the following attributes:  -   metric name -   metric value -   help (if present) -   type (if present) -   labels (if present) -   raw line  For example, querying `wmi_logical_disk_free_bytes`:  ![](../../../../../assets/en/manual/discovery/low_level_discovery/lld_rule_prom_json.png)  from these Prometheus lines:      # HELP wmi_logical_disk_free_bytes Free space in bytes (LogicalDisk.PercentFreeSpace)     # TYPE wmi_logical_disk_free_bytes gauge     wmi_logical_disk_free_bytes{volume="C:"} 3.5180249088e+11     wmi_logical_disk_free_bytes{volume="D:"} 2.627731456e+09     wmi_logical_disk_free_bytes{volume="HarddiskVolume4"} 4.59276288e+08  will return:  ``` {.java} [     {         "name": "wmi_logical_disk_free_bytes",         "help": "Free space in bytes (LogicalDisk.PercentFreeSpace)",         "type": "gauge",         "labels": {             "volume": "C:"          },         "value": "3.5180249088e+11",         "line_raw": "wmi_logical_disk_free_bytes{volume=\"C:\"} 3.5180249088e+11"     },     {         "name": "wmi_logical_disk_free_bytes",         "help": "Free space in bytes (LogicalDisk.PercentFreeSpace)",         "type": "gauge",         "labels": {             "volume": "D:"          },         "value": "2.627731456e+09",         "line_raw": "wmi_logical_disk_free_bytes{volume=\"D:\"} 2.627731456e+09"     },     {         "name": "wmi_logical_disk_free_bytes",         "help": "Free space in bytes (LogicalDisk.PercentFreeSpace)",         "type": "gauge",         "labels": {             "volume": "HarddiskVolume4"          },         "value": "4.59276288e+08",         "line_raw": "wmi_logical_disk_free_bytes{volume=\"HarddiskVolume4\"} 4.59276288e+08"     } ] ```
zh-cn	##### Prometheus to JSON  在自动发现规则中, 找到预处理选项卡, 然后选择 *Prometheus to JSON* 这个预处理选项. 自动发现需要使用JSON格式的数据,  *Prometheus to JSON* 这个选项会返回所需的JSON格式, 并附带下列属性:  -   度量名称 -   度量值 -   帮助 (如果有) -   类型(如果有) -   标签(如果有) -   原始行  例如, 需要查询 `wmi_logical_disk_free_bytes`:  ![](../../../../../assets/en/manual/discovery/low_level_discovery/lld_rule_prom_json.png)  从这些Prometheus的行中执行上述查询:      # HELP wmi_logical_disk_free_bytes Free space in bytes (LogicalDisk.PercentFreeSpace)     # TYPE wmi_logical_disk_free_bytes gauge     wmi_logical_disk_free_bytes{volume="C:"} 3.5180249088e+11     wmi_logical_disk_free_bytes{volume="D:"} 2.627731456e+09     wmi_logical_disk_free_bytes{volume="HarddiskVolume4"} 4.59276288e+08  会返回:  ``` {.java} [     {         "name": "wmi_logical_disk_free_bytes",         "help": "Free space in bytes (LogicalDisk.PercentFreeSpace)",         "type": "gauge",         "labels": {             "volume": "C:"          },         "value": "3.5180249088e+11",         "line_raw": "wmi_logical_disk_free_bytes{volume=\"C:\"} 3.5180249088e+11"     },     {         "name": "wmi_logical_disk_free_bytes",         "help": "Free space in bytes (LogicalDisk.PercentFreeSpace)",         "type": "gauge",         "labels": {             "volume": "D:"          },         "value": "2.627731456e+09",         "line_raw": "wmi_logical_disk_free_bytes{volume=\"D:\"} 2.627731456e+09"     },     {         "name": "wmi_logical_disk_free_bytes",         "help": "Free space in bytes (LogicalDisk.PercentFreeSpace)",         "type": "gauge",         "labels": {             "volume": "HarddiskVolume4"          },         "value": "4.59276288e+08",         "line_raw": "wmi_logical_disk_free_bytes{volume=\"HarddiskVolume4\"} 4.59276288e+08"     } ] ```

en-us	#### Property labels  Some of the objects properties are marked with short labels to describe their behavior. The following labels are used:  -   *readonly* - the value of the property is set automatically and     cannot be defined or changed by the client; -   *constant* - the value of the property can be set when creating an     object, but cannot be changed after.
zh-cn	 #### 属性标签  一些对象属性用短标签来描述它们的行为。可使用以下标签：  -   *readonly* - 属性值是自动设置的，不能被客户端定义或修改； -   *constant* - 属性值可以在创建对象时被设置，创建后不能被修改。

en-us	| Property                       | [Type](/manual/api/reference_commentary#data_types) | Description                                                                           | |--------------------------------|-----------------------------------------------------|---------------------------------------------------------------------------------------| | **name**<br>(required)         | string                                              | Name of the excluded downtime.                                                        | | **period\_from**<br>(required) | integer                                             | Starting time of the excluded downtime (inclusive).<br><br>Possible values: timestamp. | | **period\_to**<br>(required)   | integer                                             | Ending time of the excluded downtime (exclusive).<br><br>Possible values: timestamp.  |
zh-cn	| 属性| [类型](/manual/api/reference_commentary#data_types) | Description                                                                           | |--------------------------------|-----------------------------------------------------|---------------------------------------------------------------------------------------| | **name**<br>(必填)         | 字符串|排除的停机时间的名称。                                                     | | **period\_from**<br>(必填) | 整型|排除的停机时间（含）的开始时间。<br><br>可能的值：时间戳。  | | **period\_to**<br>(必填)   | 整型|排除停机时间的结束时间（不包括）。<br><br>可能的值：时间戳。|

en-us	| Property                       | [Type](/manual/api/reference_commentary#data_types) | Description                                                                                                                         | |--------------------------------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------| | **period\_from**<br>(required) | integer                                             | Starting time of the recurrent weekly period of time (inclusive).<br><br>Possible values: number of seconds (counting from Sunday). | | **period\_to**<br>(required)   | integer                                             | Ending time of the recurrent weekly period of time (exclusive).<br><br>Possible values: number of seconds (counting from Sunday).   |
zh-cn	| 属性| [类型](/manual/api/reference_commentary#data_types) | 描述| |--------------------------------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------| | **period\_from**<br>(必填) | 整型| 每周重复周期的开始时间（含）。<br><br>可能的值：秒数（从星期日开始计算）。 | | **period\_to**<br>(必填)   | 整型|每周重复周期的结束时间（不包括）。<br><br>可能的值：秒数（从星期日开始计算）。  |

en-us	##### Protection against brute force attacks  In case of five consecutive failed login attempts, Zabbix interface will pause for 30 seconds in order to prevent brute force and dictionary attacks.  The IP address of a failed login attempt will be displayed after a successful login.
zh-cn	##### 防止暴力破解  为了防止暴力破解和词典攻击，如果发生连续五次尝试登录失败，Zabbix界面将暂停30秒。  在下次成功登录后，将会在界面上尝试登录失败的IP地址。

en-us	##### Protection from overloading  If Zabbix server was down for some time, and proxies have collected a lot of data,  and then the server starts, it may get overloaded (history cache usage stays at 95-100% for some time).  This overload could result in a performance hit, where checks are processed slower  than they should. Protection from this scenario was implemented to avoid problems that arise  due to overloading history cache.  When Zabbix server history cache is full the history cache write access is being  throttled, stalling server data gathering processes. The most common history cache  overload case is after server downtime when proxies are uploading gathered data. To avoid  this proxy throttling was added (currently it cannot be disabled).  Zabbix server will stop accepting data from proxies when history cache usage reaches 80%.  Instead those proxies will be put on a throttling list. This will continue until the cache usage  falls down to 60%. Now server will start accepting data from proxies one by one, defined by the  throttling list. This means the first proxy that attempted to upload data during the throttling  period will be served first and until it's done the server will not accept data from other proxies.  This throttling mode will continue until either cache usage hits 80% again or falls down to 20%  or the throttling list is empty. In the first case the server will stop accepting proxy data again.  In the other two cases the server will start working normally, accepting data from all proxies.  You may use the `zabbix[wcache,history,pused]` internal item to correlate this behavior of Zabbix  server with a metric.
zh-cn	#####  过载保护  如果Zabbix server宕机一段时间，proxy已经收集了大量数据，然后server启动，它可能会超载(历史缓存使用率在一段时间内保持在95-100%)。这种过载可能会导致性能下降，检查的处理速度比正常情况下要慢。 对这种场景的保护是为了避免由于重载历史缓存而产生的问题。  当Zabbix server 历史缓存满时，历史缓存写访问被限制，停止server数据收集进程。最常见的历史缓存过载情况是server停机后，proxy上传收集的数据。 为了避免这种情况，添加了proxy节流(目前无法禁用)。  当历史缓存使用率达到80%时，Zabbix server 将停止接受来自proxy的数据。 相反，这些proxy将被放在一个节流列表中。 这将持续到缓存使用率下降到60%。现在，server 将开始逐一接受来自节流列表定义的proxy的数据。 这意味着在节流期间试图上载数据的第一个proxy将首先被接收数据，在此之前，server将不会接受来自其他proxy的数据。  这种调节模式将继续，直到缓存使用率再次达到80%，或者下降到20%，或者调节列表为空。 在第一种情况下，server 将再次停止接受proxy数据。 在另外两种情况下，server 将开始正常工作，接受来自所有proxy的数据。  你可以使用`zabbix[wcache,history,pused]` 内部项将Zabbix server的行为与一个度量关联起来。

en-us	##### - Providing history export callbacks  ::: noteimportant History export via module is no longer supported by Zabbix proxy since Zabbix 4.0.0. :::  Module can specify functions to export history data by type: Numeric (float), Numeric (unsigned), Character, Text and Log:  ``` {.c} typedef struct {     void    (*history_float_cb)(const ZBX_HISTORY_FLOAT *history, int history_num);     void    (*history_integer_cb)(const ZBX_HISTORY_INTEGER *history, int history_num);     void    (*history_string_cb)(const ZBX_HISTORY_STRING *history, int history_num);     void    (*history_text_cb)(const ZBX_HISTORY_TEXT *history, int history_num);     void    (*history_log_cb)(const ZBX_HISTORY_LOG *history, int history_num); } ZBX_HISTORY_WRITE_CBS; ```  Each of them should take "history" array of "history\_num" elements as arguments. Depending on history data type to be exported, "history" is an array of the following structures, respectively:  ``` {.c} typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     double      value; } ZBX_HISTORY_FLOAT;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     zbx_uint64_t    value; } ZBX_HISTORY_INTEGER;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value; } ZBX_HISTORY_STRING;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value; } ZBX_HISTORY_TEXT;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value;     const char  *source;     int     timestamp;     int     logeventid;     int     severity; } ZBX_HISTORY_LOG; ```  Callbacks will be used by Zabbix server history syncer processes in the end of history sync procedure after data is written into Zabbix database and saved in value cache.
zh-cn	##### - 提供历史记录输出的回调  ::: noteimportant 从ZABBIX 4.0.0开始，不再支持通过ZABBIX Proxy模块输出历史记录 :::\  模块可以按来行指定输出历史数据的函数：数字（浮点）、数字（无符号）、字符串、文本和日志：\  ``` {.c} typedef struct {     void    (*history_float_cb)(const ZBX_HISTORY_FLOAT *history, int history_num);     void    (*history_integer_cb)(const ZBX_HISTORY_INTEGER *history, int history_num);     void    (*history_string_cb)(const ZBX_HISTORY_STRING *history, int history_num);     void    (*history_text_cb)(const ZBX_HISTORY_TEXT *history, int history_num);     void    (*history_log_cb)(const ZBX_HISTORY_LOG *history, int history_num); } ZBX_HISTORY_WRITE_CBS; ```  每个输出历史纪录的函数都应当把 "history\_num"元素 作为 “history”数组的参数。依据需要输出的历史记录类型，“history”分别是以下结构的数组：\  ``` {.c} typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     double      value; } ZBX_HISTORY_FLOAT;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     zbx_uint64_t    value; } ZBX_HISTORY_INTEGER;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value; } ZBX_HISTORY_STRING;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value; } ZBX_HISTORY_TEXT;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value;     const char  *source;     int     timestamp;     int     logeventid;     int     severity; } ZBX_HISTORY_LOG; ```  回调会在ZABBIX server的历史记录同步进程完成历史记录同步操作，数据被写入ZABBIX数据库并将值保存在值缓存中后执行。\

en-us	##### - Providing history export callbacks  ::: noteimportant History export via module is no longer supported by Zabbix proxy since Zabbix 4.0.0. :::  Module can specify functions to export history data by type: Numeric (float), Numeric (unsigned), Character, Text and Log:  ``` {.c} typedef struct {     void    (*history_float_cb)(const ZBX_HISTORY_FLOAT *history, int history_num);     void    (*history_integer_cb)(const ZBX_HISTORY_INTEGER *history, int history_num);     void    (*history_string_cb)(const ZBX_HISTORY_STRING *history, int history_num);     void    (*history_text_cb)(const ZBX_HISTORY_TEXT *history, int history_num);     void    (*history_log_cb)(const ZBX_HISTORY_LOG *history, int history_num); } ZBX_HISTORY_WRITE_CBS; ```  Each of them should take "history" array of "history\_num" elements as arguments. Depending on history data type to be exported, "history" is an array of the following structures, respectively:  ``` {.c} typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     double      value; } ZBX_HISTORY_FLOAT;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     zbx_uint64_t    value; } ZBX_HISTORY_INTEGER;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value; } ZBX_HISTORY_STRING;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value; } ZBX_HISTORY_TEXT;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value;     const char  *source;     int     timestamp;     int     logeventid;     int     severity; } ZBX_HISTORY_LOG; ```  Callbacks will be used by Zabbix server history syncer processes in the end of history sync procedure after data is written into Zabbix database and saved in value cache.  :::noteimportant In case of internal error in history export module it is recommended that module is written in such a way that it does not block whole monitoring until it recovers but discards data instead and allows Zabbix server to continue running. :::
zh-cn	##### - 提供历史记录输出的回调  ::: noteimportant 从ZABBIX 4.0.0开始，不再支持通过ZABBIX Proxy模块输出历史记录 :::\  模块可以按来行指定输出历史数据的函数：数字（浮点）、数字（无符号）、字符串、文本和日志：\  ``` {.c} typedef struct {     void    (*history_float_cb)(const ZBX_HISTORY_FLOAT *history, int history_num);     void    (*history_integer_cb)(const ZBX_HISTORY_INTEGER *history, int history_num);     void    (*history_string_cb)(const ZBX_HISTORY_STRING *history, int history_num);     void    (*history_text_cb)(const ZBX_HISTORY_TEXT *history, int history_num);     void    (*history_log_cb)(const ZBX_HISTORY_LOG *history, int history_num); } ZBX_HISTORY_WRITE_CBS; ```  每个输出历史纪录的函数都应当把 "history\_num"元素 作为 “history”数组的参数。依据需要输出的历史记录类型，“history”分别是以下结构的数组：\  ``` {.c} typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     double      value; } ZBX_HISTORY_FLOAT;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     zbx_uint64_t    value; } ZBX_HISTORY_INTEGER;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value; } ZBX_HISTORY_STRING;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value; } ZBX_HISTORY_TEXT;  typedef struct {     zbx_uint64_t    itemid;     int     clock;     int     ns;     const char  *value;     const char  *source;     int     timestamp;     int     logeventid;     int     severity; } ZBX_HISTORY_LOG; ```  回调会在ZABBIX server的历史记录同步进程完成历史记录同步操作，数据被写入ZABBIX数据库并将值保存在值缓存中后执行。\

en-us	#### Proxies  A listing of existing proxies with their details is displayed.  ![](../../../../../assets/en/manual/web_interface/proxies1.png){width="600"}  Displayed data:  |Column|Description| |------|-----------| |*Name*|Name of the proxy. Clicking on the proxy name opens the proxy [configuration form](/manual/distributed_monitoring/proxies#configuration).| |*Mode*|Proxy mode is displayed - *Active* or *Passive*.| |*Encryption*|Encryption status for connections from the proxy is displayed:<br>**None** - no encryption<br>**PSK** - using pre-shared key<br>**Cert** - using certificate<br>| |*Last seen (age)*|The time when the proxy was last seen by the server is displayed.| |*Host count*|The number of enabled hosts assigned to the proxy is displayed.| |*Item count*|The number of enabled items on enabled hosts assigned to the proxy is displayed.| |*Required performance (vps)*|Required proxy performance is displayed (the number of values that need to be collected per second).| |*Hosts*|All hosts monitored by the proxy are listed. Clicking on the host name opens the host configuration form.|  To configure a new proxy, click on the *Create proxy* button in the top right-hand corner.
zh-cn	#### 代理  将显示现有代理及其详细信息的列表。  ![](../../../../../assets/en/manual/web_interface/proxies1.png){width="600"}  显示数据：  |栏目|说明| |--------|------------| |*名称*|代理的名称。点击代理名称打开代理[配置表单](/manual/distributed_monitoring/proxies#configuration)。| |*Mode*|显示代理模式 - *Active* 或 *Passive*。| |*加密*|显示来自代理的连接的加密状态：<br>**无** - 未加密<br>**PSK** - 使用预共享密钥<br>**Cert** - 使用证书<br>| |*上次看到（年龄）*|显示代理上次被服务器看到的时间。| |*主机计数*|显示分配给代理的启用主机的数量。| |*Item count*|显示分配给代理的启用主机上启用的项目数。| |*所需性能 (vps)*|显示所需的代理性能（每秒需要收集的值的数量）。| |*Hosts*|列出代理监视的所有主机。单击主机名打开主机配置表单。|  要配置新proxy，请单击右上角顶部的*创建proxy*按钮。 

en-us	#### Proxies  In a [proxy](/manual/distributed_monitoring/proxies#configuration) configuration, user macros can be used in the following field:  |Location|<|Multiple macros/mix with text^[1](supported_by_location_user#footnotes)^| |-|------------------------------|----------| |Interface port (for passive proxy)|<|no|
zh-cn	#### 代理  在 [proxy](/manual/distributed_monitoring/proxies#configuration)配置中，用户宏可用于以下地方：  |位置|<|多个宏/混合文本^[1](supported_by_location_user#footnotes)^| |--------|-|------------------------------------------------------------------------| |接口端口（用于被动代理）|<|不支持|

en-us	#### Proxies  Manage the proxies used in your distributed monitoring setup.  [Proxy API](/manual/api/reference/proxy)
zh-cn	#### Proxies  用于管理分布式监控设置中使用的 proxies。  [Proxy API](/manual/api/reference/proxy)

en-us	#### proxy  Changes:\ [ZBXNEXT-6889](https://support.zabbix.com/browse/ZBXNEXT-6889) `proxy.create`, `proxy.update`: dropped support of `interface.interfaceid` and `interface.hostid` properties.\
zh-cn	 #### 代理  变更：\ [ZBXNEXT-6889](https://support.zabbix.com/browse/ZBXNEXT-6889) `proxy.create`，`proxy.update`：删除对`interface.interfaceid`和`interface.hostid`属性的支持。\

en-us	#### proxy  Changes:\ [ZBXNEXT-6889](https://support.zabbix.com/browse/ZBXNEXT-6889) `proxy.create`, `proxy.update`: dropped support of `interface.interfaceid` and `interface.hostid` properties.\
zh-cn	 #### 代理  变更：\ [ZBXNEXT-6889](https://support.zabbix.com/browse/ZBXNEXT-6889) `proxy.create`，`proxy.update`：删除对`interface.interfaceid`和`interface.hostid`属性的支持。\

en-us	##### Proxy config request  The `proxy config` request is sent by proxy to obtain proxy configuration data. This request is sent every `ConfigFrequency` (proxy configuration parameter) seconds.  |name|<|<|<|value type|description| |-|-|-|----------|----------|----------------------------------------| |proxy→server:|<|<|<|<|<| |**request**|<|<|<|*string*|'proxy config'| |**host**|<|<|<|*string*|Proxy name.| |**version**|<|<|<|*string*|Proxy version (<major>.<minor>.<build>).| |server→proxy:|<|<|<|<|<| |**request**|<|<|<|*string*|'proxy config'| |**<table>**|<|<|<|*object*|One or more objects with <table> data.| | |**fields**|<|<|*array*|Array of field names.| |^| |\-|<|*string*|Field name.| |^|**data**|<|<|*array*|Array of rows.| |^| |\-|<|*array*|Array of columns.| |^|^| |\-|*string*,*number*|Column value with type depending on the column type in database schema.| |proxy→server:|<|<|<|<|<| |**response**|<|<|<|*string*|Request success information ('success' or 'failed').|  Example:  proxy→server:  ``` {.javascript} {   "request": "proxy config",   "host": "Proxy #12",   "version":"5.4.0" } ```  server→proxy:  ``` {.javascript} {     "globalmacro":{         "fields":[             "globalmacroid",             "macro",             "value"         ],         "data":[             [                 2,                 "{$SNMP_COMMUNITY}",                 "public"             ]         ]     },     "hosts":{         "fields":[             "hostid",             "host",             "status",             "ipmi_authtype",             "ipmi_privilege",             "ipmi_username",             "ipmi_password",             "name",             "tls_connect",             "tls_accept",             "tls_issuer",             "tls_subject",             "tls_psk_identity",             "tls_psk"         ],         "data":[             [                 10001,                 "Linux",                 3,                 -1,                 2,                 "",                 "",                 "Linux",                 1,                 1,                 "",                 "",                 "",                 ""             ],             [                 10050,                 "Zabbix Agent",                 3,                 -1,                 2,                 "",                 "",                 "Zabbix Agent",                 1,                 1,                 "",                 "",                 "",                 ""             ],             [                 10105,                 "Logger",                 0,                 -1,                 2,                 "",                 "",                 "Logger",                 1,                 1,                 "",                 "",                 "",                 ""             ]         ]     },     "interface":{         "fields":[             "interfaceid",             "hostid",             "main",             "type",             "useip",             "ip",             "dns",             "port",             "bulk"         ],         "data":[             [                 2,                 10105,                 1,                 1,                 1,                 "127.0.0.1",                 "",                 "10050",                 1             ]         ]     },     ... } ```  proxy→server:  ``` {.javascript} {   "response": "success" } ```
zh-cn	##### 代理配置请求   `proxy config` 请求由代理发送以获取代理配置数据。 每次发送此请求间隔 `ConfigFrequency` （代理配置参数）秒。  |名称|<|<|<|值类型|描述| |----|-|-|-|----------|-----------| |proxy→server:|<|<|<|<|<| |**request**|<|<|<|*string*|'proxy config'| |**host**|<|<|<|*string*|代理名称| |**version**|<|<|<|*string*|代理版本 (<major>.<minor>.<build>)| |server→proxy:|<|<|<|<|<| |**request**|<|<|<|*string*|'proxy config'| |**<table>**|<|<|<|*object*|包含 <table> 的一个或多个对象| | |**fields**|<|<|*array*|数组字段名称| |^| |\-|<|*string*|字段名| |^|**data**|<|<|*array*|行数组| |^| |\-|<|*array*|列数组| |^|^|<|\-|*string*,*number*|列值，其类型取决于数据库表结构的类型| |proxy→server:|<|<|<|<|<| |**response**|<|<|<|*string*|请求成功信息 ('success' 或 'failed')|  例子:  proxy→server:  ``` {.javascript} {   "request": "proxy config",   "host": "Proxy #12",   "version":"5.4.0" } ```  server→proxy:  ``` {.javascript} {     "globalmacro":{         "fields":[             "globalmacroid",             "macro",             "value"         ],         "data":[             [                 2,                 "{$SNMP_COMMUNITY}",                 "public"             ]         ]     },     "hosts":{         "fields":[             "hostid",             "host",             "status",             "ipmi_authtype",             "ipmi_privilege",             "ipmi_username",             "ipmi_password",             "name",             "tls_connect",             "tls_accept",             "tls_issuer",             "tls_subject",             "tls_psk_identity",             "tls_psk"         ],         "data":[             [                 10001,                 "Linux",                 3,                 -1,                 2,                 "",                 "",                 "Linux",                 1,                 1,                 "",                 "",                 "",                 ""             ],             [                 10050,                 "Zabbix Agent",                 3,                 -1,                 2,                 "",                 "",                 "Zabbix Agent",                 1,                 1,                 "",                 "",                 "",                 ""             ],             [                 10105,                 "Logger",                 0,                 -1,                 2,                 "",                 "",                 "Logger",                 1,                 1,                 "",                 "",                 "",                 ""             ]         ]     },     "interface":{         "fields":[             "interfaceid",             "hostid",             "main",             "type",             "useip",             "ip",             "dns",             "port",             "bulk"         ],         "data":[             [                 2,                 10105,                 1,                 1,                 1,                 "127.0.0.1",                 "",                 "10050",                 1             ]         ]     },     ... } ```  proxy→server:  ``` {.javascript} {   "response": "success" } ```

en-us	##### Proxy config request  The `proxy config` request is sent by server to provide proxy configuration data. This request is sent every `ProxyConfigFrequency` (server configuration parameter) seconds.  |name|<|<|<|value type|description| |-|-|-|----------|----------|----------------------------------------| |server→proxy:|<|<|<|<|<| |**request**|<|<|<|*string*|'proxy config'| |**<table>**|<|<|<|*object*|One or more objects with <table> data.| | |**fields**|<|<|*array*|Array of field names.| |^| |\-|<|*string*|Field name.| |^|**data**|<|<|*array*|Array of rows.| |^| |\-|<|*array*|Array of columns.| |^|^| |\-|*string*,*number*|Column value with type depending on the column type in database schema.| |proxy→server:|<|<|<|<|<| |**response**|<|<|<|*string*|Request success information ('success' or 'failed').| |**version**|<|<|<|*string*|Proxy version (<major>.<minor>.<build>).|  Example:  server→proxy:  ``` {.javascript} {     "request": "proxy config",     "globalmacro":{         "fields":[             "globalmacroid",             "macro",             "value"         ],         "data":[             [                 2,                 "{$SNMP_COMMUNITY}",                 "public"             ]         ]     },     "hosts":{         "fields":[             "hostid",             "host",             "status",             "ipmi_authtype",             "ipmi_privilege",             "ipmi_username",             "ipmi_password",             "name",             "tls_connect",             "tls_accept",             "tls_issuer",             "tls_subject",             "tls_psk_identity",             "tls_psk"         ],         "data":[             [                 10001,                 "Linux",                 3,                 -1,                 2,                 "",                 "",                 "Linux",                 1,                 1,                 "",                 "",                 "",                 ""             ],             [                 10050,                 "Zabbix Agent",                 3,                 -1,                 2,                 "",                 "",                 "Zabbix Agent",                 1,                 1,                 "",                 "",                 "",                 ""             ],             [                 10105,                 "Logger",                 0,                 -1,                 2,                 "",                 "",                 "Logger",                 1,                 1,                 "",                 "",                 "",                 ""             ]         ]     },     "interface":{         "fields":[             "interfaceid",             "hostid",             "main",             "type",             "useip",             "ip",             "dns",             "port",             "bulk"         ],         "data":[             [                 2,                 10105,                 1,                 1,                 1,                 "127.0.0.1",                 "",                 "10050",                 1             ]         ]     },     ... } ```  proxy→server:  ``` {.javascript} {   "response": "success",   "version": "6.0.0" } ```
zh-cn	##### 代理配置请求  服务器发送 `proxy config` 请求以提供代理配置数据. 此请求间隔`ProxyConfigFrequency`秒(服务器配置参数) .  |名称|<|<|<|值类型|描述| |----|-|-|-|----------|-----------| |server→proxy:|<|<|<|<|<| |**request**|<|<|<|*string*|'proxy config'| |**<table>**|<|<|<|*object*|包含<table>数据的一个或多个对象| | |**fields**|<|<|*array*|字段名称数组| |^|<|\-|<|*string*|字段名称| |^|**data**|<|<|*array*|行数组| |^|<|\-|<|*array*|列数组| |^|<|<|\-|*string*,*number*|列值，其类型取决于数据库表结构中的类型| |proxy→server:|<|<|<|<|<| |**response**|<|<|<|*string*|请求成功信息 ('success' 或 'failed')| |**version**|<|<|<|*string*|proxy的版本信息 (<major>.<minor>.<build>)|  例子:  server→proxy:  ``` {.javascript} {     "request": "proxy config",     "globalmacro":{         "fields":[             "globalmacroid",             "macro",             "value"         ],         "data":[             [                 2,                 "{$SNMP_COMMUNITY}",                 "public"             ]         ]     },     "hosts":{         "fields":[             "hostid",             "host",             "status",             "ipmi_authtype",             "ipmi_privilege",             "ipmi_username",             "ipmi_password",             "name",             "tls_connect",             "tls_accept",             "tls_issuer",             "tls_subject",             "tls_psk_identity",             "tls_psk"         ],         "data":[             [                 10001,                 "Linux",                 3,                 -1,                 2,                 "",                 "",                 "Linux",                 1,                 1,                 "",                 "",                 "",                 ""             ],             [                 10050,                 "Zabbix Agent",                 3,                 -1,                 2,                 "",                 "",                 "Zabbix Agent",                 1,                 1,                 "",                 "",                 "",                 ""             ],             [                 10105,                 "Logger",                 0,                 -1,                 2,                 "",                 "",                 "Logger",                 1,                 1,                 "",                 "",                 "",                 ""             ]         ]     },     "interface":{         "fields":[             "interfaceid",             "hostid",             "main",             "type",             "useip",             "ip",             "dns",             "port",             "bulk"         ],         "data":[             [                 2,                 10105,                 1,                 1,                 1,                 "127.0.0.1",                 "",                 "10050",                 1             ]         ]     },     ... } ```  proxy→server:  ``` {.javascript} {   "response": "success",   "version": "5.4.0" } ```

en-us	##### Proxy configuration  HA cluster nodes (servers) must be listed in the configuration of either  passive or active Zabbix proxy.  For a passive proxy, the node names must be listed in the Server [parameter](/manual/appendix/config/zabbix_proxy) of the proxy,  separated by a **comma**.  ``` Server=zabbix-node-01,zabbix-node-02 ```  For an active proxy, the node names must be listed in the Server [parameter](/manual/appendix/config/zabbix_proxy) of the proxy,  separated by a **semicolon**. ``` Server=zabbix-node-01;zabbix-node-02 ```
zh-cn	##### 代理配置  HA 集群节点（服务器）必须列在被动或主动 Zabbix 代理的配置中。  对于被动代理，节点名称必须列在代理的服务器 [参数](/manual/appendix/config/zabbix_proxy) 中，以**逗号**分隔。  ``` Server=zabbix-node-01,zabbix-node-02 ```  对于主动代理，节点名称必须列在代理的服务器[参数](/manual/appendix/config/zabbix_proxy)中，以**分号**分隔。 ``` Server=zabbix-node-01;zabbix-node-02 ```

en-us	# proxy.create
zh-cn	# 创建

en-us	##### Proxy data request  The `proxy data` request is sent by proxy to provide host interface availability, history, discovery and autoregistration data. This request is sent every `DataSenderFrequency` (proxy configuration parameter) seconds. Note that active proxy will still poll Zabbix server every second for remote command tasks (with an empty `proxy data` request).  |name|<|value type|description| |-|----------|----------|----------------------------------------| |proxy→server:|<|<|<| |**request**|<|*string*|'proxy data'| |**host**|<|*string*|Proxy name.| |**session**|<|*string*|Data session token.| |**interface availability**|<|*array*|*(optional)* Array of interface availability data objects.| | |**interfaceid**|*number*|Interface identifier.| |^|**available**|*number*|Interface availability:<br><br>**0**, *INTERFACE\_AVAILABLE\_UNKNOWN* - unknown<br>**1**, *INTERFACE\_AVAILABLE\_TRUE* - available<br>**2**, *INTERFACE\_AVAILABLE\_FALSE* - unavailable| |^|**error**|*string*|Interface error message or empty string.| |**history data**|<|*array*|*(optional)* Array of history data objects.| | |**itemid**|*number*|Item identifier.| |^|**clock**|*number*|Item value timestamp (seconds).| |^|**ns**|*number*|Item value timestamp (nanoseconds).| |^|**value**|*string*|*(optional)* Item value.| |^|**id**|*number*|Value identifier (ascending counter, unique within one data session).| |^|**timestamp**|*number*|*(optional)* Timestamp of log type items.| |^|**source**|*string*|*(optional)* Eventlog item source value.| |^|**severity**|*number*|*(optional)* Eventlog item severity value.| |^|**eventid**|*number*|*(optional)* Eventlog item eventid value.| |^|**state**|*string*|*(optional)* Item state:<br>**0**, *ITEM\_STATE\_NORMAL*<br>**1**, *ITEM\_STATE\_NOTSUPPORTED*| |^|**lastlogsize**|*number*|*(optional)* Last log size of log type items.| |^|**mtime**|*number*|*(optional)* Modification time of log type items.| |**discovery data**|<|*array*|*(optional)* Array of discovery data objects.| | |**clock**|*number*|Discovery data timestamp.| |^|**druleid**|*number*|Discovery rule identifier.| |^|**dcheckid**|*number*|Discovery check identifier or null for discovery rule data.| |^|**type**|*number*|Discovery check type:<br><br>**-1** discovery rule data<br>**0**, *SVC\_SSH* - SSH service check<br>**1**, *SVC\_LDAP* - LDAP service check<br>**2**, *SVC\_SMTP* - SMTP service check<br>**3**, *SVC\_FTP* - FTP service check<br>**4**, *SVC\_HTTP* - HTTP service check<br>**5**, *SVC\_POP* - POP service check<br>**6**, *SVC\_NNTP* - NNTP service check<br>**7**, *SVC\_IMAP* - IMAP service check<br>**8**, *SVC\_TCP* - TCP port availability check<br>**9**, *SVC\_AGENT* - Zabbix agent<br>**10**, *SVC\_SNMPv1* - SNMPv1 agent<br>**11**, *SVC\_SNMPv2* - SNMPv2 agent<br>**12**, *SVC\_ICMPPING* - ICMP ping<br>**13**, *SVC\_SNMPv3* - SNMPv3 agent<br>**14**, *SVC\_HTTPS* - HTTPS service check<br>**15**, *SVC\_TELNET* - Telnet availability check| |^|**ip**|*string*|Host IP address.| |^|**dns**|*string*|Host DNS name.| |^|**port**|*number*|*(optional)* Service port number.| |^|**key\_**|*string*|*(optional)* Item key for discovery check of type **9** *SVC\_AGENT*| |^|**value**|*string*|*(optional)* Value received from the service, can be empty for most services.| |^|**status**|*number*|*(optional)* Service status:<br><br>**0**, *DOBJECT\_STATUS\_UP* - Service UP<br>**1**, *DOBJECT\_STATUS\_DOWN* - Service DOWN| |**autoregistration**|<|*array*|*(optional)* Array of autoregistration data objects.| | |**clock**|*number*|Autoregistration data timestamp.| |^|**host**|*string*|Host name.| |^|**ip**|*string*|*(optional)* Host IP address.| |^|**dns**|*string*|*(optional)* Resolved DNS name from IP address.| |^|**port**|*string*|*(optional)* Host port.| |^|**host\_metadata**|*string*|*(optional)* Host metadata sent by the agent (based on HostMetadata or HostMetadataItem agent configuration parameter).| |**tasks**|<|*array*|*(optional)* Array of tasks.| | |**type**|*number*|Task type:<br><br>**0**, *ZBX\_TM\_TASK\_PROCESS\_REMOTE\_COMMAND\_RESULT* - remote command result| |^|**status**|*number*|Remote-command execution status:<br><br>**0**, *ZBX\_TM\_REMOTE\_COMMAND\_COMPLETED* - remote command completed successfully<br>**1**, *ZBX\_TM\_REMOTE\_COMMAND\_FAILED* - remote command failed| |^|**error**|*string*|*(optional)* Error message.| |^|**parent\_taskid**|*number*|Parent task ID.| |**more**|<|*number*|*(optional)* 1 - there are more history data to send.| |**clock**|<|*number*|*(optional)* Data transfer timestamp (seconds).| |**ns**|<|*number*|*(optional)* Data transfer timestamp (nanoseconds).| |**version**|<|*string*|Proxy version (<major>.<minor>.<build>).| |server→proxy:|<|<|<| |**response**|<|*string*|Request success information ('success' or 'failed').| |**upload**|<|*string*|Upload control for historical data (history, autoregistration, host availability, network discovery):<br>**enabled** - normal operation<br>**disabled** - server is not accepting data (possibly due to internal cache over limit)| |**tasks**|<|*array*|*(optional)* Array of tasks.| | |**type**|*number*|Task type:<br><br>**1**, *ZBX\_TM\_TASK\_PROCESS\_REMOTE\_COMMAND* - remote command| |^|**clock**|*number*|Task creation time.| |^|**ttl**|*number*|Time in seconds after which the task expires.| |^|**commandtype**|*number*|Remote-command type:<br><br>**0**, *ZBX\_SCRIPT\_TYPE\_CUSTOM\_SCRIPT* - use custom script<br>**1**, *ZBX\_SCRIPT\_TYPE\_IPMI* - use IPMI<br>**2**, *ZBX\_SCRIPT\_TYPE\_SSH* - use SSH<br>**3**, *ZBX\_SCRIPT\_TYPE\_TELNET* - use Telnet<br>**4**, *ZBX\_SCRIPT\_TYPE\_GLOBAL\_SCRIPT* - use global script (currently functionally equivalent to custom script)| |^|**command**|*string*|Remote command to execute.| |^|**execute\_on**|*number*|Execution target for custom scripts:<br><br>**0**, *ZBX\_SCRIPT\_EXECUTE\_ON\_AGENT* - execute script on agent<br>**1**, *ZBX\_SCRIPT\_EXECUTE\_ON\_SERVER* - execute script on server<br>**2**, *ZBX\_SCRIPT\_EXECUTE\_ON\_PROXY* - execute script on proxy| |^|**port**|*number*|*(optional)* Port for Telnet and SSH commands.| |^|**authtype**|*number*|*(optional)* Authentication type for SSH commands.| |^|**username**|*string*|*(optional)* User name for Telnet and SSH commands.| |^|**password**|*string*|*(optional)* Password for Telnet and SSH commands.| |^|**publickey**|*string*|*(optional)* Public key for SSH commands.| |^|**privatekey**|*string*|*(optional)* Private key for SSH commands.| |^|**parent\_taskid**|*number*|Parent task ID.| |^|**hostid**|*number*|Target host ID.|  Example:  proxy→server:  ``` {.javascript} {     "request": "proxy data",     "host": "Proxy #12",      "session": "12345678901234567890123456789012",     "interface availability": [         {             "interfaceid": 1,             "available": 1,             "error": ""     },         {             "interfaceid": 2,             "available": 2,             "error": "Get value from agent failed: cannot connect to [[127.0.0.1]:10049]: [111] Connection refused"     },         {             "interfaceid": 3,             "available": 1,             "error": ""     },         {             "interfaceid": 4,             "available": 1,             "error": ""     }     ],     "history data":[         {             "itemid":"12345",             "clock":1478609647,             "ns":332510044,             "value":"52956612",             "id": 1         },         {             "itemid":"12346",             "clock":1478609647,             "ns":330690279,             "state":1,             "value":"Cannot find information for this network interface in /proc/net/dev.",             "id": 2         }     ],     "discovery data":[         {             "clock":1478608764,             "drule":2,             "dcheck":3,             "type":12,             "ip":"10.3.0.10",             "dns":"vdebian",             "status":1         },         {             "clock":1478608764,             "drule":2,             "dcheck":null,             "type":-1,             "ip":"10.3.0.10",             "dns":"vdebian",             "status":1         }     ],     "auto registration":[         {             "clock":1478608371,             "host":"Logger1",             "ip":"10.3.0.1",             "dns":"localhost",             "port":"10050"         },         {             "clock":1478608381,             "host":"Logger2",             "ip":"10.3.0.2",             "dns":"localhost",             "port":"10050"         }     ],     "tasks":[         {             "type": 2,             "clock":1478608371,             "ttl": 600,             "commandtype": 2,             "command": "restart_service1.sh",             "execute_on": 2,             "port": 80,             "authtype": 0,             "username": "userA",             "password": "password1",             "publickey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe",             "privatekey": "lsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5QCqGKukO1De7zhd",             "parent_taskid": 10,             "hostid": 10070         },         {             "type": 2,             "clock":1478608381,             "ttl": 600,             "commandtype": 1,             "command": "restart_service2.sh",             "execute_on": 0,             "authtype": 0,             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "parent_taskid": 20,             "hostid": 10084         }     ],     "tasks":[         {             "type": 0,             "status": 0,             "parent_taskid": 10         },         {             "type": 0,             "status": 1,             "error": "No permissions to execute task.",             "parent_taskid": 20         }     ],      "version":"5.4.0" } ```  server→proxy:  ``` {.javascript} {   "response": "success",   "upload": "enabled",   "tasks":[       {          "type": 1,          "clock": 1478608371,          "ttl": 600,          "commandtype": 2,          "command": "restart_service1.sh",          "execute_on": 2,          "port": 80,          "authtype": 0,          "username": "userA",          "password": "password1",          "publickey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe",          "privatekey": "lsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5QCqGKukO1De7zhd",          "parent_taskid": 10,          "hostid": 10070       },       {          "type": 1,          "clock": 1478608381,          "ttl": 600,          "commandtype": 1,          "command": "restart_service2.sh",          "execute_on": 0,          "authtype": 0,          "username": "",          "password": "",          "publickey": "",          "privatekey": "",          "parent_taskid": 20,          "hostid": 10084       }   ] } ```
zh-cn	##### 代理数据请求  “代理数据”请求由代理发送，以提供主机接口可用性、历史记录、发现和自动注册数据。此请求每“DataSenderFrequency”（代理配置参数）秒发送一次。请注意，主动代理仍将每秒轮询 Zabbix 服务器以获取远程命令任务（使用空的“代理数据”请求）。  |名称|<|值类型|描述| |----|-|----------|-----------| |proxy→server:|<|<|<| |**request**|<|*string*|'proxy data'| |**host**|<|*string*|代理名称| |**session**|<|*string*|数据会话令牌| |**interface availability**|<|*array*|*(optional)* 接口可用性数据对象数组| | |**interfaceid**|*number*|接口标识符| |^|**available**|*number*|接口可用性<br><br>**0**, *INTERFACE\_AVAILABLE\_UNKNOWN* - unknown<br>**1**, *INTERFACE\_AVAILABLE\_TRUE* - available<br>**2**, *INTERFACE\_AVAILABLE\_FALSE* - unavailable| |^|**error**|*string*|接口错误消息或空字符串| |**history data**|<|*array*|*(可选)* 历史数据对象数组| | |**itemid**|*number*|监控项标识符| |^|**clock**|*number*|监控项值时间戳 (秒)| |^|**ns**|*number*|监控项值时间戳 (纳秒)| |^|**value**|*string*|*(可选)* 监控项值| |^|**id**|*number*|值标识符（自增id，在一个数据会话中是唯一的）| |^|**timestamp**|*number*|*(可选)* 日志类型监控项的时间戳| |^|**source**|*string*|*(可选)* 事件日志监控项数据源| |^|**severity**|*number*|*(可选)* 事件日志监控项严重性值| |^|**eventid**|*number*|*(可选)* 事件日志监控项事件id| |^|**state**|*string*|*(可选)* 监控项状态<br>**0**, *ITEM\_STATE\_NORMAL*<br>**1**, *ITEM\_STATE\_NOTSUPPORTED*| |^|**lastlogsize**|*number*|*(可选)* 最后一次监控项的大小| |^|**mtime**|*number*|*(可选)* 监控项修改时间| |**discovery data**|<|*array*|*(可选)* 自动发现数据对象数组| | |**clock**|*number*|自动发现数据是时间戳| |^|**druleid**|*number*|自动发现规则id| |^|**dcheckid**|*number*|自动发现规则数据的发现检查id 或 null| |^|**type**|*number*|自动发现检查类型:<br><br>**-1** discovery rule data<br>**0**, *SVC\_SSH* - SSH service check<br>**1**, *SVC\_LDAP* - LDAP service check<br>**2**, *SVC\_SMTP* - SMTP service check<br>**3**, *SVC\_FTP* - FTP service check<br>**4**, *SVC\_HTTP* - HTTP service check<br>**5**, *SVC\_POP* - POP service check<br>**6**, *SVC\_NNTP* - NNTP service check<br>**7**, *SVC\_IMAP* - IMAP service check<br>**8**, *SVC\_TCP* - TCP port availability check<br>**9**, *SVC\_AGENT* - Zabbix agent<br>**10**, *SVC\_SNMPv1* - SNMPv1 agent<br>**11**, *SVC\_SNMPv2* - SNMPv2 agent<br>**12**, *SVC\_ICMPPING* - ICMP ping<br>**13**, *SVC\_SNMPv3* - SNMPv3 agent<br>**14**, *SVC\_HTTPS* - HTTPS service check<br>**15**, *SVC\_TELNET* - Telnet availability check| |^|**ip**|*string*|主机 IP 地址| |^|**dns**|*string*|主机 DNS 名称| |^|**port**|*number*|*(可选)* 端口号| |^|**key\_**|*string*|*(可选)* 用于自动发现检查的监控项键 **9** *SVC\_AGENT*| |^|**value**|*string*|*(可选)* 从服务接收的值，对于大多数服务可以为空| |^|**status**|*number*|*(可选)* 服务状态:<br><br>**0**, *DOBJECT\_STATUS\_UP* - 服务Up<br>**1**, *DOBJECT\_STATUS\_DOWN* - 服务Down| |**auto registration**|<|*array*|*(可选)* 自动注册数据对象数组| | |**clock**|*number*|自动注册数据时间戳| |^|**host**|*string*|主机名| |^|**ip**|*string*|*(可选)* IP| |^|**dns**|*string*|*(可选)* DNS| |^|**port**|*string*|*(可选)* 端口号| |^|**host\_metadata**|*string*|*(可选)* agent发送的主机元数据（基于 HostMetadata 或 HostMetadataItem agent配置参数）| |**tasks**|<|*array*|*(可选)* 任务数组| | |**type**|*number*|任务类型:<br><br>**0**, *ZBX\_TM\_TASK\_PROCESS\_REMOTE\_COMMAND\_RESULT* - 远程命令结果| |^|**status**|*number*|远程命令执行状态:<br><br>**0**, *ZBX\_TM\_REMOTE\_COMMAND\_COMPLETED* - 远程命令已成功完成<br>**1**, *ZBX\_TM\_REMOTE\_COMMAND\_FAILED* - 远程命令失败| |^|**error**|*string*|*(可选)* 错误信息| |^|**parent\_taskid**|*number*|父级任务 id| |**more**|<|*number*|*(可选)* 1 - 还有更多历史数据要发送| |**clock**|<|*number*|*(可选)* 数据传输时间戳(秒)| |**ns**|<|*number*|*(可选)* 数据传输时间戳(秒纳秒）| |**version**|<|*string*| 版本信息 (<major>.<minor>.<build>)| |server→proxy:|<|<|<| |**response**|<|*string*|请求成功信息 ('success' 或 'failed')| |**upload**|<|*string*|历史数据（历史、自动注册、主机可用性、网络发现）的上传控制：<br>**启用** - 正常操作<br>**禁用** - 服务器不接受数据（可能是由于内部缓存超过限制）| |**tasks**|<|*array*|*(可选)* 任务数组| | |**type**|*number*|任务类型:<br><br>**1**, *ZBX\_TM\_TASK\_PROCESS\_REMOTE\_COMMAND* - 远程命令| |^|**clock**|*number*|任务创建时间| |^|**ttl**|*number*|任务过期时间| |^|**commandtype**|*number*|远程命令类型:<br><br>**0**, *ZBX\_SCRIPT\_TYPE\_CUSTOM\_SCRIPT* - use custom script<br>**1**, *ZBX\_SCRIPT\_TYPE\_IPMI* - use IPMI<br>**2**, *ZBX\_SCRIPT\_TYPE\_SSH* - use SSH<br>**3**, *ZBX\_SCRIPT\_TYPE\_TELNET* - use Telnet<br>**4**, *ZBX\_SCRIPT\_TYPE\_GLOBAL\_SCRIPT* - use global script (currently functionally equivalent to custom script)| |^|**command**|*string*|要执行的远程命令| |^|**execute\_on**|*number*|自定义脚本的执行目标:<br><br>**0**, *ZBX\_SCRIPT\_EXECUTE\_ON\_AGENT* - execute script on agent<br>**1**, *ZBX\_SCRIPT\_EXECUTE\_ON\_SERVER* - execute script on server<br>**2**, *ZBX\_SCRIPT\_EXECUTE\_ON\_PROXY* - execute script on proxy| |^|**port**|*number*|*(可选)* 远程登录和 ssh 端口| |^|**authtype**|*number*|*(可选)* ssh 命令的身份验证类型| |^|**username**|*string*|*(可选)* telnet 和 ssh 命令的用户名| |^|**password**|*string*|*(可选)* 远程登录和 ssh 命令的密码| |^|**publickey**|*string*|*(可选)* ssh 命令的公钥| |^|**privatekey**|*string*|*(可选)* ssh 命令的私钥| |^|**parent\_taskid**|*number*|父级任务 ID| |^|**hostid**|*number*|目标 hostid|  例子:  proxy→server:  ``` {.javascript} {     "request": "proxy data",     "host": "Proxy #12",      "session": "12345678901234567890123456789012",     "interface availability": [         {             "interfaceid": 1,             "available": 1,             "error": ""     },         {             "interfaceid": 2,             "available": 2,             "error": "Get value from agent failed: cannot connect to [[127.0.0.1]:10049]: [111] Connection refused"     },         {             "interfaceid": 3,             "available": 1,             "error": ""     },         {             "interfaceid": 4,             "available": 1,             "error": ""     }     ],     "history data":[         {             "itemid":"12345",             "clock":1478609647,             "ns":332510044,             "value":"52956612",             "id": 1         },         {             "itemid":"12346",             "clock":1478609647,             "ns":330690279,             "state":1,             "value":"Cannot find information for this network interface in /proc/net/dev.",             "id": 2         }     ],     "discovery data":[         {             "clock":1478608764,             "drule":2,             "dcheck":3,             "type":12,             "ip":"10.3.0.10",             "dns":"vdebian",             "status":1         },         {             "clock":1478608764,             "drule":2,             "dcheck":null,             "type":-1,             "ip":"10.3.0.10",             "dns":"vdebian",             "status":1         }     ],     "auto registration":[         {             "clock":1478608371,             "host":"Logger1",             "ip":"10.3.0.1",             "dns":"localhost",             "port":"10050"         },         {             "clock":1478608381,             "host":"Logger2",             "ip":"10.3.0.2",             "dns":"localhost",             "port":"10050"         }     ],     "tasks":[         {             "type": 2,             "clock":1478608371,             "ttl": 600,             "commandtype": 2,             "command": "restart_service1.sh",             "execute_on": 2,             "port": 80,             "authtype": 0,             "username": "userA",             "password": "password1",             "publickey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe",             "privatekey": "lsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5QCqGKukO1De7zhd",             "parent_taskid": 10,             "hostid": 10070         },         {             "type": 2,             "clock":1478608381,             "ttl": 600,             "commandtype": 1,             "command": "restart_service2.sh",             "execute_on": 0,             "authtype": 0,             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "parent_taskid": 20,             "hostid": 10084         }     ],     "tasks":[         {             "type": 0,             "status": 0,             "parent_taskid": 10         },         {             "type": 0,             "status": 1,             "error": "No permissions to execute task.",             "parent_taskid": 20         }     ],      "version":"5.4.0" } ```  server→proxy:  ``` {.javascript} {   "response": "success",   "tasks":[       {          "type": 1,          "clock": 1478608371,          "ttl": 600,          "commandtype": 2,          "command": "restart_service1.sh",          "execute_on": 2,          "port": 80,          "authtype": 0,          "username": "userA",          "password": "password1",          "publickey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe",          "privatekey": "lsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5QCqGKukO1De7zhd",          "parent_taskid": 10,          "hostid": 10070       },       {          "type": 1,          "clock": 1478608381,          "ttl": 600,          "commandtype": 1,          "command": "restart_service2.sh",          "execute_on": 0,          "authtype": 0,          "username": "",          "password": "",          "publickey": "",          "privatekey": "",          "parent_taskid": 20,          "hostid": 10084       }   ] } ```

en-us	# proxy.delete
zh-cn	# 删除

en-us	# proxy.get
zh-cn	# 获取

en-us	##### Proxy heartbeat request  The `proxy heartbeat` request is sent by proxy to report that proxy is running. This request is sent every `HeartbeatFrequency` (proxy configuration parameter) seconds.  |name|value type|description| |----------|----------|----------------------------------------| |proxy→server:|<|<| |**request**|*string*|'proxy heartbeat'| |**host**|*string*|Proxy name.| |**version**|*string*|Proxy version (<major>.<minor>.<build>).| |server→proxy:|<|<| |**response**|*string*|Request success information ('success' or 'failed').|  proxy→server:  ``` {.javascript} {    "request": "proxy heartbeat",    "host": "Proxy #12",    "version": "5.4.0" } ```  server→proxy:  ``` {.javascript} {   "response": "success" } ```
zh-cn	##### 代理检测心跳请求  `proxy heartbeat` 请求由代理发送以报告代理正在运行。 每次发送此请求间隔 `HeartbeatFrequency`秒 （代理配置参数）  |名称|<|值类型|描述| |----|----------|-----------| |proxy→server:|<|<|<| |**request**|<|*string*|'proxy heartbeat'| |**host**|<|*string*|代理名称| |**version**|<|*string*|代理版本信息 (<major>.<minor>.<build>)| |server→proxy:|<|<|<| |**response**|<|*string*|请求成功信息 ('success' 或 'failed')|  proxy→server:  ``` {.javascript} {    "request": "proxy heartbeat",    "host": "Proxy #12",    "version": "5.4.0" } ```  server→proxy:  ``` {.javascript} {   "response": "success" } ```

en-us	### Proxy installation  Once the required repository is added, you can install Zabbix proxy by running:      # apt install zabbix-proxy-mysql  Substitute 'mysql' in the command with 'pgsql' to use PostgreSQL, or with 'sqlite3' to use SQLite3.
zh-cn	### Proxy安装  添加好所需软件源后，可通过执行以下命令来安装 Zabbix proxy：      # apt install zabbix-proxy-mysql  将命令中的 'mysql' 替换为 'pgsql' 以使用 PostgreSQL，或者替换为 'sqlite3' 以使用 SQLite3 （仅proxy适用）。

en-us	### Proxy installation  Once the required repository is added, you can install Zabbix proxy by running:      # dnf install zabbix-proxy-mysql  Substitute 'mysql' in the commands with 'pgsql' to use PostgreSQL, or with 'sqlite3' to use SQLite3 (proxy only).
zh-cn	### Proxy 安装  添加好所需软件源后，可通过执行以下命令来安装Zabbix proxy：      # dnf install zabbix-proxy-mysql  将命令中的 'mysql' 替换为 'pgsql' 以使用 PostgreSQL，或者替换为 'sqlite3' 以使用 SQLite3 (仅proxy适用)。

en-us	### Proxy interface  The proxy interface object defines the interface used to connect to a passive proxy. It has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |**dns**<br>(required)|string|DNS name to connect to.<br><br>Can be empty if connections are made via IP address.| |**ip**<br>(required)|string|IP address to connect to.<br><br>Can be empty if connections are made via DNS names.| |**port**<br>(required)|string|Port number to connect to.| |**useip**<br>(required)|integer|Whether the connection should be made via IP address.<br><br>Possible values are:<br>0 - connect using DNS name;<br>1 - connect using IP address.|
zh-cn	### proxy接口  proxy接口对象定义用于连接被动proxy的接口。它具有以下属性。  |属性|[类型](/manual/api/reference_commentary#数据类型)|描述| |--------|---------------------------------------------------|-----------| |**dns**<br>（必需）|string|要连接到的 DNS 名称。<br><br>如果通过 IP 地址建立连接，则可以为空。| |**ip**<br>（必需）|string|要连接的 IP 地址。<br><br>如果通过 DNS 名称进行连接，则可以为空。| |**端口**<br>（必需）|string|要连接的端口号。| |**useip**<br>（必需）|integer|是否应通过 IP 地址进行连接。<br><br>可用值：<br>0 - 使用 DNS 名称连接；<br>1 -使用 IP 地址连接。|

en-us	### Proxy interface  The proxy interface object defines the interface used to connect to a passive proxy. It has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--------|---------------------------------------------------|-----------| |**dns**<br>(required)|string|DNS name to connect to.<br><br>Can be empty if connections are made via IP address.| |**ip**<br>(required)|string|IP address to connect to.<br><br>Can be empty if connections are made via DNS names.| |**port**<br>(required)|string|Port number to connect to.| |**useip**<br>(required)|integer|Whether the connection should be made via IP address.<br><br>Possible values are:<br>0 - connect using DNS name;<br>1 - connect using IP address.|
zh-cn	### proxy接口  proxy接口对象定义用于连接被动proxy的接口。它具有以下属性。  |属性|[类型](/manual/api/reference_commentary#数据类型)|描述| |--------|---------------------------------------------------|-----------| |**dns**<br>（必需）|string|要连接到的 DNS 名称。<br><br>如果通过 IP 地址建立连接，则可以为空。| |**ip**<br>（必需）|string|要连接的 IP 地址。<br><br>如果通过 DNS 名称进行连接，则可以为空。| |**端口**<br>（必需）|string|要连接的端口号。| |**useip**<br>（必需）|integer|是否应通过 IP 地址进行连接。<br><br>可用值：<br>0 - 使用 DNS 名称连接；<br>1 -使用 IP 地址连接。|

en-us	# > Proxy object  The following objects are directly related to the `proxy` API.
zh-cn	# > Proxy 对象  以下对象与 `proxy` API 直接相关。

en-us	#### Proxy process types  -   `availability manager` - process for host availability updates -   `configuration syncer` - process for managing in-memory cache of     configuration data -   `data sender` - proxy data sender -   `discoverer` - process for discovery of devices -   `heartbeat sender` - proxy heartbeat sender -   `history poller` - process for handling calculated, aggregated and     internal checks requiring a database connection -   `history syncer` - history DB writer -   `housekeeper` - process for removal of old historical data -   `http poller` - web monitoring poller -   `icmp pinger` - poller for icmpping checks -   `ipmi manager` - IPMI poller manager -   `ipmi poller` - poller for IPMI checks -   `java poller` - poller for Java checks -   `odbc poller` - poller for ODBC checks -   `poller` - normal poller for passive checks -   `preprocessing manager` - manager of preprocessing tasks -   `preprocessing worker` - process for data preprocessing -   `self-monitoring` - process for collecting internal server     statistics -   `snmp trapper` - trapper for SNMP traps -   `task manager` - process for remote execution of tasks requested by     other components (e.g. close problem, acknowledge problem, check     item value now, remote command functionality) -   `trapper` - trapper for active checks, traps, proxy communication -   `unreachable poller` - poller for unreachable devices -   `vmware collector` - VMware data collector responsible for data     gathering from VMware services  The proxy log file can be used to observe these process types.  Various types of Zabbix proxy processes can be monitored using the **zabbix\[process,<type>,<mode>,<state>\]** internal [item](/manual/config/items/itemtypes/internal).
zh-cn	#### Proxy进程类型  -   `availability manager` - 主机可用性更新的进程 -   `configuration syncer` - 管理配置数据的内存缓存的进程 -   `data sender` - proxy 输出发送进程 -   `discoverer` - -   发现设备的进程程 -   `heartbeat sender` - proxy 心跳信息发送进程 -   `history poller` - 处理需要数据库连接的计算、聚合和内部检查的进程 -   `history syncer` - 历史数据同步进程 -   `housekeeper` -  删除旧历史数据的进程 -   `http poller` - web监控进程 -   `icmp pinger` - icmpping检查进程 -   `ipmi manager` - IPMI管理进程 -   `ipmi poller` - IPMI检查进程 -   `java poller` - Java检查进程 -   `odbc poller` - ODBC检查进程 -   `poller` -  被动检查的普通轮询器 -   `preprocessing manager` -  预处理任务的管理 -   `preprocessing worker` - -   数据预处理的进程 -   `self-monitoring` - 服务器内部统计信息收集进程 -   `snmp trapper` - traper 用于SNMP trap -   `task manager` - 远程执行其他组件请求的任务的过程(例如，关闭问题、确认问题、现在检查项目值、远程命令功能) -   `trapper` - 陷阱主动检查，陷阱，代理通信 -   `unreachable poller` - 针对不可达设备的轮询器 -   `vmware collector` - VMware数据收集器负责从VMware服务中收集数据  可以使用代理日志文件来观察这些进程类型。  可以使用**zabbix[process,<type>,<mode>,<state>]** 内部[监控项](/manual/config/items/itemtypes/internal)来监控各种类型的 Zabbix proxy进程。

en-us	##### Proxy request  The `proxy data` request is used to obtain host interface availability, historical, discovery and autoregistration data from proxy. This request is sent every `ProxyDataFrequency` (server configuration parameter) seconds.  |name|<|value type|description| |-|----------|----------|----------------------------------------| |server→proxy:|<|<|<| |**request**|<|*string*|'proxy data'| |proxy→server:|<|<|<| |**session**|<|*string*|Data session token.| |**interface availability**|<|*array*|*(optional)* Array of interface availability data objects.| | |**interfaceid**|*number*|Interface identifier.| |^|**available**|*number*|Interface availability:<br><br>**0**, *INTERFACE\_AVAILABLE\_UNKNOWN* - unknown<br>**1**, *INTERFACE\_AVAILABLE\_TRUE* - available<br>**2**, *INTERFACE\_AVAILABLE\_FALSE* - unavailable| |^|**error**|*string*|Interface error message or empty string.| |**history data**|<|*array*|*(optional)* Array of history data objects.| | |**itemid**|*number*|Item identifier.| |^|**clock**|*number*|Item value timestamp (seconds).| |^|**ns**|*number*|Item value timestamp (nanoseconds).| |^|**value**|*string*|*(optional)* Item value.| |^|**id**|*number*|Value identifier (ascending counter, unique within one data session).| |^|**timestamp**|*number*|*(optional)* Timestamp of log type items.| |^|**source**|*string*|*(optional)* Eventlog item source value.| |^|**severity**|*number*|*(optional)* Eventlog item severity value.| |^|**eventid**|*number*|*(optional)* Eventlog item eventid value.| |^|**state**|*string*|*(optional)* Item state:<br>**0**, *ITEM\_STATE\_NORMAL*<br>**1**, *ITEM\_STATE\_NOTSUPPORTED*| |^|**lastlogsize**|*number*|*(optional)* Last log size of log type items.| |^|**mtime**|*number*|*(optional)* Modification time of log type items.| |**discovery data**|<|*array*|*(optional)* Array of discovery data objects.| | |**clock**|*number*|Discovery data timestamp.| |^|**druleid**|*number*|Discovery rule identifier.| |^|**dcheckid**|*number*|Discovery check identifier or null for discovery rule data.| |^|**type**|*number*|Discovery check type:<br><br>**-1** discovery rule data<br>**0**, *SVC\_SSH* - SSH service check<br>**1**, *SVC\_LDAP* - LDAP service check<br>**2**, *SVC\_SMTP* - SMTP service check<br>**3**, *SVC\_FTP* - FTP service check<br>**4**, *SVC\_HTTP* - HTTP service check<br>**5**, *SVC\_POP* - POP service check<br>**6**, *SVC\_NNTP* - NNTP service check<br>**7**, *SVC\_IMAP* - IMAP service check<br>**8**, *SVC\_TCP* - TCP port availability check<br>**9**, *SVC\_AGENT* - Zabbix agent<br>**10**, *SVC\_SNMPv1* - SNMPv1 agent<br>**11**, *SVC\_SNMPv2* - SNMPv2 agent<br>**12**, *SVC\_ICMPPING* - ICMP ping<br>**13**, *SVC\_SNMPv3* - SNMPv3 agent<br>**14**, *SVC\_HTTPS* - HTTPS service check<br>**15**, *SVC\_TELNET* - Telnet availability check| |^|**ip**|*string*|Host IP address.| |^|**dns**|*string*|Host DNS name.| |^|**port**|*number*|*(optional)* Service port number.| |^|**key\_**|*string*|*(optional)* Item key for discovery check of type **9** *SVC\_AGENT*| |^|**value**|*string*|*(optional)* Value received from the service, can be empty for most services.| |^|**status**|*number*|*(optional)* Service status:<br><br>**0**, *DOBJECT\_STATUS\_UP* - Service UP<br>**1**, *DOBJECT\_STATUS\_DOWN* - Service DOWN| |**auto registration**|<|*array*|*(optional)* Array of autoregistration data objects.| | |**clock**|*number*|Autoregistration data timestamp.| |^|**host**|*string*|Host name.| |^|**ip**|*string*|*(optional)* Host IP address.| |^|**dns**|*string*|*(optional)* Resolved DNS name from IP address.| |^|**port**|*string*|*(optional)* Host port.| |^|**host\_metadata**|*string*|*(optional)* Host metadata sent by the agent (based on HostMetadata or HostMetadataItem agent configuration parameter).| |**tasks**|<|*array*|*(optional)* Array of tasks.| | |**type**|*number*|Task type:<br><br>**0**, *ZBX\_TM\_TASK\_PROCESS\_REMOTE\_COMMAND\_RESULT* - remote command result| |^|**status**|*number*|Remote-command execution status:<br><br>**0**, *ZBX\_TM\_REMOTE\_COMMAND\_COMPLETED* - remote command completed successfully<br>**1**, *ZBX\_TM\_REMOTE\_COMMAND\_FAILED* - remote command failed| |^|**error**|*string*|*(optional)* Error message.| |^|**parent\_taskid**|*number*|Parent task ID.| |**more**|<|*number*|*(optional)* 1 - there are more history data to send.| |**clock**|<|*number*|*(optional)* Data transfer timestamp (seconds).| |**ns**|<|*number*|*(optional)* Data transfer timestamp (nanoseconds).| |**version**|<|*string*|Proxy version (<major>.<minor>.<build>).| |server→proxy:|<|<|<| |**response**|<|*string*|Request success information ('success' or 'failed').| |**tasks**|<|*array*|*(optional)* Array of tasks.| | |**type**|*number*|Task type:<br><br>**1**, *ZBX\_TM\_TASK\_PROCESS\_REMOTE\_COMMAND* - remote command| |^|**clock**|*number*|Task creation time.| |^|**ttl**|*number*|Time in seconds after which the task expires.| |^|**commandtype**|*number*|Remote-command type:<br><br>**0**, *ZBX\_SCRIPT\_TYPE\_CUSTOM\_SCRIPT* - use custom script<br>**1**, *ZBX\_SCRIPT\_TYPE\_IPMI* - use IPMI<br>**2**, *ZBX\_SCRIPT\_TYPE\_SSH* - use SSH<br>**3**, *ZBX\_SCRIPT\_TYPE\_TELNET* - use Telnet<br>**4**, *ZBX\_SCRIPT\_TYPE\_GLOBAL\_SCRIPT* - use global script (currently functionally equivalent to custom script)| |^|**command**|*string*|Remote command to execute.| |^|**execute\_on**|*number*|Execution target for custom scripts:<br><br>**0**, *ZBX\_SCRIPT\_EXECUTE\_ON\_AGENT* - execute script on agent<br>**1**, *ZBX\_SCRIPT\_EXECUTE\_ON\_SERVER* - execute script on server<br>**2**, *ZBX\_SCRIPT\_EXECUTE\_ON\_PROXY* - execute script on proxy| |^|**port**|*number*|*(optional)* Port for Telnet and SSH commands.| |^|**authtype**|*number*|*(optional)* Authentication type for SSH commands.| |^|**username**|*string*|*(optional)* User name for Telnet and SSH commands.| |^|**password**|*string*|*(optional)* Password for Telnet and SSH commands.| |^|**publickey**|*string*|*(optional)* Public key for SSH commands.| |^|**privatekey**|*string*|*(optional)* Private key for SSH commands.| |^|**parent\_taskid**|*number*|Parent task ID.| |^|**hostid**|*number*|Target host ID.|  Example:  server→proxy:  ``` {.javascript} {   "request": "proxy data" } ```  proxy→server:  ``` {.javascript} {     "session": "12345678901234567890123456789012"     "interface availability": [         {             "interfaceid": 1,             "available": 1,             "error": ""     },         {             "interfaceid": 2,             "available": 2,             "error": "Get value from agent failed: cannot connect to [[127.0.0.1]:10049]: [111] Connection refused"     },         {             "interfaceid": 3,             "available": 1,             "error": ""     },         {             "interfaceid": 4,             "available": 1,             "error": ""     }     ],     "history data":[         {             "itemid":"12345",             "clock":1478609647,             "ns":332510044,             "value":"52956612",             "id": 1         },         {             "itemid":"12346",             "clock":1478609647,             "ns":330690279,             "state":1,             "value":"Cannot find information for this network interface in /proc/net/dev.",             "id": 2         }     ],     "discovery data":[         {             "clock":1478608764,             "drule":2,             "dcheck":3,             "type":12,             "ip":"10.3.0.10",             "dns":"vdebian",             "status":1         },         {             "clock":1478608764,             "drule":2,             "dcheck":null,             "type":-1,             "ip":"10.3.0.10",             "dns":"vdebian",             "status":1         }     ],     "auto registration":[         {             "clock":1478608371,             "host":"Logger1",             "ip":"10.3.0.1",             "dns":"localhost",             "port":"10050"         },         {             "clock":1478608381,             "host":"Logger2",             "ip":"10.3.0.2",             "dns":"localhost",             "port":"10050"         }     ],     "tasks":[         {             "type": 0,             "status": 0,             "parent_taskid": 10         },         {             "type": 0,             "status": 1,             "error": "No permissions to execute task.",             "parent_taskid": 20         }     ],         "version":"5.4.0" } ```  server→proxy:  ``` {.javascript} {   "response": "success",   "tasks":[       {          "type": 1,          "clock": 1478608371,          "ttl": 600,          "commandtype": 2,          "command": "restart_service1.sh",          "execute_on": 2,          "port": 80,          "authtype": 0,          "username": "userA",          "password": "password1",          "publickey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe",          "privatekey": "lsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5QCqGKukO1De7zhd",          "parent_taskid": 10,          "hostid": 10070       },       {          "type": 1,          "clock": 1478608381,          "ttl": 600,          "commandtype": 1,          "command": "restart_service2.sh",          "execute_on": 0,          "authtype": 0,          "username": "",          "password": "",          "publickey": "",          "privatekey": "",          "parent_taskid": 20,          "hostid": 10084       }   ] } ```
zh-cn	##### Proxy 请求  `proxy data` 请求用于从代理获取主机接口可用性、历史、发现和自动注册数据。此请求发送间隔`ProxyDataFrequency`秒 (服务器配置参数)。  |名称|<|值类型|描述| |----|-|----------|-----------| |server→proxy:|<|<|<| |**request**|<|*string*|'proxy data'| |proxy→server:|<|<|<| |**session**|<|*string*|数据会话令牌| |**interface availability**|<|*array*|*(可选)* 接口可用性数据对象数组| | |**interfaceid**|*number*|接口标识符| |^|**available**|*number*|接口可用性<br><br>**0**, *INTERFACE\_AVAILABLE\_UNKNOWN* - 未知<br>**1**, *INTERFACE\_AVAILABLE\_TRUE* - 可用<br>**2**, *INTERFACE\_AVAILABLE\_FALSE* - 不可用| |^|**error**|*string*|接口错误消息或空字符串| |**history data**|<|*array*|*(可选)* 历史数据对象数组| | |**itemid**|*number*|监控项标识符| |^|**clock**|*number*|监控项值时间戳 (秒)| |^|**ns**|*number*|监控项值时间戳 (纳秒)| |^|**value**|*string*|*(可选)* 监控项值| |^|**id**|*number*|值标识符（自增id，在一个数据会话中是唯一的）| |^|**timestamp**|*number*|*(可选)* 日志类型监控项的时间戳| |^|**source**|*string*|*(可选)* 事件日志监控项数据源| |^|**severity**|*number*|*(可选)* 事件日志监控项严重性值| |^|**eventid**|*number*|*(可选)* 事件日志监控项事件id| |^|**state**|*string*|*(可选)* 监控项状态<br>**0**, *ITEM\_STATE\_NORMAL*<br>**1**, *ITEM\_STATE\_NOTSUPPORTED*| |^|**lastlogsize**|*number*|*(可选)* 最后一次监控项的大小| |^|**mtime**|*number*|*(可选)* 监控项修改时间| |**discovery data**|<|*array*|*(可选)* 自动发现数据对象数组| | |**clock**|*number*|自动发现数据时间戳| |^|**druleid**|*number*|自动发现规则id| |^|**dcheckid**|*number*|自动发现规则数据的发现检查id 或 null| |^|**type**|*number*|自动发现检查类型:<br><br>**-1** discovery rule data<br>**0**, *SVC\_SSH* - SSH service check<br>**1**, *SVC\_LDAP* - LDAP service check<br>**2**, *SVC\_SMTP* - SMTP service check<br>**3**, *SVC\_FTP* - FTP service check<br>**4**, *SVC\_HTTP* - HTTP service check<br>**5**, *SVC\_POP* - POP service check<br>**6**, *SVC\_NNTP* - NNTP service check<br>**7**, *SVC\_IMAP* - IMAP service check<br>**8**, *SVC\_TCP* - TCP port availability check<br>**9**, *SVC\_AGENT* - Zabbix agent<br>**10**, *SVC\_SNMPv1* - SNMPv1 agent<br>**11**, *SVC\_SNMPv2* - SNMPv2 agent<br>**12**, *SVC\_ICMPPING* - ICMP ping<br>**13**, *SVC\_SNMPv3* - SNMPv3 agent<br>**14**, *SVC\_HTTPS* - HTTPS service check<br>**15**, *SVC\_TELNET* - Telnet availability check| |^|**ip**|*string*|主机 IP 地址| |^|**dns**|*string*|主机 DNS 名称| |^|**port**|*number*|*(可选)* 端口号| |^|**key\_**|*string*|*(可选)* 用于自动发现检查的监控项键 **9** *SVC\_AGENT*| |^|**value**|*string*|*(可选)* 从服务接收的值，对于大多数服务可以为空| |^|**status**|*number*|*(可选)* service status:<br><br>**0**, *DOBJECT\_STATUS\_UP* - 服务up<br>**1**, *DOBJECT\_STATUS\_DOWN* - 服务dwon| |**auto registration**|<|*array*|*(可选)* 自动注册数据对象数组| | |**clock**|*number*|自动注册数据时间戳| |^|**host**|*string*|主机名| |^|**ip**|*string*|*(可选)*  IP | |^|**dns**|*string*|*(可选)* DNS| |^|**port**|*string*|*(可选)* 端口| |^|**host\_metadata**|*string*|*(可选)* agent发送的主机元数据（基于 HostMetadata 或 HostMetadataItem agent配置参数）| |**tasks**|<|*array*|*(可选)* 任务数组| | |**type**|*number*|任务类型:<br><br>**0**, *ZBX\_TM\_TASK\_PROCESS\_REMOTE\_COMMAND\_RESULT* - 远程命令结果| |^|**status**|*number*|远程命令执行状态:<br><br>**0**, *ZBX\_TM\_REMOTE\_COMMAND\_COMPLETED* - 远程命令已成功完成<br>**1**, *ZBX\_TM\_REMOTE\_COMMAND\_FAILED* - 远程命令失败| |^|**error**|*string*|*(可选)* 错误信息| |^|**parent\_taskid**|*number*|父级任务 id| |**more**|<|*number*|*(可选)* 1 - 还有更多历史数据要发送| |**clock**|<|*number*|*(可选)* 数据传输时间戳(秒)| |**ns**|<|*number*|*(可选)* 数据传输时间戳(秒纳秒| |**version**|<|*string*|proxy 版本信息(<major>.<minor>.<build>)| |server→proxy:|<|<|<| |**response**|<|*string*|请求成功信息 ('success' 或 'failed')| |**tasks**|<|*array*|*(可选)* 任务数组| | |**type**|*number*|任务类型:<br><br>**1**, *ZBX\_TM\_TASK\_PROCESS\_REMOTE\_COMMAND* - 远程命令 | |^|**clock**|*number*|任务创建时间| |^|**ttl**|*number*|任务过期时间（以秒为单位）| |^|**commandtype**|*number*|远程命令类型:<br><br>**0**, *ZBX\_SCRIPT\_TYPE\_CUSTOM\_SCRIPT* - use custom script<br>**1**, *ZBX\_SCRIPT\_TYPE\_IPMI* - use IPMI<br>**2**, *ZBX\_SCRIPT\_TYPE\_SSH* - use SSH<br>**3**, *ZBX\_SCRIPT\_TYPE\_TELNET* - use Telnet<br>**4**, *ZBX\_SCRIPT\_TYPE\_GLOBAL\_SCRIPT* - use global script (currently functionally equivalent to custom script)| |^|**command**|*string*|要执行的远程命令| |^|**execute\_on**|*number*|the execution target for custom scripts:<br><br>**0**, *ZBX\_SCRIPT\_EXECUTE\_ON\_AGENT* - execute script on agent<br>**1**, *ZBX\_SCRIPT\_EXECUTE\_ON\_SERVER* - execute script on server<br>**2**, *ZBX\_SCRIPT\_EXECUTE\_ON\_PROXY* - execute script on proxy| |^|**port**|*number*|*(可选)* 远程登录和 ssh 端口| |^|**authtype**|*number*|*(可选)* ssh 命令的身份验证类型| |^|**username**|*string*|*(可选)* telnet 和 ssh 命令的用户名| |^|**password**|*string*|*(可选)* 远程登录和 ssh 命令的密码| |^|**publickey**|*string*|*(可选)* ssh 命令的公钥| |^|**privatekey**|*string*|*(可选)* ssh 命令的私钥| |^|**parent\_taskid**|*number*|父级任务 ID| |^|**hostid**|*number*|目标 hostid|  例子:  server→proxy:  ``` {.javascript} {   "request": "proxy data" } ```  proxy→server:  ``` {.javascript} {     "session": "12345678901234567890123456789012"     "interface availability": [         {             "interfaceid": 1,             "available": 1,             "error": ""     },         {             "interfaceid": 2,             "available": 2,             "error": "Get value from agent failed: cannot connect to [[127.0.0.1]:10049]: [111] Connection refused"     },         {             "interfaceid": 3,             "available": 1,             "error": ""     },         {             "interfaceid": 4,             "available": 1,             "error": ""     }     ],     "history data":[         {             "itemid":"12345",             "clock":1478609647,             "ns":332510044,             "value":"52956612",             "id": 1         },         {             "itemid":"12346",             "clock":1478609647,             "ns":330690279,             "state":1,             "value":"Cannot find information for this network interface in /proc/net/dev.",             "id": 2         }     ],     "discovery data":[         {             "clock":1478608764,             "drule":2,             "dcheck":3,             "type":12,             "ip":"10.3.0.10",             "dns":"vdebian",             "status":1         },         {             "clock":1478608764,             "drule":2,             "dcheck":null,             "type":-1,             "ip":"10.3.0.10",             "dns":"vdebian",             "status":1         }     ],     "auto registration":[         {             "clock":1478608371,             "host":"Logger1",             "ip":"10.3.0.1",             "dns":"localhost",             "port":"10050"         },         {             "clock":1478608381,             "host":"Logger2",             "ip":"10.3.0.2",             "dns":"localhost",             "port":"10050"         }     ],     "tasks":[         {             "type": 0,             "status": 0,             "parent_taskid": 10         },         {             "type": 0,             "status": 1,             "error": "No permissions to execute task.",             "parent_taskid": 20         }     ],         "version":"5.4.0" } ```  server→proxy:  ``` {.javascript} {   "response": "success",   "tasks":[       {          "type": 1,          "clock": 1478608371,          "ttl": 600,          "commandtype": 2,          "command": "restart_service1.sh",          "execute_on": 2,          "port": 80,          "authtype": 0,          "username": "userA",          "password": "password1",          "publickey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe",          "privatekey": "lsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5QCqGKukO1De7zhd",          "parent_taskid": 10,          "hostid": 10070       },       {          "type": 1,          "clock": 1478608381,          "ttl": 600,          "commandtype": 1,          "command": "restart_service2.sh",          "execute_on": 0,          "authtype": 0,          "username": "",          "password": "",          "publickey": "",          "privatekey": "",          "parent_taskid": 20,          "hostid": 10084       }   ] } ```

en-us	#### Proxy startup with MySQL 8.0.0-8.0.17  zabbix\_proxy on MySQL versions 8.0.0-8.0.17 fails with the following "access denied" error:      [Z3001] connection to database 'zabbix' failed: [1227] Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation  That is due to MySQL 8.0.0 starting to enforce special permissions for setting session variables. However, in 8.0.18 this behavior was removed: [As of MySQL 8.0.18, setting the session value of this system variable is no longer a restricted operation.](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html)  The workaround is based on granting additional privileges to the `zabbix` user:  For MySQL versions 8.0.14 - 8.0.17:      grant SESSION_VARIABLES_ADMIN on *.* to 'zabbix'@'localhost';  For MySQL versions 8.0.0 - 8.0.13:      grant SYSTEM_VARIABLES_ADMIN on *.* to 'zabbix'@'localhost';
zh-cn	#### 使用 MySQL 8.0.0-8.0.17 启动 Proxy   zabbix\_proxy 在 8.0.0-8.0.17 版本的 MySQL 上启动失败并报错 "access denied" ：      [Z3001]  connection to database 'zabbix' failed: [1227] Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation  这是由于 MySQL 8.0.0 版本开始强制设置会话变量的特殊权限。然而，在 8.0.18 中删除了此行为： [从 MySQL 8.0.18 开始，不再限制设置系统会话变量的操作](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html)  解决方法是向`zabbix` 用户授予额外权限：  对于 MySQL 8.0.14 - 8.0.17:     grant SESSION_VARIABLES_ADMIN on *.* to 'zabbix'@'localhost';  对于 MySQL 8.0.0 - 8.0.13:     grant SYSTEM_VARIABLES_ADMIN on *.* to 'zabbix'@'localhost';

en-us	### Proxy  The proxy object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |proxyid|string|*(readonly)* ID of the proxy.| |**host**<br>(required)|string|Name of the proxy.| |**status**<br>(required)|integer|Type of proxy.<br><br>Possible values:<br>5 - active proxy;<br>6 - passive proxy.| |description|text|Description of the proxy.| |lastaccess|timestamp|*(readonly)* Time when the proxy last connected to the server.| |tls\_connect|integer|Connections to host.<br><br>Possible values are:<br>1 - *(default)* No encryption;<br>2 - PSK;<br>4 - certificate.| |tls\_accept|integer|Connections from host.<br><br>Possible bitmap values are:<br>1 - *(default)* No encryption;<br>2 - PSK;<br>4 - certificate.| |tls\_issuer|string|Certificate issuer.| |tls\_subject|string|Certificate subject.| |tls\_psk\_identity|string|*(write-only)* PSK identity. Required if either `tls_connect` or `tls_accept` has PSK enabled.<br>Do not put sensitive information in the PSK identity, it is transmitted unencrypted over the network to inform a receiver which PSK to use.| |tls\_psk|string|*(write-only)* The preshared key, at least 32 hex digits. Required if either `tls_connect` or `tls_accept` has PSK enabled.| |proxy\_address|string|Comma-delimited IP addresses or DNS names of active Zabbix proxy.| |auto\_compress|integer|*(readonly)* Indicates if communication between Zabbix server and proxy is compressed.<br><br>Possible values are:<br>0 - No compression;<br>1 - Compression enabled;|  Note that for some methods (update, delete) the required/optional parameter combination is different.
zh-cn	### Proxy  proxy对象具有以下属性。  |属性|[类型](/manual/api/reference_commentary#数据类型)|描述| |--------|---------------------------------------------------|-----------| |proxyid|string|*（只读）* proxy ID。| |**主机**<br>（必需）|string|proxy 名称。| |**状态**<br>（必需）|integer|proxy 类型.<br><br>可能的值：<br>5 - 主动 proxy；<br>6 - 被动 proxy。| |description|text|proxy的描述。| |lastaccess|timestamp|*（只读）* proxy上次连接到服务器的时间。| |tls\_connect|integer|链接到的主机。<br><br>可用值为：<br>1 - *（默认）* 不加密；<br>2 - PSK；<br>4 - 证书。| |tls\_accept|integer|来自主机的连接。<br><br>可用位图值：<br>1 - *（默认）* 无加密；<br>2 - PSK；<br>4 - 证书。| |tls\_issuer|string|证书颁发者。| |tls\_subject|string|证书主题。| |tls\_psk\_identity|string|*（只写）* PSK 身份。如果 `tls_connect` 或 `tls_accept` 启用了 PSK，则为必需。<br>不要将敏感信息放入 PSK 标识中，它会通过网络以未加密方式传输，以通知接收者使用哪个 PSK。| |tls\_psk|string|*（只写）* 预共享密钥，至少 32 个十六进制数字。如果 `tls_connect` 或 `tls_accept` 启用了 PSK，则为必需。| |proxy\_address|string|逗号分隔的活动 Zabbix proxy的 IP 地址或 DNS 名称。| |auto\_compress|integer|*（只读）* 表示 Zabbix server和proxy之间的通信是否被压缩。<br><br>可能的值为：<br>0 - 不压缩；<br>1 - 启用压缩。| 注意，对于某些方法（更新、删除），必需/可选参数组合是不同的。

en-us	# Proxy  This class is designed to work with proxies.  Object references:\  -   [Proxy](/manual/api/reference/proxy/object#proxy) -   [Proxy     interface](/manual/api/reference/proxy/object#proxy_interface)  Available methods:\  -   [proxy.create](/manual/api/reference/proxy/create) - create new     proxies -   [proxy.delete](/manual/api/reference/proxy/delete) - delete proxies -   [proxy.get](/manual/api/reference/proxy/get) - retrieve proxies -   [proxy.update](/manual/api/reference/proxy/update) - update proxies
zh-cn	# Proxy  此类被设计用来处理Proxy。  对象引用：\  -   [Proxy](/manual/api/reference/proxy/object#proxy) -   [Proxy interface](/manual/api/reference/proxy/object#proxy_interface)  可用方法：\  -   [proxy.create](/manual/api/reference/proxy/create) - 创建新proxy -   [proxy.delete](/manual/api/reference/proxy/delete) - 删除proxy -   [proxy.get](/manual/api/reference/proxy/get) - 获取proxy -   [proxy.update](/manual/api/reference/proxy/update) - 更新proxy

en-us	# proxy.update
zh-cn	# 更新

en-us	#### Proxy upgrade process
zh-cn	#### Proxy 升级步骤

en-us	#### Proxy upgrade process  
zh-cn	#### Proxy 升级步骤

en-us	##### Proxy  [Zabbix proxy](/manual/concepts/proxy) can collect performance and availability data on behalf of Zabbix server. A proxy is an optional part of Zabbix deployment; however, it may be very beneficial to distribute the load of a single Zabbix server.
zh-cn	##### Proxy  [Zabbix proxy](/manual/concepts/proxy) 可以代替 Zabbix server 收集性能和可用性数据。proxy 是 Zabbix 部署的可选部分；但是对于分散单个 Zabbix server 的负载非常有用。

en-us	#### PSK contains an odd number of hex-digits  Proxy or agent does not start, message in the proxy or agent log:      invalid PSK in file "/home/zabbix/zabbix_proxy.psk"
zh-cn	 #### PSK 包含奇数个十六进制数字  Proxy 或者 agent 不能启动，proxy 或者 agent 日志中会有如下消息：      invalid PSK in file "/home/zabbix/zabbix_proxy.psk"

en-us	#### PSK identity string longer than 128 bytes is passed to GnuTLS  In TLS client side log:      gnutls_handshake() failed: -110 The TLS connection was non-properly terminated.  In TLS server side log.      gnutls_handshake() failed: -90 The SRP username supplied is illegal.
zh-cn	 #### 长度超过 128 个字节的 PSK 标识字符串将传递到 GnuTLS  在 TLS 客户端日志中会显示如下信息：      gnutls_handshake() failed: -110 The TLS connection was non-properly terminated.  在 TLS 服务器端日志中会显示如下信息：      gnutls_handshake() failed: -90 The SRP username supplied is illegal.

en-us	#### Public and private maps  All users in Zabbix (including non-admin users) can create network maps. Maps have an owner - the user who created them. Maps can be made public or private.  -   *Public* maps are visible to all users, although to see it the user     must have read access to at least one map element. Public maps can     be edited in case a user/ user group has read-write permissions for     this map and at least read permissions to all elements of the     corresponding map including triggers in the links.  ```{=html} <!-- --> ``` -   *Private* maps are visible only to their owner and the users/user     groups the map is [shared](/manual/config/visualization/maps/map)     with by the owner. Regular (non-Super admin) users can only share     with the groups and users they are members of. Admin level users can     see private maps regardless of being the owner or belonging to the     shared user list. Private maps can be edited by the owner of the map     and in case a user/ user group has read-write permissions for this     map and at least read permissions to all elements of the     corresponding map including triggers in the links.  Map elements that the user does not have read permission to are displayed with a grayed-out icon and all textual information on the element is hidden. However, the trigger label is visible even if the user has no permission to the trigger.  To add an element to the map the user must also have at least read permission to it.
zh-cn	#### 公共和私有地图  Zabbix 中的所有用户（包括非管理员用户）都可以创建网络地图。地图有一个所有者——创建它们的用户。地图可以公开或私有。  - *公共*地图对所有用户可见，要查看它，用户必须具有对至少一个map元素的读访问权 。如果用户/用户组对公共映射具有读写权限，并且至少对对应映射的所有元素(包括链接中的触发器)具有读权限，则可以对公共映射进行编辑 。  ```{=html} <!-- --> ``` - *私有*地图仅对其所有者和地图所有者所共享的用户/用户组可见     地图可以被分组为 [共享](/manual/config/visualization/maps/map)于所有者。普通（非超级管理员）用户只能和他所属的组和用户进行分享。管理员级别的用户可以查看私有地图，无论是所有者还是属于共享用户列表的私有地图。私有地图可由地图所有者编辑，用户/用户组对其具有读写权限，至少有读取相应地图的所有元素的权限，包括链接中的触发器。  用户没有读取权限的地图元素是以灰色图标显示，元素的所有文本信息被隐藏。然而，触发标签是可见的，即使用户没有触发器的权限。  要将元素添加到地图，用户还必须至少有读权限。

en-us	##### Purpose of persistent files  When Zabbix agent is started it receives a list of active checks from Zabbix server or proxy.  For log\*\[\] metrics it receives the processed log size and the modification time for finding where to start log file monitoring from. Depending on the actual log file size and modification time reported by file system the agent decides either to continue log file monitoring from the processed log size or re\-analyze the log file from the beginning.  A running agent maintains a larger set of attributes for tracking all monitored log files between checks.  This in\-memory state is lost when the agent is stopped.  The new optional parameter **persistent\_dir** specifies a directory for storing this state of log\[\], log.count\[\], logrt\[\] or logrt.count\[\] item in a file. The state of log item is restored from the persistent file after the Zabbix agent is restarted.  The primary use\-case is monitoring of log file located on a mirrored file system. Until some moment in time the log file is written to both mirrors. Then mirrors are split.  On the active copy the log file is still growing, getting new records. Zabbix agent analyzes it and sends processed logs size and modification time to server. On the passive copy the log file stays the same, well behind the active copy. Later the operating system and Zabbix agent are rebooted from the passive copy. The processed log size and modification time the Zabbix agent receives from server may not be valid for situation on the passive copy.  To continue log file monitoring from the place the agent left off at the moment of file system mirror split the agent restores its state from the persistent file.
zh-cn	##### 持久文件的目的  当 Zabbix agent启动，它会从Zabbix server 或 proxy接收活动检查列表。对于 log\*\[\]指标，它接收处理后的日志大小和修改时间，以查找从哪里开始日志文件监控。根据文件系统报告的实际日志文件大小和修改时间，代理决定从已处理的日志大小继续监控日志文件还是从头重新分析日志文件。  正在运行的代理维护大的属性集，用于在检查之间跟踪所有受监视的日志文件。当代理停止时，这种内存状态会丢失。  新的可选参数 **persistent\_dir** 指定了一个目录，用于在文件中存储log\[\], log.count\[\], logrt\[\] or logrt.count\[\] 监控项的状态。Zabbix agent重启后，从持久化文件中恢复日志监控项的状态。  主要的用户场景是监控位于镜像文件系统中的日志文件，直到某个时刻，日志文件被写入两个镜像。然后镜像被分割。在活动副本上，日志文件仍在增长，获取新记录。Zabbix agent 对其进行分析并将处理后的日志大小和修改时间发送到服务端。在被动副本上，日志文件保持不变，远远落后于活动副本。稍后操作系统和 Zabbix agent从被动副本重新启动。Zabbix agent从服务器接收到的已处理日志大小和修改时间可能对被动副本的情况无效。要从文件系统镜像拆分时代理停止的位置继续进行日志文件监控，代理会从持久文件恢复其状态。 

en-us	#### Query language comparison  The following table lists differences and similarities between PromQL and Zabbix Prometheus preprocessing query language.  |[PromQL instant vector selector](https://prometheus.io/docs/prometheus/latest/querying/basics/#instant-vector-selectors)|<|Zabbix Prometheus preprocessing| |----|----|----| |**Differences**|<|<| |Query target|Prometheus server|Plain text in Prometheus exposition format| |Returns|Instant vector|Metric or label value (Prometheus pattern)<br>Array of metrics for single value in JSON (Prometheus to JSON)| |Label matching operators|**=**, **!=**, **=\~**, **!\~**|**=**, **!=**, **=\~**, **!\~**| |Regular expression used in label or metric name matching|RE2|PCRE| |Comparison operators|See [list](https://prometheus.io/docs/prometheus/latest/querying/operators/#comparison-binary-operators)|Only **==** (equal) is supported for value filtering| |**Similarities**|<|<| |Selecting by metric name that equals string|<metric name> or {\_\_name\_\_="<metric name>"}|<metric name> or {\_\_name\_\_="<metric name>"}| |Selecting by metric name that matches regular expression|{\_\_name\_\_=\~"<regex>"}|{\_\_name\_\_=\~"<regex>"}| |Selecting by <label name> value that equals string|{<label name>="<label value>",...}|{<label name>="<label value>",...}| |Selecting by <label name> value that matches regular expression|{<label name>=\~"<regex>",...}|{<label name>=\~"<regex>",...}| |Selecting by value that equals string|{\_\_name\_\_=\~".\*"} == <value>|{\_\_name\_\_=\~".\*"} == <value>|
zh-cn	#### 查询语言对照表  下表列出了PromQL与Zabbix Prometheus 预处理查询语言之间的异同。  |<|[PromQL瞬时向量选择器](https://prometheus.io/docs/prometheus/latest/querying/basics/#instant-vector-selectors)|Zabbix Prometheus预处理| |----|----|----| |**不同点**|<|<| |查询目标|Prometheus服务器|Prometheus行协议中的纯文本| |返回值|瞬时向量|指标或标签的值（Prometheus正则匹配）<br>JSON格式的包含单个值的指标构成的数组（Prometheus转JSON）| |标签匹配操作符|**=**, **!=**, **=\~**, **!\~**|**=**, **!=**, **=\~**, **!\~**| |匹配标签或指标名称的正则表达式|RE2|PCRE| |比较操作符|详见[清单](https://prometheus.io/docs/prometheus/latest/querying/operators/#comparison-binary-operators)|只有 **==** (相等)用于支持值过滤| |**相似点**|<|<| |依据指标名相同的字符串筛选|<metric name> or {\_\_name\_\_="<metric name>"}|<metric name> or {\_\_name\_\_="<metric name>"}| |依据匹配正则表达式的指标名筛选|{\_\_name\_\_=\~"<regex>"}|{\_\_name\_\_=\~"<regex>"}| |依据相同字符串的标签名称值筛选|{<label name>="<label value>",...}|{<label name>="<label value>",...}| |依据匹配正则表达式的标签名称值筛选|{<label name>=\~"<regex>",...}|{<label name>=\~"<regex>",...}| |根据相同的字符串的值筛选|{\_\_name\_\_=\~".\*"} == <value>|{\_\_name\_\_=\~".\*"} == <value>|

en-us	### Query separate tablespaces in Oracle databases with Zabbix agent 2  The following [Zabbix agent 2 items](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2), supported for the Oracle plugin, now have additional optional parameters:  -   oracle.diskgroups.stats\[<existingParameters>,**<diskgroup>**\] -   oracle.archive.info\[<existingParameters>,**<destination>**\] -   oracle.cdb.info\[<existingParameters>,**<database>**\] -   oracle.pdb.info\[<existingParameters>,**<database>**\] -   oracle.ts.stats\[<existingParameters>,**<tablespace>**,**<type>**\]  These parameters allow to query separate instances of data instead of all data, thus improving performance.
zh-cn	### 使用 Zabbix agent 2 查询 Oracle 数据库中的单独表空间  以下 [Zabbix agent 2 监控项](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2)，支持 Oracle 插件，现在有额外的可选参数：  -  oracle.diskgroups.stats\[<existingParameters>,**<diskgroup>**\] -  oracle.archive.info\[<existingParameters>,**<destination>**\] -  oracle.cdb.info\[<existingParameters>,**<database>**\] -  oracle.pdb.info\[<existingParameters>,**<database>**\] -  oracle.ts.stats\[<existingParameters>,**<tablespace>**,**<type>**\]  这些参数允许查询单独的数据实例而不是所有数据，从而提高性能。

en-us	### Query separate tablespaces in Oracle databases with Zabbix agent 2  The following [Zabbix agent 2 items](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2), supported for the Oracle plugin, now have additional optional parameters:  -   oracle.diskgroups.stats\[<existingParameters>,**<diskgroup>**\] -   oracle.archive.info\[<existingParameters>,**<destination>**\] -   oracle.cdb.info\[<existingParameters>,**<database>**\] -   oracle.pdb.info\[<existingParameters>,**<database>**\] -   oracle.ts.stats\[<existingParameters>,**<tablespace>**,**<type>**\]  These parameters allow to query separate instances of data instead of all data, thus improving performance.
zh-cn	### 使用 Zabbix agent 2 查询 Oracle 数据库中的单独表空间  以下[Zabbix agent 2 监控项](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2)，支持Oracle插件，现在有额外的可选参数：  -  oracle.diskgroups.stats\[<existingParameters>,**<diskgroup>**\] -  oracle.archive.info\[<existingParameters>,**<destination>**\] -  oracle.cdb.info\[<existingParameters>,**<database>**\] -  oracle.pdb.info\[<existingParameters>,**<database>**\] -  oracle.ts.stats\[<existingParameters>,**<tablespace>**,**<type>**\]  这些参数允许查询单独的数据实例而不是所有数据，从而提高性能。

en-us	#### Queue item  A special internal item **zabbix\[queue,<from>,<to>\]** can be used to monitor the health of the queue in Zabbix. It will return the number of items delayed by the set amount of time. For more information see [Internal items](/manual/config/items/itemtypes/internal).
zh-cn	#### 队列监控项  有一个特别的内部监控项**zabbix\[queue,<from>,<to>\]**可以用于监控ZABBIX中队列的健康状态。他会返回指定时间区间的监控项数目。有关更多信息请参阅[内部监控项](/zh/manual/config/items/itemtypes/internal)。\

en-us	##### Readable summary in maps  A hidden "aria-label" property is available allowing map information to be read with a screen reader. Both general map description and individual element description is available, in the following format:  -   for map description:     `<Map name>, <* of * items in problem state>, <* problems in total>.` -   for describing one element with one problem:     `<Element type>, Status <Element status>, <Element name>, <Problem description>.` -   for describing one element with multiple problems:     `<Element type>, Status <Element status>, <Element name>, <* problems>.` -   for describing one element without problems:     `<Element type>, Status <Element status>, <Element name>.`  For example, this description is available:      'Local network, 1 of 6 elements in problem state, 1 problem in total. Host, Status problem, My host, Free disk space is less than 20% on volume \/. Host group, Status ok, Virtual servers. Host, Status ok, Server 1. Host, Status ok, Server 2. Host, Status ok, Server 3. Host, Status ok, Server 4. '  for the following map:  ![](../../../../../assets/en/manual/web_interface/map_aria_label.png){width="600"}
zh-cn	##### 在拓扑图中读取摘要  一个隐藏的可用属性“气泡(aria-label)”，允许使用屏幕阅读器阅读拓扑图信息。 通用拓扑图描述和单个元素描述都可以用，格式如下：  - · 拓扑图描述：  · `<Map name>, <* of * items in problem state>, <* problems in total>.` - · 描述某个元素的某个问题：  · `<Element type>, Status <Element status>, <Element name>, <Problem description>.` - · 描述某个元素的多个问题：  · `<Element type>, Status <Element status>, <Element name>, <* problems>.` - · 描述某个没有问题的元素：  · `<Element type>, Status <Element status>, <Element name>.`  例如，可使用这个描述：   · 'Local network, 1 of 6 elements in problem state, 1 problem in total. Host, Status problem, My host, Free disk space is less than 20% on volume \/. Host group, Status ok, Virtual servers. Host, Status ok, Server 1. Host, Status ok, Server 2. Host, Status ok, Server 3. Host, Status ok, Server 4. '  以下拓扑图：  ![](../../../../../assets/en/manual/web_interface/map_aria_label.png){width="600"}

en-us	#### Reading host availability  Host availability icons reflect the current host interface status on Zabbix server. Therefore, in the frontend:  -   If you disable a host, availability icons will not immediately turn     gray (unknown status), because the server has to synchronize the     configuration changes first; -   If you enable a host, availability icons will not immediately turn     green (available), because the server has to synchronize the     configuration changes and start polling the host first.
zh-cn	#### 读取主机可用性  主机可用性图标反映Zabbix服务器上的当前主机接口状态。因此，在前端:  -   如果你禁用一个主机，可用性图标不会立即变成灰色(未知状态)，因为服务器必须先同步配置更改; -   如果启用主机，可用性图标不会立即变为绿色(可用)，因为服务器必须先同步配置更改并开始轮询主机

en-us	#### Ready-to-use templates  The default dataset in Zabbix offers several ready-to-use templates for monitoring VMware vCenter or directly ESX hypervisor. These templates contain pre-configured LLD rules as well as a number of built-in checks for monitoring virtual installations.  Templates for VMware vCenter and ESX hypervisor monitoring:  -   *VMware* - uses UUID data for corresponding macros; -   *VMware FQDN* - uses FQDN data for corresponding macros.  ::: noteclassic  In order for the *VMware FQDN* template to work correctly each monitored VM should have a unique OS name compliant with FQDN rules and VMware Tools must be installed on every machine. If these conditions are met, it is recommended to use *VMware FQDN* template. The creation of *VMware FQDN* template became possible after introducing the ability to create hosts with custom interfaces in Zabbix 5.2.\ \ A classic *VMware* template is still available and can be used if FQDN requirements cannot be met. Please keep in mind, that the *VMware* template has a known issue. Hosts for discovered virtual machines will be created with the names saved in the vCenter (for example, VM1, VM2, etc.). If Zabbix agent active is installed on these hosts later with autoregistration enabled, the autoregistration process will read host names as they have been registered upon launch (for example, vm1.example.com, vm2.example.com, etc.) and create new hosts since no name matches have been found. As a result there will be two duplicate hosts for each machine with different names.  :::  Templates used by discovery (normally, these templates should not be manually linked to a host):  -   *VMware Hypervisor*; -   *VMware Guest*.  ![](../../assets/en/manual/vm_monitoring/templates_vm.png)
zh-cn	#### 开箱即用的模板  Zabbix 官方默认提供了几个开箱即用的模板，用于监控 VMware vCenter 或直接 ESX hypervisor。这些模板包含预配置的 LLD 规则以及一些用于监控虚拟化安装的内置检查。  VMware vCenter 和 ESX hypervisor 监控模板：  -   *VMware* - 为相应的宏使用 UUID 数据； -   *VMware FQDN* - 将 FQDN 数据用于相应的宏。  ::: noteclassic 为了使 *VMware FQDN* 模板正常工作，每个受监控的 VM 都应具有符合 FQDN 规则的唯一操作系统名称，并且必须在每台计算机上安装 VMware Tools。如果满足以上条件，建议使用 *VMware FQDN* 模板。在 Zabbix 5.2 中引入了使用自定义接口创建主机的功能后，  *VMware FQDN* 模板的创建成为可能。\ \ 如果无法满足 FQDN 要求， *VMware* 模板仍然可以使用。 *VMware* 模板有个已知问题：使用保存在 vCenter 中的名称（例如，VM1、VM2 等）创建已发现虚拟机的主机。如果稍后在这些主机上安装 Zabbix agent 并启用自动注册，由于不存在相应的主机，则自动注册进程将读取主机名作为他们启动时的注册名（例如，vm1.example.com、vm2.example.com 等）并创建一个新的主机。因此，每台机器都会有两个具有不同名称的重复主机。 :::  发现虚拟主机使用的模板（通常，这些模板不应该被手动链接到其他主机）：  -   *VMware Hypervisor*； -   *VMware Guest*。  ![](../../assets/en/manual/vm_monitoring/templates_vm.png)

en-us	##### Recent change markers  Inward pointing red triangles around an element indicate a recent trigger status change - one that's happened within the last 30 minutes. These triangles are shown if the *Mark elements on trigger status change* check-box is marked in map [configuration](/manual/config/visualization/maps/map#creating_a_map).
zh-cn	##### 最近更改的标记  元素周围向内指向的红色三角形表示最近的触发状态变化 - 最近30分钟内触发状态发生更改。 如果在拓扑图[配置](/manual/config/visualization/maps/map#creating_a_map)中选择了“触发器状态上的标记组件改变”复选框，则会显示这些三角形。

en-us	#### Recent data vs longer periods  For very recent data a **single** line is drawn connecting each received value. The single line is drawn as long as there is at least one horizontal pixel available for one value.  For data that show a longer period **three lines** are drawn - a dark green one shows the average, while a light pink and a light green line shows the maximum and minimum values at that point in time. The space between the highs and the lows is filled with yellow background.  Working time (working days) is displayed in graphs as a white background, while non-working time is displayed in gray (with the *Original blue* default frontend theme).  ![](../../../../../assets/en/manual/config/graph_working_time.png){width="550"}  Working time is always displayed in simple graphs, whereas displaying it in [custom graphs](custom#configuring_custom_graphs) is a user preference.  Working time is not displayed if the graph shows more than 3 months.
zh-cn	#### 最近的数据与更长的时期  对于最近的数据，会绘制一条**单**线连接每个接收到的数据价值。只要至少有一条线，就画一条线水平像素可用于一个值。  对于显示较长周期的数据**绘制三条线** - 深色绿色表示平均值，而浅粉色和浅绿色线显示该时间点的最大值和最小值。空间高点和低点之间用黄色背景填充。  工作时间（工作日）在图表中显示为白色背景，而非工作时间以灰色显示（默认前端主题使用*原始蓝色*）。  ![](../../../../../assets/en/manual/config/graph_working_time.png){width="550"}  在简单的图表中工作时间总会显示，而在[自定义图表](custom#configuring_custom_graphs) 中可以按照用户偏好显示。  如果图表显示超过 3 个月，则不显示工作时间。

en-us	##### Record filter  A functionality for filtering records by the frontend operation that caused these entries has been added. If several log records have been created as a result of a single operation, for example, linking/unlinking a template, such records will have the same *Recordset ID*.
zh-cn	##### 记录过滤器  添加了通过导致这些条目的前端操作过滤记录的功能。如果由于单个操作（例如链接/取消链接模板）而创建了多个日志记录，则这些记录将具有相同的*Recordset ID*。

en-us	##### Records  The audit log now contains records about all configuration changes for all Zabbix objects, including changes that occurred as a result of executing an LLD rule, a network discovery action, an autoregistration action, or a script execution. Previously, configuration changes initiated from Zabbix server, for example, as a result of executing a discovery rule, were not recorded. Now such object modifications will be stored as audit records attributed to the user System.
zh-cn	##### 记录  审计日志现在包含有关所有 Zabbix 对象的所有配置更改的记录，包括由于执行 LLD 规则、网络发现操作、自动注册操作或脚本执行而发生的更改。以前，从 Zabbix server 发起的配置更改，例如作为执行发现规则的结果，不会被记录。现在，此类对象修改将存储为归属于用户系统的审计记录。

en-us	### Red Hat Enterprise Linux  Open the `/etc/yum.repos.d/zabbix.repo` file and set enabled=1 for the `zabbix-unstable` repo.       [zabbix-unstable]     name=Zabbix Official Repository (unstable) - $basearch     baseurl=https://repo.zabbix.com/zabbix/5.5/rhel/8/$basearch/     enabled=1     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
zh-cn	### Red Hat 企业版Linux  打开 `/etc/yum.repos.d/zabbix.repo` 文件并为 `zabbix-unstable` 仓库设置 enabled=1。    · [zabbix-unstable]  · name=Zabbix Official Repository (unstable) - $basearch  · baseurl=https://repo.zabbix.com/zabbix/5.5/rhel/8/$basearch/  · enabled=1  · gpgcheck=1  · gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

en-us	 ### Redis  |Key|<|<|<| |--|--|------|------| |**Description**|**Return value**|**Parameters**|**Comments**| |redis.config\[connString,<password>,<pattern>\]|<|<|<| |Gets the configuration parameters of a Redis instance that match the pattern.|JSON - if a glob-style pattern was used<br><br>single value - if a pattern did not contain any wildcard character|**connString** - URI or session name.<br>**password** - Redis password.<br>**pattern** - glob-style pattern (*\** by default).| | |redis.info\[connString,<password>,<section>\]|<|<|<| |Gets the output of the INFO command.|JSON - output is serialized as JSON|**connString** - URI or session name.<br>**password** - Redis password.<br>**section** - [section](https://redis.io/commands/info) of information (*default* by default).| | |redis.ping\[connString,<password>\]|<|<|<| |Test if a connection is alive or not.|1 - connection is alive<br><br>0 - connection is broken (if there is any error presented including AUTH and configuration issues)|**connString** - URI or session name.<br>**password** - Redis password.| | |redis.slowlog.count\[connString,<password>\]|<|<|<| |The number of slow log entries since Redis was started.|Integer|**connString** - URI or session name.<br>**password** - Redis password.| |
zh-cn	### Redis  |Key|<|<|<| |---|---|---|---| |**描述**|**返回值**|**参数**|**注释**| |redis.config\[connString,<password>,<pattern>\]|<|<|<| |获取与 Pattern 匹配的 Redis 实例的配置参数.|JSON - 如果使用了 glob-style pattern 返回 JSON 格式<br><br>single value - 如果 pattern 不包含任何的通配符返回单个值|**connString** - URI 或者 session name.<br>**password** - Redis 密码.<br>**pattern** - glob-style pattern (*\** 是缺省值).| | |redis.info\[connString,<password>,<section>\]|<|<|<| |获取 INFO 命令的输出.|JSON - 输出序列化为 JSON 格式|**connString** - URI 或者 session name.<br>**password** - Redis 密码.<br>**section** - [section](https://redis.io/commands/info) 信息 (*default* 是缺省值).| | |redis.ping\[connString,<password>\]|<|<|<| |测试连接是否存活.|1 - 连接存活<br><br>0 - 连接断开 (如果出现包括认证和配置问题的错误提示)|**connString** - URI 或者 session name.<br>**password** - Redis 密码.| | |redis.slowlog.count\[connString,<password>\]|<|<|<| |Redis 启动后慢日志的数量.|Integer 整数|**connString** - URI 或者 session name.<br>**password** - Redis 密码.| |

en-us	##### Referencing a network map  Network maps can be referenced by both `sysmapid` and `mapname` GET parameters. For example,      http://zabbix/zabbix/zabbix.php?action=map.view&mapname=Local%20network  will open the map with that name (Local network).  If both `sysmapid` (map ID) and `mapname` (map name) are specified, `mapname` has higher priority.
zh-cn	##### 引用网络拓扑图  可以被  `sysmapid`  和  `mapname`  GET参数引用。例如，   · http://zabbix/zabbix/zabbix.php?action=map.view&mapname=Local%20network  将打开名称是本地网络的拓扑图。  如果同时指定了  `sysmapid`  （地图ID） 和  `mapname`  (地图名称) 时，  `mapname`  具有更高有优先级。

en-us	#### regexp  Changes:\ [ZBXNEXT-6717](https://support.zabbix.com/browse/ZBXNEXT-6717) added `regexp.get`, `regexp.create`, `regexp.update` and `regexp.delete` API.\
zh-cn	 #### 正则表达式  变更：\ [ZBXNEXT-6717](https://support.zabbix.com/browse/ZBXNEXT-6717) 添加`regexp.get`，`regexp.create`，`regexp.update`和`regexp.delete` API接口。\

en-us	#### regexp  Changes:\ [ZBXNEXT-6717](https://support.zabbix.com/browse/ZBXNEXT-6717) added `regexp.get`, `regexp.create`, `regexp.update` and `regexp.delete` API.\
zh-cn	 #### 正则表达式  变更：\ [ZBXNEXT-6717](https://support.zabbix.com/browse/ZBXNEXT-6717) 添加`regexp.get`，`regexp.create`，`regexp.update`和`regexp.delete` API接口。\

en-us	# regexp.create
zh-cn	# 正则表达式.创建

en-us	# regexp.delete
zh-cn	# 正则表达式.删除

en-us	# regexp.get
zh-cn	# 正则表达式.获取

en-us	# regexp.update
zh-cn	# 正则表达式.更新

en-us	# > Regular expression object  The following objects are directly related to the `regexp` API.
zh-cn	# > 目标：正则表达式  以下所列内容均与 `regexp（正则表达式）` API 直接关联。

en-us	#### Regular expressions  Manage global regular expressions.  [Regular expression API](/manual/api/reference/regexp)
zh-cn	#### 正则表达式  管理全局正则表达式。  [Regular expression API](/manual/api/reference/regexp)

en-us	#### - Regular expressions  This section allows creating custom regular expressions that can be used in several places in the frontend. See [Regular expressions](/manual/regular_expressions) section for details.
zh-cn	#### - 正则表达式  本节允许创建可在前端多个位置使用的自定义正则表达式。  有关详细信息，请参阅 [Regular expressions](/manual/regular_expressions) 部分。

en-us	#### Regular expression support by location  |Location|<|Regular expression|Global regular expression|Comments| |--------|-|------------------|-------------------------|--------| |**[Agent items](/manual/config/items/itemtypes/zabbix_agent)**|<|<|<|<| |<|eventlog\[\]|Yes|Yes|`regexp`, `severity`, `source`, `eventid` parameters| |^|log\[\]|^|^|`regexp` parameter| |^|log.count\[\]|^|^|^| |^|logrt\[\]|^|Yes/No|`regexp` parameter supports both, `file_regexp` parameter supports non-global expressions only| |^|logrt.count\[\]|^|^|^| |^|proc.cpu.util\[\]|^|No|`cmdline` parameter| |^|proc.mem\[\]|^|^|^| |^|proc.num\[\]|^|^|^| |^|sensor\[\]|^|^|`device` and `sensor` parameters on Linux 2.4| |^|system.hw.macaddr\[\]|^|^|`interface` parameter| |^|system.sw.packages\[\]|^|^|`package` parameter| |^|vfs.dir.count\[\]|^|^|`regex_incl`, `regex_excl`, `regex_excl_dir` parameters| |^|vfs.dir.size\[\]|^|^|`regex_incl`, `regex_excl`, `regex_excl_dir` parameters| |^|vfs.file.regexp\[\]|^|^|`regexp` parameter| |^|vfs.file.regmatch\[\]|^|^|^| |^|web.page.regexp\[\]|^|^|^| |**[SNMP traps](/manual/config/items/itemtypes/snmptrap)**|<|<|<|<| |<|snmptrap\[\]|Yes|Yes|`regexp` parameter| |**[Item value preprocessing](/manual/config/items/item#item_value_preprocessing)**|<|Yes|No|`pattern` parameter| |**[Functions for triggers/calculated items](/manual/appendix/functions)**|<|<|<|<| |<|count()|Yes|Yes|`pattern` parameter if `operator` parameter is *regexp* or *iregexp*| |<|countunique()|Yes|Yes|^| |<|find()|Yes|Yes|^| |^|logeventid()|Yes|Yes|`pattern` parameter| |^|logsource()|^|^|^| |**[Low-level discovery](/manual/discovery/low_level_discovery#discovery_rule_filter)**|<|<|<|<| |<|Filters|Yes|Yes|*Regular expression* field| |^|Overrides|Yes|No|In *matches*, *does not match* options for *Operation* conditions| |**[Action conditions](/manual/config/notifications/action/conditions)**|<|Yes|No|In *matches*, *does not match* options for *Host name* and *Host metadata* autoregistration conditions| |**[Web monitoring](/manual/web_monitoring#configuring_a_web_scenario)**|<|Yes|No|*Variables* with a **regex:** prefix<br>*Required string* field| |**[User macro context](/manual/config/macros/user_macros#user_macro_context)**|<|Yes|No|In macro context with a **regex:** prefix| |**[Macro functions](/manual/config/macros/macro_functions)**|<|<|<|<| |<|regsub()|Yes|No|`pattern` parameter| |^|iregsub()|^|^|^| |**[Icon mapping](/manual/web_interface/frontend_sections/administration/general#icon_mapping)**|<|Yes|Yes|*Expression* field| |**[Value mapping](/manual/config/items/mapping#configuration)**|<|Yes|No|*Value* field if mapping type is `regexp`|
zh-cn	#### 支持正则表达式的位置  |位置|<|正则表达式|全局正则表达式|注释| |--------|-|------------------|-------------------------|--------| |**[Agent 监控项](/manual/config/items/itemtypes/zabbix_agent)**|<|<|<|<| |<|eventlog\[\]|是|是|`regexp`, `severity`, `source`, `eventid` 参数| |^|log\[\]|^|^|`regexp` 参数| |^|log.count\[\]|^|^|^| |^|logrt\[\]|^|是/否|`regexp` 参数两者都支持，`file_regexp` 参数仅支持非全局表达式| |^|logrt.count\[\]|^|^|^| |^|proc.cpu.util\[\]|^|否|`cmdline` 参数| |^|proc.mem\[\]|^|^|^| |^|proc.num\[\]|^|^|^| |^|sensor\[\]|^|^|Linux 2.4的 `device` 和 `sensor` 参数 | |^|system.hw.macaddr\[\]|^|^|`interface` 参数| |^|system.sw.packages\[\]|^|^|`package` 参数| |^|vfs.dir.count\[\]|^|^|`regex_incl`, `regex_excl`, `regex_excl_dir` 参数| |^|vfs.dir.size\[\]|^|^|`regex_incl`, `regex_excl`, `regex_excl_dir` 参数| |^|vfs.file.regexp\[\]|^|^|`regexp` 参数| |^|vfs.file.regmatch\[\]|^|^|^| |^|web.page.regexp\[\]|^|^|^| |**[SNMP traps](/manual/config/items/itemtypes/snmptrap)**|<|<|<|<| |<|snmptrap\[\]|是|是|`regexp` 参数| |**[监控项值预处理](/manual/config/items/item#item_value_preprocessing)**|<|是|否|`pattern` 参数| |**[触发器函数/可计算监控项](/manual/appendix/functions)**|<|<|<|<| |<|count()|是|是|`pattern` 参数如果 `operator` 参数是 *regexp* 或 *iregexp*| |<|countunique()|是|是|^| |<|find()|是|是|^| |^|logeventid()|是|是|`pattern` 参数| |^|logsource()|^|^|^| |**[低级别自动发现](/manual/discovery/low_level_discovery#discovery_rule_filter)**|<|<|<|<| |<|Filters（过滤）|是|是|*正则表达式* 字段| |^|Overrides（覆盖）|是|否|在*Operation（操作）* 条件中 *matches（匹配）*、*does not match（不匹配）* 选项 | |**[动作条件](/manual/config/notifications/action/conditions)**|<|是|否|在 *Host name（主机名）* and *Host metadata（主机元数据）* 自动注册条件中 *matches（匹配）*、*does not match（不匹配）* 选项 | |**[Web 监控](/manual/web_monitoring#configuring_a_web_scenario)**|<|是|否|以 **regex:** 为前缀的变量 <br>*Required string（需要字符串）* 字段| |**[用户宏上下文](/manual/config/macros/user_macros#user_macro_context)**|<|是|否|在宏的上下文中带有 **regex:** 前缀| |**[宏函数](/manual/config/macros/macro_functions)**|<|<|<|<| |<|regsub()|是|否|`pattern` 参数| |^|iregsub()|^|^|^| |**[图标映射](/manual/web_interface/frontend_sections/administration/general#icon_mapping)**|<|是|是|*Expression* field| |**[值映射](/manual/config/items/mapping#configuration)**|<|是|否|*Value（值）* 字段如果值映射是`regexp`|

en-us	#### Regular expressions  You may manually enter a regular expression in supported places. Note that the expression may not start with @ because that symbol is used in Zabbix for referencing global regular expressions.  ::: notewarning It's possible to run out of stack when using regular expressions. See the [pcrestack man page](http://pcre.org/original/doc/html/pcrestack.html) for more information. :::  Note that in multi-line matching, the `^` and `$` anchors match at the beginning/end of each line respectively, instead of the beginning/end of the entire string.
zh-cn	#### 正则表达式  你可以在支持的位置手动输入正则表达式。注意，表达式可能不以 @ 开头，因为该符号在 Zabbix 中用于引用全局正则表达式。  ::: notewarning 使用正则表达式时可能会耗尽堆栈。有关更多信息，请参见 [pcrestack 帮助页](http://pcre.org/original/doc/html/pcrestack.html) 。 :::  在多行匹配中，锚点 `^` 和 `$` 分别匹配每行的开头/结尾，而不是整个字符串的开头/结尾。

en-us	### Regular expression  The global regular expression object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |regexpid|string|*(readonly)* ID of the regular expression.| |**name**<br>(required)|string|Name of the regular expression.| |test\_string|string|Test string.|  Note that for some methods (update, delete) the required/optional parameter combination is different.
zh-cn	### 正则表达式  全局正则表达式对象都具有下列属性。  | 属性| [类型](zh/manual/api/reference_commentary#data_types) | 说明| | ---------------------- | ----------------------------------------------------- | ------------------------- | | regexpid| 字符串| *（只读）* 正则表达式ID。| | **name**<br>(必需) | 字符串 | 正则表达式名称。| | test\_string | 字符串 | 测试字符串。| 注意，对于某些方法（更新、删除），必需/可选参数组合是不同的。

en-us	# Regular expression  This class is designed to work with global regular expressions.  Object references:\  -   [Regular expression](/manual/api/reference/regexp/object)  Available methods:\  -   [regexp.create](/manual/api/reference/regexp/create) - creating new     regular expressions -   [regexp.delete](/manual/api/reference/regexp/delete) - deleting     regular expressions -   [regexp.get](/manual/api/reference/regexp/get) - retrieving regular     expressions -   [regexp.update](/manual/api/reference/regexp/update) - updating     regular expressions
zh-cn	# 正则表达式  本节内容用于使用户更全面的了解如何使用有关全局类正则表达式的API功能。  用户可直接参考：\  -   [正则表达式](zh/manual/api/reference/regexp/object)  可应用的功能方式包括：\  -   [regexp.create](zh/manual/api/reference/regexp/create) 创建新的正则表达式 -   [regexp.delete](zh/manual/api/reference/regexp/delete) - 删除目标正则表达式 -   [regexp.get](zh/manual/api/reference/regexp/get) - 检索正则表达式数据 -   [regexp.update](zh/manual/api/reference/regexp/update) - 更新正则表达式数据

en-us	#### Remote commands with multiple interfaces  If the target system has multiple interfaces of the selected type (Zabbix agent or IPMI), remote commands will be executed on the default interface.  It is possible to execute remote commands via SSH and Telnet using another interface than the Zabbix agent one. The available interface to use is selected in the following order:   * Zabbix agent default interface  * SNMP default interface  * JMX default interface  * IPMI default interface
zh-cn	#### 有多个接口的远程命令  如果目标系统有多个所选类型（Zabbix agent或IPMI）的接口，远程命令会在默认的接口执行。  除Zabbix agent接口以外，可以在其它接口通过SSH或Telnet执行远程命令。可用的接口按如下顺序选择：   * Zabbix agent default interface  * SNMP default interface  * JMX default interface  * IPMI default interface

en-us	#### Remove token expiry  Remove expiry date from token.  Request:  ```json {     "jsonrpc": "2.0",     "method": "token.update",     "params": {         "tokenid": "2",         "expires_at": "0"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "tokenids": [             "2"         ]     },     "id": 1 } ```
zh-cn	#### 删除过期令牌  从令牌中删除到期日期。  请求：  ```json {     "jsonrpc": "2.0",     "method": "token.update",     "params": {         "tokenid": "2",         "expires_at": "0"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": {         "tokenids": [             "2"         ]     },     "id": 1 } ```

en-us	#### Removing hosts from host groups  Remove two hosts from the given host groups.  Request:  ```json {     "jsonrpc": "2.0",     "method": "hostgroup.massremove",     "params": {         "groupids": [             "5",             "6"         ],         "hostids": [             "30050",             "30001"         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "groupids": [             "5",             "6"         ]     },     "id": 1 } ```
zh-cn	#### 从主机组中删除主机  从给定的主机组中删除两个主机。  请求:  ```json {     "jsonrpc": "2.0",     "method": "hostgroup.massremove",     "params": {         "groupids": [             "5",             "6"         ],         "hostids": [             "30050",             "30001"         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "groupids": [             "5",             "6"         ]     },     "id": 1 } ```

en-us	#### Removing interfaces  Remove the "127.0.0.1" SNMP interface from two hosts.  Request:  ```json {     "jsonrpc": "2.0",     "method": "hostinterface.massremove",     "params": {         "hostids": [             "30050",             "30052"         ],         "interfaces": {             "dns": "",             "ip": "127.0.0.1",             "port": "161"         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "interfaceids": [             "30069",             "30070"         ]     },     "id": 1 } ```
zh-cn	#### 删除接口  从两台主机中删除 "127.0.0.1" SNMP接口。  请求:  ```json {     "jsonrpc": "2.0",     "method": "hostinterface.massremove",     "params": {         "hostids": [             "30050",             "30052"         ],         "interfaces": {             "dns": "",             "ip": "127.0.0.1",             "port": "161"         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "interfaceids": [             "30069",             "30070"         ]     },     "id": 1 } ```

en-us	#### Removing templates from a group  Remove two templates from group "2".  Request:  ```json {     "jsonrpc": "2.0",     "method": "template.massremove",     "params": {         "templateids": [             "10085",             "10086"         ],         "groupids": "2"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "templateids": [             "10085",             "10086"         ]     },     "id": 1 } ```
zh-cn	#### 从一个群组中删除模版  从群组“2”中删除两个模版。  请求:  ```json {     "jsonrpc": "2.0",     "method": "template.massremove",     "params": {         "templateids": [             "10085",             "10086"         ],         "groupids": "2"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "templateids": [             "10085",             "10086"         ]     },     "id": 1 } ```

en-us	#### Removing web server test page  It is recommended to remove the web server test page to avoid information exposure. By default, web server webroot contains a test page called index.html (Apache2 on Ubuntu is used as an example):  ![](../../../../assets/en/manual/installation/requirements/test_page.png)  The test page should be removed or should be made unavailable as part of the web server hardening process.
zh-cn	#### 删除web服务器测试页面  建议移除 web 服务器测试页面，以免信息泄露。 默认情况下，Web 服务器 webroot 包含一个名为 index.html 的测试页面（以 Ubuntu 上的 Apache2 为例）：  ![] (../../../../assets/en/manual/installation/requirements/test_page.png)  作为web服务器加固过程的一部分，测试页面应该被删除或设为不可用。

en-us	#### Rename icon map  Rename an icon map to "OS icons".  Request:  ```json {     "jsonrpc": "2.0",     "method": "iconmap.update",     "params": {         "iconmapid": "1",         "name": "OS icons"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "iconmapids": [             "1"         ]     },     "id": 1 } ```
zh-cn	#### 重命名一个图标映射  重命名一个图标映射为“OS icons”。  请求：  ```json {     "jsonrpc": "2.0",     "method": "iconmap.update",     "params": {         "iconmapid": "1",         "name": "OS icons"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": {         "iconmapids": [             "1"         ]     },     "id": 1 } ```

en-us	#### Rename image  Rename image to "Cloud icon".  Request:  ```json {     "jsonrpc": "2.0",     "method": "image.update",     "params": {         "imageid": "2",         "name": "Cloud icon"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "imageids": [             "2"         ]     },     "id": 1 } ```
zh-cn	#### 重命名图像  将图像重命名为 “Cloud icon” 。  请求：  ```json {     "jsonrpc": "2.0",     "method": "image.update",     "params": {         "imageid": "2",         "name": "Cloud icon"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": {         "imageids": [             "2"         ]     },     "id": 1 } ```

en-us	#### Renaming a dashboard  Rename a dashboard to "SQL server status".  Request:  ```json {     "jsonrpc": "2.0",     "method": "dashboard.update",     "params": {         "dashboardid": "2",         "name": "SQL server status"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "dashboardids": [             "2"         ]     },     "id": 1 } ```
zh-cn	#### 重命名一个仪表盘  重命名一个仪表盘为 "SQL server status"。  请求：  ```json {     "jsonrpc": "2.0",     "method": "dashboard.update",     "params": {         "dashboardid": "2",         "name": "SQL server status"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": {         "dashboardids": [             "2"         ]     },     "id": 1 } ```

en-us	#### Renaming a host group  Rename a host group to "Linux hosts."  Request:  ```json {     "jsonrpc": "2.0",     "method": "hostgroup.update",     "params": {         "groupid": "7",         "name": "Linux hosts"     },     "auth": "700ca65537074ec963db7efabda78259",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "groupids": [             "7"         ]     },     "id": 1 } ```
zh-cn	#### 重命名主机组  将主机组重命名为“Linux hosts”。  请求:  ```json {     "jsonrpc": "2.0",     "method": "hostgroup.update",     "params": {         "groupid": "7",         "name": "Linux hosts"     },     "auth": "700ca65537074ec963db7efabda78259",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "groupids": [             "7"         ]     },     "id": 1 } ```

en-us	#### Renaming a template dashboard  Rename a template dashboard to "Performance graphs".  Request:  ```json {     "jsonrpc": "2.0",     "method": "templatedashboard.update",     "params": {         "dashboardid": "23",         "name": "Performance graphs"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "dashboardids": [             "23"         ]     },     "id": 1 } ```
zh-cn	#### 重命名一个模板仪表盘  将一个模板仪表盘重命名为"Performance graphs"。  请求：  ```json {     "jsonrpc": "2.0",     "method": "templatedashboard.update",     "params": {         "dashboardid": "23",         "name": "Performance graphs"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": {         "dashboardids": [             "23"         ]     },     "id": 1 } ```

en-us	#### Renaming a template  Rename the template to "Template OS Linux".  Request:  ```json {     "jsonrpc": "2.0",     "method": "template.update",     "params": {         "templateid": "10086",         "name": "Template OS Linux"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "templateids": [             "10086"         ]     },     "id": 1 } ```
zh-cn	#### 重命名一个模版  将模板重命名为“template OS Linux”。  请求：  ```json {     "jsonrpc": "2.0",     "method": "template.update",     "params": {         "templateid": "10086",         "name": "Template OS Linux"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": {         "templateids": [             "10086"         ]     },     "id": 1 } ```

en-us	#### Renaming a user  Rename a user to John Doe.  Request:  ```json {     "jsonrpc": "2.0",     "method": "user.update",     "params": {         "userid": "1",         "name": "John",         "surname": "Doe"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "userids": [             "1"         ]     },     "id": 1 } ```
zh-cn	#### 重命名用户  把用户重命名为 John Doe.  请求:  ```json {     "jsonrpc": "2.0",     "method": "user.update",     "params": {         "userid": "1",         "name": "John",         "surname": "Doe"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  返回:  ```json {     "jsonrpc": "2.0",     "result": {         "userids": [             "1"         ]     },     "id": 1 } ```

en-us	#### Replace conditions, but keep the evaluation method  Request:  ```json {     "jsonrpc": "2.0",     "method": "correlation.update",     "params": {         "correlationid": "1",         "filter": {             "conditions": [                 {                     "type": 3,                     "oldtag": "error",                     "newtag": "ok"                 }             ]         }     },     "auth": "343baad4f88b4106b9b5961e77437688",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "correlationids": [             "1"         ]     },     "id": 1 } ```
zh-cn	#### 替换条件，但是评估方法不变  请求:  ```json {     "jsonrpc": "2.0",     "method": "correlation.update",     "params": {         "correlationid": "1",         "filter": {             "conditions": [                 {                     "type": 3,                     "oldtag": "error",                     "newtag": "ok"                 }             ]         }     },     "auth": "343baad4f88b4106b9b5961e77437688",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "correlationids": [             "1"         ]     },     "id": 1 } ```

en-us	#### Replacing host groups  Unlink and clear template "10091" from the given templates.  Request:  ```json {     "jsonrpc": "2.0",     "method": "template.massupdate",     "params": {         "templates": [             {                 "templateid": "10085"             },             {                 "templateid": "10086"             }         ],         "templates_clear": [             {                 "templateid": "10091"             }         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "templateids": [             "10085",             "10086"         ]     },     "id": 1 } ```
zh-cn	#### 替换主机群组  从给定模板中取消链接并清除模板“10091”。  请求：  ```json {     "jsonrpc": "2.0",     "method": "template.massupdate",     "params": {         "templates": [             {                 "templateid": "10085"             },             {                 "templateid": "10086"             }         ],         "templates_clear": [             {                 "templateid": "10091"             }         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": {         "templateids": [             "10085",             "10086"         ]     },     "id": 1 } ```

en-us	#### Replacing host interfaces  Replace all host interfaces with a single agent interface.  Request:  ```json {     "jsonrpc": "2.0",     "method": "hostinterface.replacehostinterfaces",     "params": {         "hostid": "30052",         "interfaces": {             "dns": "",             "ip": "127.0.0.1",             "main": 1,             "port": "10050",             "type": 1,             "useip": 1         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "interfaceids": [             "30081"         ]     },     "id": 1 } ```
zh-cn	#### 替换主机接口  用单个代理接口替换所有主机接口。  请求:  ```json {     "jsonrpc": "2.0",     "method": "hostinterface.replacehostinterfaces",     "params": {         "hostid": "30052",         "interfaces": {             "dns": "",             "ip": "127.0.0.1",             "main": 1,             "port": "10050",             "type": 1,             "useip": 1         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "interfaceids": [             "30081"         ]     },     "id": 1 } ```

en-us	#### Replacing hosts and templates in a host group  Replace all hosts in a host group to ones mentioned host and unlink all templates from host group.  Request:  ```json {     "jsonrpc": "2.0",     "method": "hostgroup.massupdate",     "params": {         "groups": [             {                 "groupid": "6"             }         ],         "hosts": [             {                 "hostid": "30050"             }         ],         "templates": []     },     "auth": "f223adf833b2bf2ff38574a67bba6372",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "groupids": [             "6",         ]     },     "id": 1 } ```
zh-cn	#### 替换主机组中的主机  将主机组中的所有主机替换为hostid为30050的主机，并解除主机组中所有模板的链接。  请求:  ```json {     "jsonrpc": "2.0",     "method": "hostgroup.massupdate",     "params": {         "groups": [             {                 "groupid": "6"             }         ],         "hosts": [             {                 "hostid": "30050"             }         ],         "templates": []     },     "auth": "f223adf833b2bf2ff38574a67bba6372",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "groupids": [             "6",         ]     },     "id": 1 } ```

en-us	#### Replacing trigger prototype tags  Replace tags for one trigger prototype.  Request:  ```json {     "jsonrpc": "2.0",     "method": "triggerprototype.update",     "params": {         "triggerid": "17373",         "tags": [             {                 "tag": "volume",                 "value": "{#FSNAME}"             },             {                 "tag": "type",                 "value": "{#FSTYPE}"             }         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "triggerids": [             "17373"         ]     },     "id": 1 } ```
zh-cn	#### 替换触发器原型标签  为触发器原型替换标签.  请求:  ```json {     "jsonrpc": "2.0",     "method": "triggerprototype.update",     "params": {         "triggerid": "17373",         "tags": [             {                 "tag": "volume",                 "value": "{#FSNAME}"             },             {                 "tag": "type",                 "value": "{#FSTYPE}"             }         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "triggerids": [             "17373"         ]     },     "id": 1 } ```

en-us	#### Replacing triggers tags  Replace tags for trigger.  Request:  ```json {     "jsonrpc": "2.0",     "method": "trigger.update",     "params": {         "triggerid": "13938",         "tags": [             {                 "tag": "service",                 "value": "{{ITEM.VALUE}.regsub(\"Service (.*) has stopped\", \"\\1\")}"             },             {                 "tag": "error",                 "value": ""             }         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "triggerids": [             "13938"         ]     },     "id": 1 } ```
zh-cn	#### 替换触发器标签  为触发器替换标签.  请求:  ```json {     "jsonrpc": "2.0",     "method": "trigger.update",     "params": {         "triggerid": "13938",         "tags": [             {                 "tag": "service",                 "value": "{{ITEM.VALUE}.regsub(\"Service (.*) has stopped\", \"\\1\")}"             },             {                 "tag": "error",                 "value": ""             }         ]     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "triggerids": [             "13938"         ]     },     "id": 1 } ```

en-us	# report.create
zh-cn	# 报告.创建

en-us	# report.delete
zh-cn	# 报告.删除

en-us	# report.get
zh-cn	# 报告.获取

en-us	 ### Reporting file systems with zero inodes  `vfs.fs.get` agent items are now capable of reporting file systems with the inode count equal to zero, which can be the case for file systems with dynamic inodes (e.g. btrfs).  Additionally `vfs.fs.inode` items now will not become unsupported in such cases with mode set to 'pfree' or 'pused'. Instead the pfree/pused values for such file systems will be reported as "100" and "0" respectively.
zh-cn	### 报告零索引节点的文件系统  `vfs.fs.get` agent监控项现在能够报告 inode 计数为零的文件系统，对于具有动态 inode 的文件系统（例如 btrfs）可能就是这种情况。  此外，在模式设置为“pfree”或“pused”的情况下，“vfs.fs.inode”监控项现在不会变得不受支持。 相反，此类文件系统的 pfree/pused 值将分别报告为“100”和“0”。

en-us	# > Report object  The following objects are directly related to the `report` API.
zh-cn	# > 目标：报告  接下来介绍有关`report（报告）` API 的相关内容。

en-us	 ### Report  The filter allows to select the report based on the SLA name as well as the  service name. It is also possible to limit the displayed period.  ![](../../../../../assets/en/manual/web_interface/sla_report.png){width="600"}  Each column (period) displays the SLI for that period. SLIs that are in breach of the set  SLO are highlighted in red.  20 periods are displayed in the report. A maximum of 100 periods can be displayed, if  both the *From* date and *To* date are specified. 
zh-cn	### 报告  可以根据SLA名称和服务名称筛选报告。也可以根据时间段来显示。  ![](../../../../../assets/en/manual/web_interface/sla_report.png){width="600"}  每列（周期）显示该期间的SLI。违反SLO的SLIs将以红色突出显示。  报表中显示20个周期。输入*From*日期和*To*日期，最多显示100个周期。

en-us	### Report  The report object has the following properties:  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |reportid|string|*(readonly)* ID of the report.| |**userid**<br>(required)|string|ID of the user who created the report.| |**name**<br>(required)|string|Unique name of the report.| |**dashboardid**<br>(required)|string|ID of the dashboard that the report is based on.| |period|integer|Period for which the report will be prepared.<br><br>Possible values:<br>0 - *(default)* previous day;<br>1 - previous week;<br>2 - previous month;<br>3 - previous year.| |cycle|integer|Period repeating schedule.<br><br>Possible values:<br>0 - *(default)* daily;<br>1 - weekly;<br>2 - monthly;<br>3 - yearly.| |start\_time|integer|Time of the day, in seconds, when the report will be prepared for sending.<br><br>Default: 0.| |weekdays|integer|Days of the week for sending the report.<br><br>Required for weekly reports only.<br><br>Days of the week are stored in binary form with each bit representing the corresponding week day. For example, 12 equals 1100 in binary and means that reports will be sent every Wednesday and Thursday.<br><br>Default: 0.| |active\_since|string|On which date to start.<br><br>Possible values:<br>empty string - *(default)* not specified (stored as 0);<br>specific date in YYYY-MM-DD format (stored as a timestamp of the beginning of a day (00:00:00)).| |active\_till|string|On which date to end.<br><br>Possible values:<br>empty string - *(default)* not specified (stored as 0);<br>specific date in YYYY-MM-DD format (stored as a timestamp of the end of a day (23:59:59)).| |subject|string|Report message subject.| |message|string|Report message text.| |status|integer|Whether the report is enabled or disabled.<br><br>Possible values:<br>0 - Disabled;<br>1 - *(default)* Enabled.| |description|text|Description of the report.| |state|integer|*(readonly)* State of the report.<br><br>Possible values:<br>0 - *(default)* report was not yet processed;<br>1 - report was generated and successfully sent to all recipients;<br>2 - report generating failed; "info" contains error information;<br>3 - report was generated, but sending to some (or all) recipients failed; "info" contains error information.| |lastsent|timestamp|*(readonly)* Unix timestamp of the last successfully sent report.| |info|string|*(readonly)* Error description or additional information.|  Note that for some methods (update, delete) the required/optional parameter combination is different.
zh-cn	### 报告  报告对象具有以下属性:  |属性|[类型](/manual/api/reference_commentary#data_types)|说明| |--------|---------------------------------------------------|-----------| |reportid|字符串|*(_只读)_* 报告的ID号。| |**userid**<br>(必需)|字符串|创建该报告的用户ID号。| |**name**<br>(必需)|字符串|报告的唯一名称。| |**dashboardid**<br>(必需)|字符串|产生报告的仪表盘ID号。| |period|整数|报告所要准备的时间区间。<br><br>可选值：<br>0 - *(缺省值)* 前一天；<br>1 - 前一周；<br>2 - 前一月；<br>3 - 前一年。| |cycle|整数|报告重复发送的周期。<br><br>可选值：<br>0 - *(_缺省值)_)* 以“天”为单位;<br>1 - 以“周”为单位；<br>2 - 以“月”为单位；<br>3 - 以“年”为单位。| |start\_time|整数|以“秒”为单位的一天中的精确时间，该时间设定为报告何时发送。<br><br>缺省值： 0。| |weekdays|整数|确认一周中有哪几天发送报告。<br><br>只有当配置为周报形式下才会需要配置该参数。<br><br>一周中的周几发送数据是以二进制的形式进行存储的。二进制下，每一位都代表着对应的天数。例如，十进制数字12转换为二进制为1100，这意味着每周的周三和周四将发送报告。<br><br>缺省值： 0。| |active\_since|字符串|报告的起始日期。<br><br>可选值：<br>无输入 - *(缺省值)* 对该参数不做配置(存储为0)；<br>设定日期格式为YYYY-MM-DD(以每天凌晨（00:00:00)为基准，存储一个时间戳)。| |active\_till|字符串|报告的终了时间。<br><br>可选值：<br>无输入 - *(缺省值)* 对该参数不做配置(存储为0)；<br>设定日期格式为YYYY-MM-DD(以每天凌晨(23:59:59)为基准，存储一个时间戳)。| |subject|字符串|报告消息主题。| |message|字符串|报告消息内容。| |status|整数|该参数用来表示报告状态为启动还是关闭。<br><br>可选值：<br>0 - 关闭;<br>1 - *(缺省值)* 启动。| |description|文本|报告的文字描述。| |state|整数|*(只读)* 报告的状态。<br><br>可选值：<br>0 - *(缺省值)* 报告还未处理；<br>1 - 报告已生成且发送至所有目标；<br>2 - 报告生成失败；"info" 中包含有关发生错误的信息；<br>3 - 报告生成成功，但是未能发送至某些（或全部）目标；"info" 中包含有关发生错误的信息。| |lastsent|timestamp|*(只读)* 在Unix系统下，最后成功发送报告的时间戳。| |info|字符串|*(只读)* 有关错误的详细说明或者其他附加信息。| 注意，对于某些方法（更新、删除），必需/可选参数组合是不同的。

en-us	# Report  This class is designed to work with scheduled reports.  Object references:\  -   [Report](/manual/api/reference/report/object#report) -   [Users](/manual/api/reference/report/object#users) -   [User groups](/manual/api/reference/report/object#user_groups)  Available methods:\  -   [report.create](/manual/api/reference/report/create) - create new     scheduled reports -   [report.delete](/manual/api/reference/report/delete) - delete     scheduled reports -   [report.get](/manual/api/reference/report/get) - retrieve scheduled     reports -   [report.update](/manual/api/reference/report/update) - update     scheduled reports
zh-cn	# 报告  本章节介绍如何使用规划报告功能。 有关报告可参考的信息：\  -   [报告](zh/manual/api/reference/report/object#report) -   [用户](zh/manual/api/reference/report/object#users) -   [用户组](zh/manual/api/reference/report/object#user_groups)  用户可使用的功能：\  -   [report.create](zh/manual/api/reference/report/create) - 创建新的规划报告 -   [report.delete](/manual/api/reference/report/delete) - 删除已存在的规划报告 -   [report.get](/manual/api/reference/report/get) - 检索规划报告数据 -   [report.update](/manual/api/reference/report/update) - 更新规划报告数据

en-us	# report.update
zh-cn	# 报告.更新

en-us	##### - Repositories  Official Zabbix [repository](/manual/installation/install_from_packages/rhel) has been added to */etc/yum.repos.d*:      [zabbix]     name=Zabbix Official Repository - $basearch     baseurl=http://repo.zabbix.com/zabbix/6.0/rhel/8/$basearch/     enabled=1     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
zh-cn	##### - 仓库  官方的 Zabbix [仓库](/manual/installation/install_from_packages/rhel) 已经被添加到 */etc/yum.repos.d*：      [zabbix]     name=Zabbix Official Repository - $basearch     baseurl=http://repo.zabbix.com/zabbix/6.0/rhel/8/$basearch/     enabled=1     gpgcheck=1     gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

en-us	Request:  ```json {     "jsonrpc": "2.0",     "method": "sla.create",     "params": [         {             "name": "Database Uptime",             "slo": "99.9995",             "period": "1",             "timezone": "America/Toronto",             "description": "Provide excellent uptime for main database engines.",             "effective_date": 1672444800,             "status": 1,             "schedule": [                 {                     "period_from": 0,                     "period_to": 601200                 }             ],             "service_tags": [                 {                     "tag": "Database",                     "operator": "0",                     "value": "MySQL"                 },                 {                     "tag": "Database",                     "operator": "0",                     "value": "PostgreSQL"                 }             ],             "excluded_downtimes": [                 {                     "name": "Software version upgrade rollout",                     "period_from": "1648760400",                     "period_to": "1648764900"                 }             ]         }     ],     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "slaids": [             "5"         ]     },     "id": 1 } ```
zh-cn	请求:  ```json {     "jsonrpc": "2.0",     "method": "sla.create",     "params": [         {             "name": "Database Uptime",             "slo": "99.9995",             "period": "1",             "timezone": "America/Toronto",             "description": "Provide excellent uptime for main database engines.",             "effective_date": 1672444800,             "status": 1,             "schedule": [                 {                     "period_from": 0,                     "period_to": 601200                 }             ],             "service_tags": [                 {                     "tag": "Database",                     "operator": "0",                     "value": "MySQL"                 },                 {                     "tag": "Database",                     "operator": "0",                     "value": "PostgreSQL"                 }             ],             "excluded_downtimes": [                 {                     "name": "Software version upgrade rollout",                     "period_from": "1648760400",                     "period_to": "1648764900"                 }             ]         }     ],     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "slaids": [             "5"         ]     },     "id": 1 } ```

en-us	### Required mode
zh-cn	### 所需模式

en-us	### Required mode
zh-cn	### 所需模式

en-us	#### Required software  Zabbix is built around modern web servers, leading database engines, and PHP scripting language.
zh-cn	#### 软件  Zabbix是围绕现代Web服务器，领先的数据库引擎和PHP脚本语言构建的。

en-us	##### Requirements  The following is required to set up encryption:  -   Developer-supported operating system with OpenSSL >=1.1.X or     alternative.  ::: noteclassic  It is recommended to avoid OS in the end-of-life status, especially in the case of new installations  :::  -   Database engine (RDBMS) installed and maintained from the official     repository provided by developer. Operating systems often shipped     with outdated  database software versions for which encryption     support is not implemented, for example RHEL 7 based systems and     PostgreSQL 9.2, MariaDB 5.5 without encryption support. 
zh-cn	##### 要求  设置加密需要以下内容:  -   需要具有 OpenSSL 1.1.X 及以上版本的操作系统或其他替代方案。  ::: noteclassic 不建议使用不再更新维护的操作系统，尤其是在新安装的情况下。 ::: 数据库引擎(RDBMS)的安装及维护由官方存储库的开发人员提供。操作系统通常自带的数据库版本较老，没有实现加密支持，例如基于RHEL 7 及 PostgreSQL 9.2、MariaDB 5.5 均没有加密支持。

en-us	### Reserved ID value "0"  Reserved ID value "0" can be used to filter elements and to remove referenced objects. For example, to remove a referenced proxy from a host, proxy\_hostid should be set to 0 ("proxy\_hostid": "0") or to filter hosts monitored by server option proxyids should be set to 0 ("proxyids": "0").
zh-cn	 ### 预留ID值“0”  预留ID值“0”，可以用来过滤元素和删除引用的对象。例如，从主机中删除一个引用的代理，proxy_hostid 应该设置为 0 ("proxy_hostid": "0")， 或者要过滤被zabbix server监控的主机，proxyids 选项应该被设置为 0 ("proxyids": "0")。

en-us	#### Resize a map  Change the size of the map to 1200x1200 pixels.  Request:  ```json {     "jsonrpc": "2.0",     "method": "map.update",     "params": {         "sysmapid": "8",         "width": 1200,         "height": 1200     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "sysmapids": [             "8"         ]     },     "id": 1 } ```
zh-cn	#### 调整拓扑大小  将拓扑大小更改为 1200x1200 像素.  请求:  ```json {     "jsonrpc": "2.0",     "method": "map.update",     "params": {         "sysmapid": "8",         "width": 1200,         "height": 1200     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "sysmapids": [             "8"         ]     },     "id": 1 } ```

en-us	##### Result processing for Prometheus pattern  A Prometheus pattern step in the preprocessing can produce a result where multiple  lines are matched. To handle this situation, a new result processing [parameter](/manual/config/items/itemtypes/prometheus)  has been added to the Prometheus pattern preprocessing step that allows to aggregate  the data of potentially multiple matching lines by introducing functions such as  sum, min, max, avg, and count.
zh-cn	##### Prometheus 模式的结果处理  预处理中的 Prometheus 模式步骤会产生匹配多行的结果。为了处理这种情况，Prometheus 模式预处理步骤中添加了一个新的结果处理 [参数](/manual/config/items/itemtypes/prometheus) ，该参数允许通过引入 sum、min、max、avg 和 count 等函数来聚合潜在的多个匹配行的数据。

en-us	#### Retrieve alerts by action ID  Retrieve all alerts generated by action "3".  Request:  ```json {     "jsonrpc": "2.0",     "method": "alert.get",     "params": {         "output": "extend",         "actionids": "3"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "alertid": "1",             "actionid": "3",             "eventid": "21243",             "userid": "1",             "clock": "1362128008",             "mediatypeid": "1",             "sendto": "support@company.com",             "subject": "PROBLEM: Zabbix agent on Linux server is unreachable for 5 minutes: ",             "message": "Trigger: Zabbix agent on Linux server is unreachable for 5 minutes: \nTrigger status: PROBLEM\nTrigger severity: Not classified",             "status": "0",             "retries": "3",             "error": "",             "esc_step": "1",             "alerttype": "0",             "p_eventid": "0",             "acknowledgeid": "0"         }     ],     "id": 1 } ```
zh-cn	#### 通过动作 ID 检索告警  返回所有动作 ID 为"3"的告警。  请求：  ```json {     "jsonrpc": "2.0",     "method": "alert.get",     "params": {         "output": "extend",         "actionids": "3"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "alertid": "1",             "actionid": "3",             "eventid": "21243",             "userid": "1",             "clock": "1362128008",             "mediatypeid": "1",             "sendto": "support@company.com",             "subject": "PROBLEM: Zabbix agent on Linux server is unreachable for 5 minutes: ",             "message": "Trigger: Zabbix agent on Linux server is unreachable for 5 minutes: \nTrigger status: PROBLEM\nTrigger severity: Not classified",             "status": "0",             "retries": "3",             "error": "",             "esc_step": "1",             "alerttype": "0",             "p_eventid": "0",             "acknowledgeid": "0"         }     ],     "id": 1 } ```

en-us	#### Retrieve all discovery rules  Retrieve all configured discovery rules and the discovery checks they use.  Request:  ```json {     "jsonrpc": "2.0",     "method": "drule.get",     "params": {         "output": "extend",         "selectDChecks": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "druleid": "2",             "proxy_hostid": "0",             "name": "Local network",             "iprange": "192.168.3.1-255",             "delay": "5s",             "nextcheck": "1348754327",             "status": "0",             "dchecks": [                 {                     "dcheckid": "7",                     "druleid": "2",                     "type": "3",                     "key_": "",                     "snmp_community": "",                     "ports": "21",                     "snmpv3_securityname": "",                     "snmpv3_securitylevel": "0",                     "snmpv3_authpassphrase": "",                     "snmpv3_privpassphrase": "",                     "uniq": "0",                     "snmpv3_authprotocol": "0",                     "snmpv3_privprotocol": "0",                     "host_source": "1",                     "name_source": "0"                                      },                 {                     "dcheckid": "8",                     "druleid": "2",                     "type": "4",                     "key_": "",                     "snmp_community": "",                     "ports": "80",                     "snmpv3_securityname": "",                     "snmpv3_securitylevel": "0",                     "snmpv3_authpassphrase": "",                     "snmpv3_privpassphrase": "",                     "uniq": "0",                     "snmpv3_authprotocol": "0",                     "snmpv3_privprotocol": "0",                     "host_source": "1",                     "name_source": "0"                                     }             ]         },         {             "druleid": "6",             "proxy_hostid": "0",             "name": "Zabbix agent discovery",             "iprange": "192.168.1.1-255",             "delay": "1h",             "nextcheck": "0",             "status": "0",             "dchecks": [                 {                     "dcheckid": "10",                     "druleid": "6",                     "type": "9",                     "key_": "system.uname",                     "snmp_community": "",                     "ports": "10050",                     "snmpv3_securityname": "",                     "snmpv3_securitylevel": "0",                     "snmpv3_authpassphrase": "",                     "snmpv3_privpassphrase": "",                     "uniq": "0",                     "snmpv3_authprotocol": "0",                     "snmpv3_privprotocol": "0",                     "host_source": "2",                     "name_source": "3"                                     }             ]         }     ],     "id": 1 } ```
zh-cn	#### 检索所有发现规则  检索所有配置的发现规则及其使用的发现检查。  请求：  ```json {     "jsonrpc": "2.0",     "method": "drule.get",     "params": {         "output": "extend",         "selectDChecks": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "druleid": "2",             "proxy_hostid": "0",             "name": "Local network",             "iprange": "192.168.3.1-255",             "delay": "5s",             "nextcheck": "1348754327",             "status": "0",             "dchecks": [                 {                     "dcheckid": "7",                     "druleid": "2",                     "type": "3",                     "key_": "",                     "snmp_community": "",                     "ports": "21",                     "snmpv3_securityname": "",                     "snmpv3_securitylevel": "0",                     "snmpv3_authpassphrase": "",                     "snmpv3_privpassphrase": "",                     "uniq": "0",                     "snmpv3_authprotocol": "0",                     "snmpv3_privprotocol": "0",                     "host_source": "1",                     "name_source": "0"                                      },                 {                     "dcheckid": "8",                     "druleid": "2",                     "type": "4",                     "key_": "",                     "snmp_community": "",                     "ports": "80",                     "snmpv3_securityname": "",                     "snmpv3_securitylevel": "0",                     "snmpv3_authpassphrase": "",                     "snmpv3_privpassphrase": "",                     "uniq": "0",                     "snmpv3_authprotocol": "0",                     "snmpv3_privprotocol": "0",                     "host_source": "1",                     "name_source": "0"                                     }             ]         },         {             "druleid": "6",             "proxy_hostid": "0",             "name": "Zabbix agent discovery",             "iprange": "192.168.1.1-255",             "delay": "1h",             "nextcheck": "0",             "status": "0",             "dchecks": [                 {                     "dcheckid": "10",                     "druleid": "6",                     "type": "9",                     "key_": "system.uname",                     "snmp_community": "",                     "ports": "10050",                     "snmpv3_securityname": "",                     "snmpv3_securitylevel": "0",                     "snmpv3_authpassphrase": "",                     "snmpv3_privpassphrase": "",                     "uniq": "0",                     "snmpv3_authprotocol": "0",                     "snmpv3_privprotocol": "0",                     "host_source": "2",                     "name_source": "3"                                     }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieve all proxies  Retrieve all configured proxies and their interfaces.  Request:  ```json {     "jsonrpc": "2.0",     "method": "proxy.get",     "params": {         "output": "extend",         "selectInterface": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "host": "Active proxy",             "status": "5",             "lastaccess": "0",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": "",             "proxy_address": "",             "auto_compress": "0",             "proxyid": "30091",             "interface": []         },         {             "host": "Passive proxy",             "status": "6",             "lastaccess": "0",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": "",             "proxy_address": "",             "auto_compress": "0",             "proxyid": "30092",             "interface": {                 "interfaceid": "30109",                 "hostid": "30092",                 "useip": "1",                 "ip": "127.0.0.1",                 "dns": "",                 "port": "10051"             ]         }     ],     "id": 1 } ```
zh-cn	#### 检索所有proxy  检索所有已配置的proxy及其接口。  请求：  ```json {     "jsonrpc": "2.0",     "method": "proxy.get",     "params": {         "output": "extend",         "selectInterface": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "host": "Active proxy",             "status": "5",             "lastaccess": "0",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": "",             "proxy_address": "",             "auto_compress": "0",             "proxyid": "30091",             "interface": []         },         {             "host": "Passive proxy",             "status": "6",             "lastaccess": "0",             "description": "",             "tls_connect": "1",             "tls_accept": "1",             "tls_issuer": "",             "tls_subject": "",             "proxy_address": "",             "auto_compress": "0",             "proxyid": "30092",             "interface": {                 "interfaceid": "30109",                 "hostid": "30092",                 "useip": "1",                 "ip": "127.0.0.1",                 "dns": "",                 "port": "10051"             ]         }     ],     "id": 1 } ```

en-us	#### Retrieve all scripts  Retrieve all configured scripts.  Request:  ```json {     "jsonrpc": "2.0",     "method": "script.get",     "params": {         "output": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [             {             "scriptid": "1",             "name": "Ping",             "command": "/bin/ping -c 3 {HOST.CONN} 2>&1",             "host_access": "2",             "usrgrpid": "0",             "groupid": "0",             "description": "",             "confirmation": "",             "type": "0",             "execute_on": "1",             "timeout": "30s",             "parameters": []         },         {             "scriptid": "2",             "name": "Traceroute",             "command": "/usr/bin/traceroute {HOST.CONN} 2>&1",             "host_access": "2",             "usrgrpid": "0",             "groupid": "0",             "description": "",             "confirmation": "",             "type": "0",             "execute_on": "1",             "timeout": "30s",             "parameters": []         },         {             "scriptid": "3",             "name": "Detect operating system",             "command": "sudo /usr/bin/nmap -O {HOST.CONN} 2>&1",             "host_access": "2",             "usrgrpid": "7",             "groupid": "0",             "description": "",             "confirmation": "",             "type": "0",             "execute_on": "1",             "timeout": "30s",             "parameters": []         },         {             "scriptid": "4",             "name": "Webhook",             "command": "try {\n var request = new HttpRequest(),\n response,\n data;\n\n request.addHeader('Content-Type: application/json');\n\n response = request.post('https://localhost/post', value);\n\n try {\n response = JSON.parse(response);\n }\n catch (error) {\n response = null;\n }\n\n if (request.getStatus() !== 200 || !('data' in response)) {\n throw 'Unexpected response.';\n }\n\n data = JSON.stringify(response.data);\n\n Zabbix.Log(3, '[Webhook Script] response data: ' + data);\n\n return data;\n}\ncatch (error) {\n Zabbix.Log(3, '[Webhook Script] script execution failed: ' + error);\n throw 'Execution failed: ' + error + '.';\n}",             "host_access": "2",             "usrgrpid": "7",             "groupid": "0",             "description": "",             "confirmation": "",             "type": "5",             "execute_on": "1",             "timeout": "30s",             "parameters": [                 {                     "name": "token",                     "value": "{$WEBHOOK.TOKEN}"                 },                 {                     "name": "host",                     "value": "{HOST.HOST}"                 },                 {                     "name": "v",                     "value": "2.2"                 }             ]         }     ],     "id": 1 } ```
zh-cn	#### 检索所有脚本  检索所有配置的脚本。  请求：  ```json {     "jsonrpc": "2.0",     "method": "script.get",     "params": {         "output": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [             {             "scriptid": "1",             "name": "Ping",             "command": "/bin/ping -c 3 {HOST.CONN} 2>&1",             "host_access": "2",             "usrgrpid": "0",             "groupid": "0",             "description": "",             "confirmation": "",             "type": "0",             "execute_on": "1",             "timeout": "30s",             "parameters": []         },         {             "scriptid": "2",             "name": "Traceroute",             "command": "/usr/bin/traceroute {HOST.CONN} 2>&1",             "host_access": "2",             "usrgrpid": "0",             "groupid": "0",             "description": "",             "confirmation": "",             "type": "0",             "execute_on": "1",             "timeout": "30s",             "parameters": []         },         {             "scriptid": "3",             "name": "Detect operating system",             "command": "sudo /usr/bin/nmap -O {HOST.CONN} 2>&1",             "host_access": "2",             "usrgrpid": "7",             "groupid": "0",             "description": "",             "confirmation": "",             "type": "0",             "execute_on": "1",             "timeout": "30s",             "parameters": []         },         {             "scriptid": "4",             "name": "Webhook",             "command": "try {\n var request = new HttpRequest(),\n response,\n data;\n\n request.addHeader('Content-Type: application/json');\n\n response = request.post('https://localhost/post', value);\n\n try {\n response = JSON.parse(response);\n }\n catch (error) {\n response = null;\n }\n\n if (request.getStatus() !== 200 || !('data' in response)) {\n throw 'Unexpected response.';\n }\n\n data = JSON.stringify(response.data);\n\n Zabbix.Log(3, '[Webhook Script] response data: ' + data);\n\n return data;\n}\ncatch (error) {\n Zabbix.Log(3, '[Webhook Script] script execution failed: ' + error);\n throw 'Execution failed: ' + error + '.';\n}",             "host_access": "2",             "usrgrpid": "7",             "groupid": "0",             "description": "",             "confirmation": "",             "type": "5",             "execute_on": "1",             "timeout": "30s",             "parameters": [                 {                     "name": "token",                     "value": "{$WEBHOOK.TOKEN}"                 },                 {                     "name": "host",                     "value": "{HOST.HOST}"                 },                 {                     "name": "v",                     "value": "2.2"                 }             ]         }     ],     "id": 1 } ```

en-us	#### Retrieve a map  Retrieve all data about map "3".  Request:  ```json {     "jsonrpc": "2.0",     "method": "map.get",     "params": {         "output": "extend",         "selectSelements": "extend",         "selectLinks": "extend",         "selectUsers": "extend",         "selectUserGroups": "extend",         "selectShapes": "extend",         "selectLines": "extend",         "sysmapids": "3"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "selements": [                 {                     "selementid": "10",                     "sysmapid": "3",                     "elementtype": "4",                     "evaltype": "0",                     "iconid_off": "1",                     "iconid_on": "0",                     "label": "Zabbix server",                     "label_location": "3",                     "x": "11",                     "y": "141",                     "iconid_disabled": "0",                     "iconid_maintenance": "0",                     "elementsubtype": "0",                     "areatype": "0",                     "width": "200",                     "height": "200",                     "tags": [                         {                             "tag": "service",                             "value": "mysqld",                             "operator": "0"                         }                     ],                     "viewtype": "0",                     "use_iconmap": "1",                     "urls": [],                     "elements": []                 },                 {                     "selementid": "11",                     "sysmapid": "3",                     "elementtype": "4",                     "evaltype": "0",                     "iconid_off": "1",                     "iconid_on": "0",                     "label": "Web server",                     "label_location": "3",                     "x": "211",                     "y": "191",                     "iconid_disabled": "0",                     "iconid_maintenance": "0",                     "elementsubtype": "0",                     "areatype": "0",                     "width": "200",                     "height": "200",                     "viewtype": "0",                     "use_iconmap": "1",                     "tags": [],                     "urls": [],                     "elements": []                 },                 {                     "selementid": "12",                     "sysmapid": "3",                     "elementtype": "0",                     "evaltype": "0",                     "iconid_off": "185",                     "iconid_on": "0",                     "label": "{HOST.NAME}\r\n{HOST.CONN}",                     "label_location": "0",                     "x": "111",                     "y": "61",                     "iconid_disabled": "0",                     "iconid_maintenance": "0",                     "elementsubtype": "0",                     "areatype": "0",                     "width": "200",                     "height": "200",                     "viewtype": "0",                     "use_iconmap": "0",                     "tags": [],                     "urls": [],                     "elements": [                         {                             "hostid": "10084"                         }                     ]                 }             ],             "links": [                 {                     "linkid": "23",                     "sysmapid": "3",                     "selementid1": "10",                     "selementid2": "11",                     "drawtype": "0",                     "color": "00CC00",                     "label": "",                     "linktriggers": []                 }             ],             "users": [                 {                     "sysmapuserid": "1",                     "userid": "2",                     "permission": "2"                 }             ],             "userGroups": [                 {                     "sysmapusrgrpid": "1",                     "usrgrpid": "7",                     "permission": "2"                 }             ],             "shapes":[                   {                       "sysmap_shapeid":"1",                     "type":"0",                     "x":"0",                     "y":"0",                     "width":"680",                     "height":"15",                     "text":"{MAP.NAME}",                     "font":"9",                     "font_size":"11",                     "font_color":"000000",                     "text_halign":"0",                     "text_valign":"0",                     "border_type":"0",                     "border_width":"0",                     "border_color":"000000",                     "background_color":"",                     "zindex":"0"                 }             ],             "lines":[                 {                     "sysmap_shapeid":"2",                     "x1": 30,                     "y1": 10,                     "x2": 100,                     "y2": 50,                     "line_type": 1,                     "line_width": 10,                     "line_color": "009900",                     "zindex":"1"                 }             ],             "sysmapid": "3",             "name": "Local network",             "width": "400",             "height": "400",             "backgroundid": "0",             "label_type": "2",             "label_location": "3",             "highlight": "1",             "expandproblem": "1",             "markelements": "0",             "show_unack": "0",             "grid_size": "50",             "grid_show": "1",             "grid_align": "1",             "label_format": "0",             "label_type_host": "2",             "label_type_hostgroup": "2",             "label_type_trigger": "2",             "label_type_map": "2",             "label_type_image": "2",             "label_string_host": "",             "label_string_hostgroup": "",             "label_string_trigger": "",             "label_string_map": "",             "label_string_image": "",             "iconmapid": "0",             "expand_macros": "0",             "severity_min": "0",             "userid": "1",             "private": "1",             "show_suppressed": "1"         }     ],     "id": 1 } ```
zh-cn	#### 查询拓扑图  检索关于拓扑图"3"的所有数据  请求:  ```json {     "jsonrpc": "2.0",     "method": "map.get",     "params": {         "output": "extend",         "selectSelements": "extend",         "selectLinks": "extend",         "selectUsers": "extend",         "selectUserGroups": "extend",         "selectShapes": "extend",         "selectLines": "extend",         "sysmapids": "3"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         {             "selements": [                 {                     "selementid": "10",                     "sysmapid": "3",                     "elementtype": "4",                     "evaltype": "0",                     "iconid_off": "1",                     "iconid_on": "0",                     "label": "Zabbix server",                     "label_location": "3",                     "x": "11",                     "y": "141",                     "iconid_disabled": "0",                     "iconid_maintenance": "0",                     "elementsubtype": "0",                     "areatype": "0",                     "width": "200",                     "height": "200",                     "tags": [                         {                             "tag": "service",                             "value": "mysqld",                             "operator": "0"                         }                     ],                     "viewtype": "0",                     "use_iconmap": "1",                     "urls": [],                     "elements": []                 },                 {                     "selementid": "11",                     "sysmapid": "3",                     "elementtype": "4",                     "evaltype": "0",                     "iconid_off": "1",                     "iconid_on": "0",                     "label": "Web server",                     "label_location": "3",                     "x": "211",                     "y": "191",                     "iconid_disabled": "0",                     "iconid_maintenance": "0",                     "elementsubtype": "0",                     "areatype": "0",                     "width": "200",                     "height": "200",                     "viewtype": "0",                     "use_iconmap": "1",                     "tags": [],                     "urls": [],                     "elements": []                 },                 {                     "selementid": "12",                     "sysmapid": "3",                     "elementtype": "0",                     "evaltype": "0",                     "iconid_off": "185",                     "iconid_on": "0",                     "label": "{HOST.NAME}\r\n{HOST.CONN}",                     "label_location": "0",                     "x": "111",                     "y": "61",                     "iconid_disabled": "0",                     "iconid_maintenance": "0",                     "elementsubtype": "0",                     "areatype": "0",                     "width": "200",                     "height": "200",                     "viewtype": "0",                     "use_iconmap": "0",                     "tags": [],                     "urls": [],                     "elements": [                         {                             "hostid": "10084"                         }                     ]                 }             ],             "links": [                 {                     "linkid": "23",                     "sysmapid": "3",                     "selementid1": "10",                     "selementid2": "11",                     "drawtype": "0",                     "color": "00CC00",                     "label": "",                     "linktriggers": []                 }             ],             "users": [                 {                     "sysmapuserid": "1",                     "userid": "2",                     "permission": "2"                 }             ],             "userGroups": [                 {                     "sysmapusrgrpid": "1",                     "usrgrpid": "7",                     "permission": "2"                 }             ],             "shapes":[                   {                       "sysmap_shapeid":"1",                     "type":"0",                     "x":"0",                     "y":"0",                     "width":"680",                     "height":"15",                     "text":"{MAP.NAME}",                     "font":"9",                     "font_size":"11",                     "font_color":"000000",                     "text_halign":"0",                     "text_valign":"0",                     "border_type":"0",                     "border_width":"0",                     "border_color":"000000",                     "background_color":"",                     "zindex":"0"                 }             ],             "lines":[                 {                     "sysmap_shapeid":"2",                     "x1": 30,                     "y1": 10,                     "x2": 100,                     "y2": 50,                     "line_type": 1,                     "line_width": 10,                     "line_color": "009900",                     "zindex":"1"                 }             ],             "sysmapid": "3",             "name": "Local nerwork",             "width": "400",             "height": "400",             "backgroundid": "0",             "label_type": "2",             "label_location": "3",             "highlight": "1",             "expandproblem": "1",             "markelements": "0",             "show_unack": "0",             "grid_size": "50",             "grid_show": "1",             "grid_align": "1",             "label_format": "0",             "label_type_host": "2",             "label_type_hostgroup": "2",             "label_type_trigger": "2",             "label_type_map": "2",             "label_type_image": "2",             "label_string_host": "",             "label_string_hostgroup": "",             "label_string_trigger": "",             "label_string_map": "",             "label_string_image": "",             "iconmapid": "0",             "expand_macros": "0",             "severity_min": "0",             "userid": "1",             "private": "1",             "show_suppressed": "1"         }     ],     "id": 1 }  ```

en-us	#### Retrieve an icon map  Retrieve all data about icon map "3".  Request:  ```json {     "jsonrpc": "2.0",     "method": "iconmap.get",     "params": {         "iconmapids": "3",         "output": "extend",         "selectMappings": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "mappings": [                 {                     "iconmappingid": "3",                     "iconmapid": "3",                     "iconid": "6",                     "inventory_link": "1",                     "expression": "server",                     "sortorder": "0"                 },                 {                     "iconmappingid": "4",                     "iconmapid": "3",                     "iconid": "10",                     "inventory_link": "1",                     "expression": "switch",                     "sortorder": "1"                 }             ],             "iconmapid": "3",             "name": "Host type icons",             "default_iconid": "2"         }     ],     "id": 1 } ```
zh-cn	#### 检索图标映射  检索所有关于图标映射 "3"的数据。  请求：  ```json {     "jsonrpc": "2.0",     "method": "iconmap.get",     "params": {         "iconmapids": "3",         "output": "extend",         "selectMappings": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应  ```json {     "jsonrpc": "2.0",     "result": [         {             "mappings": [                 {                     "iconmappingid": "3",                     "iconmapid": "3",                     "iconid": "6",                     "inventory_link": "1",                     "expression": "server",                     "sortorder": "0"                 },                 {                     "iconmappingid": "4",                     "iconmapid": "3",                     "iconid": "10",                     "inventory_link": "1",                     "expression": "switch",                     "sortorder": "1"                 }             ],             "iconmapid": "3",             "name": "Host type icons",             "default_iconid": "2"         }     ],     "id": 1 } ```

en-us	#### Retrieve an image  Retrieve all data for image with ID "2".  Request:  ```json {     "jsonrpc": "2.0",     "method": "image.get",     "params": {         "output": "extend",         "select_image": true,         "imageids": "2"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "imageid": "2",             "imagetype": "1",             "name": "Cloud_(24)",             "image": "iVBORw0KGgoAAAANSUhEUgAAABgAAAANCAYAAACzbK7QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACmAAAApgBNtNH3wAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIcSURBVDjLrZLbSxRRHMdPKiEiRQ89CD0s+N5j9BIMEf4Hg/jWexD2ZEXQbC9tWUFZimtLhswuZiVujK1UJmYXW9PaCUdtb83enL3P7s6ss5f5dc7EUsmqkPuFH3M4/Ob7+V0OAgC0UyDENFEU03rh1uNOs/lFG75o2i2/rkd9Y3Tgyj3HiaezbukdH9A/rP4E9vWi0u+Y4fuGnMf3DRgYc3Z/84YrQSkD3mgKhFAC+KAEK74Y2Lj3MjPoOokQ3Xyx/1GHeXCifbfO6lRPH/wi+AvZQhGSsgKxdB5CCRkCGPbDgMXBMbukTc4vK5/WRHizsq7fZl2LFuvE4T0BZDTXHtgv4TNUqlUolsqQL2qQwbDEXzBBTIJ7I4y/cfAENmHZF4XrY9Mc+X9HAFmoyXS2ddy1IOg6/KNyBcM0DFP/wFZFCcOy4N9Mw0YkCTOfhdL5AfZQXQBFn2t/ODXHC8FYVcoWjNEQ03qqwTJ5FdI44jg/msoB2Zd5ZKq3q6evA1FUS60bYyyj3AJf3V72HiLZJQxTtRLk1C2IYEg4mTNg63hPd1mOJd7Ict911OMNlWEf0nFxpCt16zcshTuLpGSwDDuPIfv0xzNyQYVGicC0cgUUDLM6Xp02lvvW/V2EBssnxlSGmWsxljw0znV9XfPLjTCW84r+cn7Jc8c2eWrbM6Wbe6/aTJbhJ/TNkWc9/xXW592Xb9iPkKnUfH8BKdLgFy0lDyQAAAAASUVORK5CYII="         }     ],     "id": 1 } ```
zh-cn	#### 检索图像  检索 ID 为 “2” 的图像的所有数据。  请求：  ```json {     "jsonrpc": "2.0",     "method": "image.get",     "params": {         "output": "extend",         "select_image": true,         "imageids": "2"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "imageid": "2",             "imagetype": "1",             "name": "Cloud_(24)",             "image": "iVBORw0KGgoAAAANSUhEUgAAABgAAAANCAYAAACzbK7QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACmAAAApgBNtNH3wAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIcSURBVDjLrZLbSxRRHMdPKiEiRQ89CD0s+N5j9BIMEf4Hg/jWexD2ZEXQbC9tWUFZimtLhswuZiVujK1UJmYXW9PaCUdtb83enL3P7s6ss5f5dc7EUsmqkPuFH3M4/Ob7+V0OAgC0UyDENFEU03rh1uNOs/lFG75o2i2/rkd9Y3Tgyj3HiaezbukdH9A/rP4E9vWi0u+Y4fuGnMf3DRgYc3Z/84YrQSkD3mgKhFAC+KAEK74Y2Lj3MjPoOokQ3Xyx/1GHeXCifbfO6lRPH/wi+AvZQhGSsgKxdB5CCRkCGPbDgMXBMbukTc4vK5/WRHizsq7fZl2LFuvE4T0BZDTXHtgv4TNUqlUolsqQL2qQwbDEXzBBTIJ7I4y/cfAENmHZF4XrY9Mc+X9HAFmoyXS2ddy1IOg6/KNyBcM0DFP/wFZFCcOy4N9Mw0YkCTOfhdL5AfZQXQBFn2t/ODXHC8FYVcoWjNEQ03qqwTJ5FdI44jg/msoB2Zd5ZKq3q6evA1FUS60bYyyj3AJf3V72HiLZJQxTtRLk1C2IYEg4mTNg63hPd1mOJd7Ict911OMNlWEf0nFxpCt16zcshTuLpGSwDDuPIfv0xzNyQYVGicC0cgUUDLM6Xp02lvvW/V2EBssnxlSGmWsxljw0znV9XfPLjTCW84r+cn7Jc8c2eWrbM6Wbe6/aTJbhJ/TNkWc9/xXW592Xb9iPkKnUfH8BKdLgFy0lDyQAAAAASUVORK5CYII="         }     ],     "id": 1 } ```

en-us	#### Retrieve a token  Retrieve all data for the token with ID "2".  Request:  ```json {     "jsonrpc": "2.0",     "method": "token.get",     "params": {         "output": "extend",         "tokenids": "2"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "tokenid": "1",             "name": "The Token",             "description": "",             "userid": "1",             "lastaccess": "0",             "status": "0",             "expires_at": "1609406220",             "created_at": "1611239454",             "creator_userid": "1"         }     ],     "id": 1 } ```
zh-cn	#### 检索令牌  检索 ID 为“2”的令牌的所有数据。  请求：  ```json {     "jsonrpc": "2.0",     "method": "token.get",     "params": {         "output": "extend",         "tokenids": "2"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "tokenid": "1",             "name": "The Token",             "description": "",             "userid": "1",             "lastaccess": "0",             "status": "0",             "expires_at": "1609406220",             "created_at": "1611239454",             "creator_userid": "1"         }     ],     "id": 1 } ```