en-us	#### Enabling multiple hosts  Enable monitoring of two hosts, i.e., set their status to 0.  Request:  ```json {     "jsonrpc": "2.0",     "method": "host.massupdate",     "params": {         "hosts": [             {                 "hostid": "69665"             },             {                 "hostid": "69666"             }         ],         "status": 0     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "hostids": [             "69665",             "69666"         ]     },     "id": 1 } ```
zh-cn	#### 启用多个主机  启用监控两个主机，将status设置为0  请求:  ```json {     "jsonrpc": "2.0",     "method": "host.massupdate",     "params": {         "hosts": [             {                 "hostid": "69665"             },             {                 "hostid": "69666"             }         ],         "status": 0     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "hostids": [             "69665",             "69666"         ]     },     "id": 1 } ```

en-us	#### Encoding settings  To make sure that the acquired data are not corrupted you may specify the correct encoding for processing the check (e.g. 'vfs.file.contents') in the `encoding` parameter. The list of supported encodings (code page identifiers) may be found in documentation for [libiconv](http://www.gnu.org/software/libiconv/) (GNU Project) or in Microsoft Windows SDK documentation for "Code Page Identifiers".  If no encoding is specified in the `encoding` parameter the following resolution strategies are applied:  -   If encoding is not specified (or is an empty string) it is assumed to be UTF-8, the data is processed "as-is"; -   BOM analysis - applicable for items 'vfs.file.contents',     'vfs.file.regexp', 'vfs.file.regmatch'. An attempt is made to     determine the correct encoding by using the byte order mark (BOM) at     the beginning of the file. If BOM is not present - standard     resolution (see above) is applied instead.
zh-cn	#### 编码设置  要确保获取的数据不被损坏，你可能需要在 `encoding`参数中指定正确的编码来处理检查（例如 'vfs.file.contents'）。受支持的的编码（代码页标识符）可在[libiconv](http://www.gnu.org/software/libiconv/) (GNU 项目) 的文档查找，或在微软Windows SDK的文档查找"Code Page Identifiers"。  如果未在 `encoding`参数中指定编码，会应用以下解决方案策略：  -   如果encoding未指定(或者为空字符串)被认为是UTF-8，数据原样处理； -   BOM分析 - 在监控项 'vfs.file.contents',     'vfs.file.regexp', 'vfs.file.regmatch'可应用。尝试使用文件开头的字节顺序标记（BOM）来决定正确的编码。如果没有BOM - 改为应用标准解决方案（见上）。

en-us	##### Encryption  The **Encryption** tab allows you to require [encrypted](/manual/encryption) connections with the host.  |Parameter|Description| |--|--------| |*Connections to host*|How Zabbix server or proxy connects to Zabbix agent on a host: no encryption (default), using PSK (pre-shared key) or certificate.| |*Connections from host*|Select what type of connections are allowed from the host (i.e. from Zabbix agent and Zabbix sender). Several connection types can be selected at the same time (useful for testing and switching to other connection type). Default is "No encryption".| |*Issuer*|Allowed issuer of certificate. Certificate is first validated with CA (certificate authority). If it is valid, signed by the CA, then the *Issuer* field can be used to further restrict allowed CA. This field is intended to be used if your Zabbix installation uses certificates from multiple CAs. If this field is empty then any CA is accepted.| |*Subject*|Allowed subject of certificate. Certificate is first validated with CA. If it is valid, signed by the CA, then the *Subject* field can be used to allow only one value of *Subject* string. If this field is empty then any valid certificate signed by the configured CA is accepted.| |*PSK identity*|Pre-shared key identity string.<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.| |*PSK*|Pre-shared key (hex-string). Maximum length: 512 hex-digits (256-byte PSK) if Zabbix uses GnuTLS or OpenSSL library, 64 hex-digits (32-byte PSK) if Zabbix uses mbed TLS (PolarSSL) library. Example: 1f87b595725ac58dd977beef14b97461a7c1045b9a1c963065002c5473194952|
zh-cn	##### 加密   **加密** 选项卡允许建立与主机的 [加密](/manual/encryption) 连接。  |选项|描述| |---------|-----------| |*连接到主机*|Zabbix server 或 proxy 如何与 Zabbix agent 连接：不加密（默认），使用 PSK（预共享密钥）或证书。| |*从主机连接*|选择允许来自主机的连接类型（即来自 Zabbix agent 和 Zabbix sender）。可以同时选择多种连接类型（用于测试和切换到其他连接类型）。默认为“不加密”。| |*发行者*|许可的证书颁发者。证书首先通过 CA （证书颁发机构）进行验证。如果它是由 CA 签名的有效证书，则 *Issuer* 字段可用于进一步限制允许的 CA。如果 Zabbix 安装使用来自多个 CA 的证书，则使用此字段。如果此字段为空，则接受任何 CA。| |*主体*|允许的证书主体。证书首先通过 CA （证书颁发机构）进行验证。如果它是由 CA 签名的有效证书，则 *主体* 字段只能用于允许 *主体* 字符串的一个值。如果此字段为空，则接受配置的 CA 签名的任何有效证书。| |*共享密钥身份*|预共享密钥标识字符串。<br>不要将敏感信息放在此处，它会在网络上以未加密方式传输，以通知接收者使用哪个 PSK。| |*共享密钥（PSK）*|预共享密钥（十六进制字符串）。最大长度：如果 Zabbix 使用 GnuTLS 或 OpenSSL 库，则为 512 个十六进制数字（256 字节 PSK），如果 Zabbix 使用 mbed TLS（PolarSSL）库，则为 64 个十六进制数字（32 字节 PSK）。示例：1f87b595725ac58dd977beef14b97461a7c1045b9a1c963065002c5473194952。|

en-us	##### Entity count  New [functions](/manual/appendix/functions) have been added to simplify the counting of specific hosts, items, or values, returned by [foreach functions](/manual/appendix/functions/aggregate/foreach).  Aggregate functions:  -   **count** - total number of values in an array returned by a foreach     function (returns an integer); -   **item\_count** - total number of currently enabled items that match     filter criteria (returns an integer).  Foreach function:  -   **exists\_foreach** - number of currently enabled items that match     filter criteria (returns an array).
zh-cn	##### 实体计数  添加了新的 [函数](/manual/appendix/functions) 来简化由 [foreach函数](/manual/appendix/functions/aggregate/foreach) 返回的特定主机、监控项或值的计数。  聚合函数：  -   **count** - foreach 函数返回的数组中值的总数（返回一个整数）； -   **item\_count** - 当前启用的符合过滤条件的项目总数（返回一个整数）。  Foreach 函数：  -   **exists\_foreach** - 当前启用的符合过滤条件的项目数（返回一个数组）。

en-us	##### Entity count  New [functions](/manual/appendix/functions) have been added to simplify the counting of specific hosts, items, or values, returned by [foreach functions](/manual/appendix/functions/aggregate/foreach).  Aggregate functions:  -   **count** - total number of values in an array returned by a foreach     function (returns an integer); -   **item\_count** - total number of currently enabled items that match     filter criteria (returns an integer).  Foreach function:  -   **exists\_foreach** - number of currently enabled items that match     filter criteria (returns an array).  ### Anomaly detection  Zabbix 5.2 introduced new trend functions useful for baseline monitoring. However, they still require defining relative thresholds (e.g. check that web traffic in September, 2021 is less than 2x higher compared to September, 2020). There are use cases when such thresholds are hard to define. For instance, the web traffic of a new but highly popular web site can organically grow many times over a year but the growth rate is unknown. Yet, a sudden traffic spike due to DDOS attack must generate an alert regardless of organic traffic growth.  Anomaly detection algorithms do exactly this - find data that don't look normal (outliers) in a context of other values.  New [history function](/manual/appendix/functions/history) trendstl() has been added which uses 'decomposition' method to calculate the anomaly rate. It splits a single time series sequence into three other sequences:  -   trend sequence that only contains big changes in the original data (e.g. website traffic shows growth) -   season sequence that only contains seasonal changes (e.g. less website traffic in summer, more in autumn) -   remainder sequence that only contains residual values that can not be interpreted as parts of trend or season  ![](../../../assets/en/manual/introduction/stl_data.png)  Anomaly detection works with remainder sequence and checks if there are values that are too far from the majority of remainder values. "Far" means that the absolute value from the remainder sequence is N times greater than the standard or mean deviation.   
zh-cn	### Zabbix agent 2 plugins  Each Zabbix agent 2 plugin now has a separate [configuration file](/manual/appendix/config/zabbix_agent2_plugins). By default, these files are located in the `./zabbix_agent2.d/plugins.d/` directory. The path is specified in the `Include` parameter of the agent 2 configuration file and can be relative to the [zabbix\_agent2.conf](/manual/appendix/config/zabbix_agent2) or [zabbix\_agent2.win.conf](/manual/appendix/config/zabbix_agent2_win) file location.  

en-us	##### Entity uniqueness criteria  When adding entities (items, triggers, graphs etc.) from a template it is important to know what of those entities already exist on the host and need to be updated and what entities differ. The uniqueness criteria for deciding upon the sameness/difference are:  -   for items - the item key -   for triggers - trigger name and expression -   for custom graphs - graph name and its items
zh-cn	##### 实体唯一性标准  从模板中添加实体（监控项，触发器，图表等）时，重要的是要知道这些实体已经存在于主机上并需要更新，哪些实体有所不同。决定同一性/差异的唯一性标准是：  -   用于监控项 - 监控项键 -   用于触发器 - 触发器名称和表达式 -   用于自定义图形 - 图形名称及其监控项

en-us	#### Environment files  In the same directory with compose files on github.com you can find files with default environment variables for each component in compose file. These environment files are named like `.env_<type of component>`.
zh-cn	#### 环境变量文件  在 github.com 上与存放 compose 文件的同一目录中，您可以在 compose 文件中找到每个组件的默认环境变量文件，这些环境变量文件的命令与 `.env_<type of component>`  类似。

en-us	##### Environment variables  All Zabbix component images provide environment variables to control configuration. These environment variables are listed in each component repository. These environment variables are options from Zabbix configuration files, but with different naming method. For example, `ZBX_LOGSLOWQUERIES` is equal to `LogSlowQueries` from Zabbix server and Zabbix proxy configuration files.  ::: noteimportant  Some of configuration options are not allowed to change. For example, `PIDFile` and `LogType`. :::  Some of components have specific environment variables, which do not exist in official Zabbix configuration files:  |   |   |   | |---|---|---| |**Variable**|**Components**|**Description**| |`DB_SERVER_HOST`|Server<br>Proxy<br>Web interface|This variable is IP or DNS name of MySQL or PostgreSQL server.<br>By default, value is `mysql-server` or `postgres-server` for MySQL or PostgreSQL respectively| |`DB_SERVER_PORT`|Server<br>Proxy<br>Web interface|This variable is port of MySQL or PostgreSQL server.<br>By default, value is '3306' or '5432' respectively.| |`MYSQL_USER`|Server<br>Proxy<br>Web-interface|MySQL database user.<br>By default, value is 'zabbix'.| |`MYSQL_PASSWORD`|Server<br>Proxy<br>Web interface|MySQL database password.<br>By default, value is 'zabbix'.| |`MYSQL_DATABASE`|Server<br>Proxy<br>Web interface|Zabbix database name.<br>By default, value is 'zabbix' for Zabbix server and 'zabbix\_proxy' for Zabbix proxy.| |`POSTGRES_USER`|Server<br>Web interface|PostgreSQL database user.<br>By default, value is 'zabbix'.| |`POSTGRES_PASSWORD`|Server<br>Web interface|PostgreSQL database password.<br>By default, value is 'zabbix'.| |`POSTGRES_DB`|Server<br>Web interface|Zabbix database name.<br>By default, value is 'zabbix' for Zabbix server and 'zabbix\_proxy' for Zabbix proxy.| |`PHP_TZ`|Web-interface|Timezone in PHP format. Full list of supported timezones are available on [php.net](http://php.net/manual/en/timezones.php).<br>By default, value is 'Europe/Riga'.| |`ZBX_SERVER_NAME`|Web interface|Visible Zabbix installation name in right top corner of the web interface.<br>By default, value is 'Zabbix Docker'| |`ZBX_JAVAGATEWAY_ENABLE`|Server<br>Proxy|Enables communication with Zabbix Java gateway to collect Java related checks.<br>By default, value is "false"| |`ZBX_ENABLE_SNMP_TRAPS`|Server<br>Proxy|Enables SNMP trap feature. It requires **zabbix-snmptraps** instance and shared volume */var/lib/zabbix/snmptraps* to Zabbix server or Zabbix proxy.|
zh-cn	##### 环境变量  所有 Zabbix 组件 image 都提供环境变量来控制配置。 这些环境变量在每个组件 image 仓库中列出。这些环境变量是 Zabbix 配置文件中的选项，但具有不同的命名方法。 例如，ZBX_LOGSLOWQUERIES 等于来自 Zabbix server 和 Zabbix proxy 配置文件的 LogSlowQueries。  ::: noteimportant 一些配置选项是不允许更改的。例如，`PIDFile`和 `LogType`。 :::  其中，一些组件有特定的环境变量，而这些环境变量在官方 Zabbix 配置文件并不存在：  |   |   |   | |---|---|---| |**变量 **|**组件**|**描述**| |`DB_SERVER_HOST`|Server<br>Proxy<br>Web 界面|这个变量指的是 MySQL 或 PostgreSQL 的 IP 或 DNS。<br>默认情况下，这个值根据 MySQL 和 PostgreSQL，分别为mysql-server 或 postgres-server| |`DB_SERVER_PORT`|Server<br>Proxy<br>Web 界面|这个变量指的是 MySQL 或 PostgreSQL 的端口。<br>默认情况下，这个值根据 MySQL 和 PostgreSQL，分别为 '3306' 或 '5432' 。| |`MYSQL_USER`|Server<br>Proxy<br>Web 界面|MySQL 数据库用户。<br>默认情况下，这个值为 'zabbix'。| |`MYSQL_PASSWORD`|Server<br>Proxy<br>Web 界面|MySQL 数据库密码。<br>默认情况下，这个值为 'zabbix'。| |`MYSQL_DATABASE`|Server<br>Proxy<br>Web 界面|Zabbix 数据库库名。<br>默认情况下，这个值根据 Zabbix server 和 Zabbix proxy，分别为 'zabbix' 和 'zabbix_proxy' 。| |`POSTGRES_USER`|Server<br>Web 界面|PostgreSQL 数据库用户。<br>默认情况下，这个值为 'zabbix'。| |`POSTGRES_PASSWORD`|Server<br>Web 界面|PostgreSQL 数据库密码。<br>默认情况下，这个值为 'zabbix'。| |`POSTGRES_DB`|Server<br>Web 界面|Zabbix 数据库库名。<br>默认情况下，这个值根据 Zabbix server 和 Zabbix proxy，分别为 'zabbix' 和 'zabbix_proxy' 。| |`PHP_TZ`|Web 界面|PHP 时区格式。支持时区的完整列表参照 [php.net](http://php.net/manual/en/timezones.php)。<br>默认情况下，这个值为 'Europe/Riga' 。| |`ZBX_SERVER_NAME`|Web 界面|Web 界面右上角显示的安装名称。<br>默认情况下，这个值为 'Zabbix Docker' 。| |`ZBX_JAVAGATEWAY_ENABLE`|Server<br>Proxy|是否启用 Zabbix Java 网关 以采集与 Java 相关的检查数据。<br>默认情况下，这个值为 "false" 。| |`ZBX_ENABLE_SNMP_TRAPS`|Server<br>Proxy|是否启用 SNMP trap 功能。 这需要存在 zabbix-snmptraps 容器实例，并共享 /var/lib/zabbix/snmptraps  volume 到 Zabbix server 或 proxy。|

en-us	#### Error handling  Up to that point everything we've tried has worked fine. But what happens if we try to make an incorrect call to the API? Let's try to create another host by calling [host.create](/manual/api/reference/host/create) but omitting the mandatory `groups` parameter.  ```json {     "jsonrpc": "2.0",     "method": "host.create",     "params": {         "host": "Linux server",         "interfaces": [             {                 "type": 1,                 "main": 1,                 "useip": 1,                 "ip": "192.168.3.1",                 "dns": "",                 "port": "10050"             }         ]     },     "id": 7,     "auth": "0424bd59b807674191e7d77572075f33" } ```  The response will then contain an error message:  ```json {     "jsonrpc": "2.0",     "error": {         "code": -32602,         "message": "Invalid params.",         "data": "No groups for host \"Linux server\"."     },     "id": 7 } ```  If an error occurred, instead of the `result` property, the response object will contain an `error` property with the following data:  -   `code` - an error code; -   `message` - a short error summary; -   `data` - a more detailed error message.  Errors can occur in different cases, such as, using incorrect input values, a session timeout or trying to access unexisting objects. Your application should be able to gracefully handle these kinds of errors.
zh-cn	#### 错误处理  到目前为止，我们尝试过的一切都运行良好。但是，如果我们尝试对 API 进行不正确的调用，会发生什么情况？让我们尝试通过调用 [host.create](/manual/api/reference/host/create) 方法创建另一个主机， 但省略一个必填的 `groups` 参数。  ``` {.json} {     "jsonrpc": "2.0",     "method": "host.create",     "params": {         "host": "Linux server",         "interfaces": [             {                 "type": 1,                 "main": 1,                 "useip": 1,                 "ip": "192.168.3.1",                 "dns": "",                 "port": "10050"             }         ]     },     "id": 7,     "auth": "0424bd59b807674191e7d77572075f33" } ```  这个请求的返回会包含一个错误信息：  ``` {.json} {     "jsonrpc": "2.0",     "error": {         "code": -32602,         "message": "Invalid params.",         "data": "No groups for host \"Linux server\"."     },     "id": 7 } ```  如果发生错误，响应对象将包含 `error` 属性而不是 `result` 属性，同时 error 包含以下数据：  -   `code` - 错误代码； -   `message` - 一个简短的错误摘要； -   `data` - 更详细的错误消息。  错误可能发生在不同的情况下，例如，使用不正确的输入值，会话超时或试图访问不存在的对象。你的应用程序应该能够优雅地处理这些类型的错误。

en-us	#### Error messages  ODBC error messages are structured into fields to provide detailed information. For example:      Cannot execute ODBC query: [SQL_ERROR]:[42601][7][ERROR: syntax error at or near ";"; Error while executing the query]     └───────────┬───────────┘  └────┬────┘ └──┬──┘└┬┘└─────────────────────────────┬─────────────────────────────────────┘                 │                   │         │    └─ Native error code            └─ Native error message                 │                   │         └─ SQLState                 └─ Zabbix message   └─ ODBC return code  Note that the error message length is limited to 2048 bytes, so the message can be truncated. If there is more than one ODBC diagnostic record Zabbix tries to concatenate them (separated with `|`) as far as the length limit allows.
zh-cn	#### 错误信息  ODBC错误消息被构造成字段,以提供详细信息.例如：      Cannot execute ODBC query: [SQL_ERROR]:[42601][7][ERROR: syntax error at or near ";"; Error while executing the query]     └───────────┬───────────┘  └────┬────┘ └──┬──┘└┬┘└─────────────────────────────┬─────────────────────────────────────┘                 │                   │         │    └─ Native error code            └─ Native error message                 │                   │         └─ SQLState                 └─ Zabbix message   └─ ODBC return code  请注意，错误消息长度限制为2048字节，因此信息可以被截断。如果有多个ODBC诊断记录，只要长度允许，Zabbix将尝试把它们连接起来（用`|`分隔）。

en-us	#### Escalation examples
zh-cn	#### 升级示例

en-us	#### Evaluation period  An evaluation period is used in functions referencing the item history. It allows to specify the interval we are interested in. It can be specified as time period (30s, 10m, 1h) or as a value range (\#5 - for five latest values).  The evaluation period is measured up to "now" - where "now" is the latest recalculation time of the trigger (see [Calculation time](#calculation_time) above); "now" is not the "now" time of the server.  The evaluation period specifies either:  -   To consider all values between "now-time period" and "now" (or, with     time shift, between "now-time shift-time period" and     "now-time\_shift") -   To consider no more than the num count of values from the past, up     to "now"     -   If there are 0 available values for the time period or num count         specified - then the trigger or calculated item that uses this         function becomes unsupported  Note that:  -   If only a single function (referencing data history) is used in the     trigger, "now" is always the latest received value. For example, if     the last value was received an hour ago, the evaluation period will     be regarded as up to the latest value an hour ago. -   A new trigger is calculated as soon as the first value is received     (history functions); it will be calculated within 30 seconds for     time-based functions. Thus the trigger will be calculated even     though perhaps the set evaluation period (for example, one hour) has     not yet passed since the trigger was created. The trigger will also     be calculated after the first value, even though the evaluation     range was set, for example, to ten latest values.
zh-cn	#### 评估周期  在引用监控项历史的函数中使用评估周期。 它允许指定我们感兴趣的间隔。它可以是 指定为时间段 (30s, 10m, 1h) 或值范围 (#5 - for 五个最近值）。  评估周期测量到“now(现在)” - 其中“now(现在)”是 触发器的最新重新计算时间（参见[Calculation time](#calculation_time) 上面）； “now(现在)”不是现在的“now(现在)”服务器时间。  评估周期指定：  - 考虑“now-time period（现在时间周期）”和“now(现在)”之间的所有值（或者，与 时间偏移量，在“now-time shift-time period(现在时间偏移点时间区间)”和 “now-time\_shift(现在\偏移量)”） - 考虑不超过过去的值的数量，向上 到“now(现在)”    - 如果时间周期或计数有 0 个可用值 指定 - 然后是使用它的触发器或计算项 功能变得不受支持.  注意：  - 如果在触发器中只使用一个函数(引用监控数据历史)，那么“now（现在）”总是最新收到的值。例如，如果最后一个值是在一小时前收到的，那么评估期将被视为一小时前的最新值。 - 当第一个监控值被接收时，一个新的触发器被计算出来(history functions 历史函数);基于时间的函数将在30秒内计算。因此，即使设置的评估周期(例如 一个小时)自触发器创建以来还没有过去，也将计算触发器。触发器也将在第一个值之后计算，即使计算范围被设置为10个最新的值。

en-us	# event.acknowledge
zh-cn	# 确认

en-us	#### Event correlation  Create custom event correlation rules.  [Correlation API](/manual/api/reference/correlation)
zh-cn	#### 事件关联性  创建自定义事件相关规则。  [Correlation API](/manual/api/reference/correlation)

en-us	##### Event correlation  Event correlation (also called global event correlation) is a way to set up custom event closing (resulting in OK event generation) rules.  The rules define how the new problem events are paired with existing problem events and allow to close the new event or the matched events by generating corresponding OK events.  However, event correlation must be configured very carefully, as it can negatively affect event processing performance or, if misconfigured, close more events than intended (in the worst case even all problem events could be closed). A few configuration tips:  1.  always reduce the correlation scope by setting a unique tag for the     control event (the event that is paired with old events) and use the     'new event tag' correlation condition 2.  don't forget to add a condition based on the old event when using     'close old event' operation, or all existing problems could be     closed 3.  avoid using common tag names used by different correlation     configurations
zh-cn	##### 事件关联  事件关联（也叫做全局事件关联）是一种设置自定义事件关闭（导致正常事件生成）的规则。  这个规则定义了新的问题事件如何匹配已有的问题事件，并允许通过生成对应的正常事件来关闭新的事件或匹配的事件。  但是，配置事件关联必须非常地谨慎，因为它可能对事件处理性能造成负面影响，如果配置错误会关闭比预期更多的事件（最坏的情况会关闭所有的事件）。下面是几个配置的提示：  1.  总是通过为控制事件（匹配了旧事件的事件）设置唯一的的标签来缩小关联范围，并且使用“新事件标签”关联条件 2.  当使用“关闭旧事件”操作时不要忘记添加基于旧事件的条件，否则所有已有的问题事件都会关闭 3.  避免使用不同关联配置所使用的通用标签

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

en-us	#### Event menu  Clicking on the problem name brings up the event menu:  ![](../../../../../assets/en/manual/web_interface/frontend_sections/monitoring/event_menu.png)  The event menu allows to:  -   filter the problems of the trigger -   access the trigger configuration -   access a simple graph/item history of the underlying item(s) -   access an external ticket of the problem (if configured, see the     *Include event menu entry* option when configuring     [webhooks](/manual/config/notifications/media/webhook)) -   execute global     [scripts](/manual/web_interface/frontend_sections/administration/scripts)     (these scripts need to have their scope defined as 'Manual event     action'). This feature may be handy for running scripts used for     managing problem tickets in external systems.
zh-cn	#### 活动菜单  单击问题名称将显示事件菜单：  ![](../../../../../assets/en/manual/web_interface/frontend_sections/monitoring/event_menu.png)  事件菜单允许：  - · 过滤问题触发器 - · 访问触发器配置 - · 访问基础项目的简单图表/项目历史记录 - · 访问问题的外部工单（如果已配置，请参阅配置[webhooks](/manual/config/notifications/media/webhook)) 时的选项 - · 执行全局[脚本](/manual/web_interface/frontend_sections/administration/scripts)(这些脚本需要将其作用域定义为 '手动事件操作' )。此功能对于运行用于在外部系统中管理问题工单的脚本可能很方便。

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

en-us	#### Events  Retrieve events generated by triggers, network discovery and other Zabbix systems for more flexible situation management or third-party tool integration.  [Event API](/manual/api/reference/event)
zh-cn	#### 事件  检索由触发器、网络发现和其他 Zabbix 系统生成的事件，以实现更灵活的情况管理或第三方工具集成。  [Event API](/manual/api/reference/event)

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

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

en-us	# Event  This class is designed to work with events.  Object references:\  -   [Event](/manual/api/reference/event/object#host)  Available methods:\  -   [event.get](/manual/api/reference/event/get) - retrieving events -   [event.acknowledge](/manual/api/reference/event/acknowledge) -     acknowledging events
zh-cn	# 事件  此类用于处理事件。  对象引用：\  -   [事件](/manual/api/reference/event/object#主机)  可用方法：\  -   [event.get](/manual/api/reference/event/get) - 获取事件 -   [event.acknowledge](/manual/api/reference/event/acknowledge) -     确认事件

en-us	### Example
zh-cn	### 示例

en-us	##### Example 10  Check if client local time is in sync with Zabbix server time.  Use of function fuzzytime():      fuzzytime(/MySQL_DB/system.localtime,10s)=0  The trigger will change to the problem state in case when local time on server MySQL\_DB and Zabbix server differs by more than 10 seconds. Note that 'system.localtime' must be configured as a [passive check](/manual/appendix/items/activepassive#passive_checks).
zh-cn	##### 示例 10  检查客户端本地时间是否与 Zabbix 服务器时间同步。 使用fuzzytime()函数:      fuzzytime(/MySQL_DB/system.localtime,10s)=0  当MySQL_DB服务器的本地时间与Zabbix server之间的时间相差超过10秒，触发器将变为异常状态。 注意 'system.localtime' 必须配置为 [passive check被动检查](/manual/appendix/items/activepassive#passive_checks).

en-us	##### Example 11  Comparing average load today with average load of the same time yesterday (using time shift as `now-1d`).      avg(/server/system.cpu.load,1h)/avg(/server/system.cpu.load,1h:now-1d)>2  This expression will fire if the average load of the last hour tops the average load of the same hour yesterday more than two times.
zh-cn	##### 示例 11  比较今天的平均负载和昨天同一时间的平均负载（使用时移作为`now-1d`）。      avg(/server/system.cpu.load,1h)/avg(/server/system.cpu.load,1h:now-1d)>2  如果最后一小时的平均负载超过昨天同一小时的平均负载两倍，触发器将触发。

en-us	##### Example 12  Using the value of another item to get a trigger threshold:      last(/Template PfSense/hrStorageFree[{#SNMPVALUE}])<last(/Template PfSense/hrStorageSize[{#SNMPVALUE}])*0.1  The trigger will fire if the free storage drops below 10 percent.
zh-cn	##### 示例 12  使用了另一个监控项的值来获得触发器的阈值：      last(/Template PfSense/hrStorageFree[{#SNMPVALUE}])<last(/Template PfSense/hrStorageSize[{#SNMPVALUE}])*0.1  如果可用存储量低于 10%，触发器将触发。

en-us	##### Example 13  Using [evaluation result](#operators) to get the number of triggers over a threshold:      (last(/server1/system.cpu.load[all,avg1])>5) + (last(/server2/system.cpu.load[all,avg1])>5) + (last(/server3/system.cpu.load[all,avg1])>5)>=2  The trigger will fire if at least two of the triggers in the expression are over 5.
zh-cn	##### 示例 13  使用[evaluation result评估结果](#operators)获取超过阈值的触发器数量:      (last(/server1/system.cpu.load[all,avg1])>5) + (last(/server2/system.cpu.load[all,avg1])>5) + (last(/server3/system.cpu.load[all,avg1])>5)>=2  如果表达式中至少有两个触发器大于5，触发器将触发。

en-us	##### Example 14  Comparing string values of two items - operands here are functions that return strings.  Problem: create an alert if Ubuntu version is different on different hosts      last(/NY Zabbix server/vfs.file.contents[/etc/os-release])<>last(/LA Zabbix server/vfs.file.contents[/etc/os-release])
zh-cn	##### 示例 14   比较两个监控项的字符串值 - 这里的操作数是返回字符串的函数 。  问题：如果两台主机Ubuntu版本不同，则产生告警。      last(/NY Zabbix server/vfs.file.contents[/etc/os-release])<>last(/LA Zabbix server/vfs.file.contents[/etc/os-release])

en-us	##### Example 15  Comparing two string values - operands are:  -   a function that returns a string -   a combination of macros and strings  Problem: detect changes in the DNS query  The item key is:      net.dns.record[8.8.8.8,{$WEBSITE_NAME},{$DNS_RESOURCE_RECORD_TYPE},2,1]  with macros defined as      {$WEBSITE_NAME} = example.com     {$DNS_RESOURCE_RECORD_TYPE} = MX  and normally returns:      example.com           MX       0 mail.example.com  So our trigger expression to detect if the DNS query result deviated from the expected result is:      last(/Zabbix server/net.dns.record[8.8.8.8,{$WEBSITE_NAME},{$DNS_RESOURCE_RECORD_TYPE},2,1])<>"{$WEBSITE_NAME}           {$DNS_RESOURCE_RECORD_TYPE}       0 mail.{$WEBSITE_NAME}"  Notice the quotes around the second operand.
zh-cn	##### 示例 15  比较两个字符串值 - 操作数是：  - 返回字符串的函数 - 宏和字符串的组合  问题：检测 DNS 查询的变化  监控项键是：      net.dns.record[8.8.8.8,{$WEBSITE_NAME},{$DNS_RESOURCE_RECORD_TYPE},2,1]  宏定义为      {$WEBSITE_NAME} = example.com     {$DNS_RESOURCE_RECORD_TYPE} = MX  并且通常返回：      example.com           MX       0 mail.example.com  检测DNS查询结果是否与预期的结果有偏差的触发器表达式如下：      last(/Zabbix server/net.dns.record[8.8.8.8,{$WEBSITE_NAME},{$DNS_RESOURCE_RECORD_TYPE},2,1])<>"{$WEBSITE_NAME}           {$DNS_RESOURCE_RECORD_TYPE}       0 mail.{$WEBSITE_NAME}"  注意第二个操作数的引号。

en-us	##### Example 16  Comparing two string values - operands are:  -   a function that returns a string -   a string constant with special characters \\ and "  Problem: detect if the `/tmp/hello` file content is equal to:      \" //hello ?\"  Option 1) write the string directly      last(/Zabbix server/vfs.file.contents[/tmp/hello])="\\\" //hello ?\\\""  Notice how \\ and " characters are escaped when the string gets compared directly.  Option 2) use a macro      {$HELLO_MACRO} = \" //hello ?\"  in the expression:      last(/Zabbix server/vfs.file.contents[/tmp/hello])={$HELLO_MACRO}
zh-cn	##### 示例 16  比较两个字符串值 - 操作数是：  - 返回字符串的函数 - 带有特殊字符 \\ 和 " 的字符串常量  问题：检测`/tmp/hello`文件内容是否等于：      \" //hello ?\"  选项1）直接写字符串      last(/Zabbix server/vfs.file.contents[/tmp/hello])="\\\" //hello ?\\\""  请注意在比较字符串时如何转义 \\ 和 " 字符。  选项 2) 使用宏      {$HELLO_MACRO} = \" //hello ?\"  在表达式中：      last(/Zabbix server/vfs.file.contents[/tmp/hello])={$HELLO_MACRO}

en-us	##### Example 17  Comparing long-term periods.  Problem: Load of Exchange server increased by more than 10% last month      trendavg(/Exchange/system.cpu.load,1M:now/M)>1.1*trendavg(/Exchange/system.cpu.load,1M:now/M-1M)  You may also use the [Event name](/manual/config/triggers/trigger#configuration) field in trigger configuration to build a meaningful alert message, for example to receive something like  `"Load of Exchange server increased by 24% in July (0.69) comparing to June (0.56)"`  the event name must be defined as:      Load of {HOST.HOST} server increased by {{?100*trendavg(//system.cpu.load,1M:now/M)/trendavg(//system.cpu.load,1M:now/M-1M)}.fmtnum(0)}% in {{TIME}.fmttime(%B,-1M)} ({{?trendavg(//system.cpu.load,1M:now/M)}.fmtnum(2)}) comparing to {{TIME}.fmttime(%B,-2M)} ({{?trendavg(//system.cpu.load,1M:now/M-1M)}.fmtnum(2)})  It is also useful to allow manual closing in trigger configuration for this kind of problem.
zh-cn	##### 示例 17  比较长期周期。  问题：上个月 Exchange 服务器的负载增加了 10% 以上    trendavg(/Exchange/system.cpu.load,1M:now/M)>1.1*trendavg(/Exchange/system.cpu.load,1M:now/M-1M)  您也可以在触发器配置中使用 Event name（事件名称），构建有意义的警报消息，例如如下内容。  `"Load of Exchange server increased by 24% in July (0.69) comparing to June (0.56)"`  事件名称必须定义为：      Load of {HOST.HOST} server increased by {{?100*trendavg(//system.cpu.load,1M:now/M)/trendavg(//system.cpu.load,1M:now/M-1M)}.fmtnum(0)}% in {{TIME}.fmttime(%B,-1M)} ({{?trendavg(//system.cpu.load,1M:now/M)}.fmtnum(2)}) comparing to {{TIME}.fmttime(%B,-2M)} ({{?trendavg(//system.cpu.load,1M:now/M-1M)}.fmtnum(2)})  这种情况在触发器配置中允许手动关闭也很有用 。

en-us	##### Example 1  Calculating percentage of free disk space on '/'.  Use of function **last**:      100*last(//vfs.fs.size[/,free])/last(//vfs.fs.size[/,total])  Zabbix will take the latest values for free and total disk spaces and calculate percentage according to the given formula.
zh-cn	##### 示例 1  计算 '/'上可用磁盘空间的百分比。  使用函数 **last**:      100*last(//vfs.fs.size[/,free])/last(//vfs.fs.size[/,total]) Zabbix 将获取可用和总磁盘空间的最新值，并根据给定的公式计算百分比。

en-us	##### Example 1  Message subject:      Problem: {TRIGGER.NAME}  When you receive the message, the message subject will be replaced by something like:      Problem: Processor load is too high on Zabbix server
zh-cn	##### 示例 1  消息主题：      Problem: {TRIGGER.NAME}  当收到消息时，消息主题将被替换为类似如下内容：      Problem: Processor load is too high on Zabbix server

en-us	##### Example 1  Sending a repeated notification once every 30 minutes (5 times in total) to a 'MySQL Administrators' group. To configure:  -   in Operations tab, set the *Default operation step duration* to     '30m' (30 minutes) -   Set the escalation steps to be *From* '1' *To* '5' -   Select the 'MySQL Administrators' group as recipients of the message  ![](../../../../../assets/en/manual/config/escalations_a.png){width="600"}  Notifications will be sent at 0:00, 0:30, 1:00, 1:30, 2:00 hours after the problem starts (unless, of course, the problem is resolved sooner).  If the problem is resolved and a recovery message is configured, it will be sent to those who received at least one problem message within this escalation scenario.  ::: noteclassic If the trigger that generated an active escalation is disabled, Zabbix sends an informative message about it to all those that have already received notifications. :::
zh-cn	##### 例1  每30分钟向“MySQL管理员”组发送一次重复通知（总共5次）。要配置：  - 在操作选项卡中，将*默认操作步骤持续时间*设置为'30m'（30分钟） - 将升级步骤设置为从*1'*到*5' - 选择“MySQL管理员”组作为邮件的收件人  ![](../../../../../assets/en/manual/config/escalations_a.png){width=“600”}  通知将在问题开始后的0:00、0:30、1:00、1:30、2:00小时发送（当然，除非问题更快得到解决）。  如果问题得到解决并配置了恢复消息，则会将其发送给在此升级方案中至少收到一条问题消息的人。  ::: noteclassic 如果生成活动升级的触发器被禁用，Zabbix会向所有已经收到通知的人发送一条关于该事件的信息性消息。 :::

en-us	##### Example 1  Send simple GET requests to retrieve data from services such as Elasticsearch:  -   Create a GET item with URL: `localhost:9200/?pretty` -   Notice the response:  ```{=html} <!-- --> ```     {       "name" : "YQ2VAY-",       "cluster_name" : "elasticsearch",       "cluster_uuid" : "kH4CYqh5QfqgeTsjh2F9zg",       "version" : {         "number" : "6.1.3",         "build_hash" : "af51318",         "build_date" : "2018-01-26T18:22:55.523Z",         "build_snapshot" : false,         "lucene_version" : "7.1.0",         "minimum_wire_compatibility_version" : "5.6.0",         "minimum_index_compatibility_version" : "5.0.0"       },       "tagline" : "You know, for search"     }  -   Now extract the version number using a JSONPath preprocessing step:     `$.version.number`
zh-cn	 ##### 示例 1  发送一个简单GET请求，以从其他服务获取数据。案例为Elasticsearch：  -   创建一个从URL `localhost:9200/?pretty` GET 的监控项 -   注意获得的相应内容：  ```{=html} <!-- --> ```     {       "name" : "YQ2VAY-",       "cluster_name" : "elasticsearch",       "cluster_uuid" : "kH4CYqh5QfqgeTsjh2F9zg",       "version" : {         "number" : "6.1.3",         "build_hash" : "af51318",         "build_date" : "2018-01-26T18:22:55.523Z",         "build_snapshot" : false,         "lucene_version" : "7.1.0",         "minimum_wire_compatibility_version" : "5.6.0",         "minimum_index_compatibility_version" : "5.0.0"       },       "tagline" : "You know, for search"     }  -  现在可以使用JSONPath 预处理步骤获取版本号信息： `$.version.number` 

en-us	##### Example 1  Something very simple:      UserParameter=ping[*],echo $1  We may define unlimited number of items for monitoring all having format ping\[something\].  -   ping\[0\] - will always return '0' -   ping\[aaa\] - will always return 'aaa'
zh-cn	##### 示例1   先来一个简单的：\      UserParameter=ping[*],echo $1  我们可以定义无数个监控项来监控所有形如ping\[something\]格式的东西。\  -   ping\[0\] - 将总是返回 ‘ 0 ’ -   ping\[aaa\] - 将总是返回 ‘aaa’

en-us	##### Example 1  Stop repetitive problem events from the same network port.  ![](../../../../assets/en/manual/config/event_correlation/correlation_example.png)  This global correlation rule will correlate problems if *Host* and *Port* tag values exist on the trigger and they are the same in the original event and the new one.  The operation will close new problem events on the same network port, keeping only the original problem open.
zh-cn	##### 示例 1  停止来自同一网络端口的重复问题事件。  ![](../../../../assets/en/manual/config/event_correlation/correlation_example.png)  如果触发器上存在*主机*和*端口*的标签值与最初的事件的相同，这个全局关联规则会关联问题。  这个操作将会关闭同一网络端口的新的问题事件，只保留最初的问题事件。

en-us	##### Example 1  Temperature in server room is too high.  Problem expression:      last(/server/temp)>20  Recovery expression:      last(/server/temp)<=15
zh-cn	##### 示例 1   机房温度过高。  问题表达式:      last(/server/temp)>20  恢复表达式：      last(/server/temp)<=15

en-us	##### Example 1  The processor load is too high on Zabbix server.      last(/Zabbix server/system.cpu.load[all,avg1])>5  By using the function 'last()', we are referencing the most recent value. `/Zabbix server/system.cpu.load[all,avg1]` gives a short name of the monitored parameter. It specifies that the host is 'Zabbix server' and the key being monitored is 'system.cpu.load\[all,avg1\]'. Finally, `>5` means that the trigger is in the PROBLEM state whenever the most recent processor load measurement from Zabbix server is greater than 5.
zh-cn	##### 示例 1 Zabbix server上的处理器负载太高。      last(/Zabbix server/system.cpu.load[all,avg1])>5  '/Zabbix server/system.cpu.load[all,avg1]' 给出了被监控参数的简短名称。它指定了服务器是“Zabbix server”，监控项的键值是“system.cpu.load[all,avg1]”。通过使用函数“last()”获取最新的值。最后，“>5”意味着当Zabbix server最新获取的处理器负载值大于5时触发器就会处于异常状态。

en-us	##### Example 1  To create a "Web scenario failed" trigger, you can define a trigger expression:      last(/host/web.test.fail[Scenario])<>0  Make sure to replace 'Scenario' with the real name of your scenario.
zh-cn	##### 示例 1  要创建 "Web scenario failed（Web 场景失败）"触发器，您可以定义触发器表达式：      last(/host/web.test.fail[Scenario])<>0  确保将 'Scenario' 替换为场景的真实名称。

en-us	##### Example 1  Total disk space of host group 'MySQL Servers'.      sum(last_foreach(/*/vfs.fs.size[/,total]?[group="MySQL Servers"]))
zh-cn	##### 示例 1  主机组“  MySQL Servers”的总磁盘空间      sum(last_foreach(/*/vfs.fs.size[/,total]?[group="MySQL Servers"]))

en-us	##### Example 1  Use of host-level macro in the "Status of SSH daemon" item key:  `net.tcp.service[ssh,,{$SSH_PORT}]`  This item can be assigned to multiple hosts, providing that the value of **{$SSH\_PORT}** is defined on those hosts.
zh-cn	##### 示例 1  在“SSH daemon 状态”项键中使用主机级宏：`net.tcp.service[ssh,,{$SSH_PORT}]`  此项可以分配给多个主机，前提是**{$SSH\_PORT}** 在这些主机上定义。

en-us	##### Example 1  Use of the following expression in low-level discovery to discover databases except a database with a specific name:      ^TESTDATABASE$  ![regexp\_expr\_2.png](../../assets/en/manual/regular_expressions/regexp_expr_2.png)  Chosen *Expression type*: "Result is FALSE". Doesn't match name, containing string "*TESTDATABASE*".
zh-cn	##### 示例1  在低级别自动发现中使用下列表达式发现具有特定名称的数据库以外的数据库：      ^TESTDATABASE$  ![regexp\_expr\_2.png](../../assets/en/manual/regular_expressions/regexp_expr_2.png)  选择的 *Expression type（表达式类型）*：“Result is FALSE（结果为假）”。 与名称不匹配，包含字符串 "*TESTDATABASE*"。

en-us	##### Example 1  Using host metadata to distinguish between Linux and Windows hosts.  Say you would like the hosts to be autoregistered by the Zabbix server. You have active Zabbix agents (see "Configuration" section above) on your network. There are Windows hosts and Linux hosts on your network and you have "Linux by Zabbix agent" and "Windows by Zabbix agent" templates available in your Zabbix frontend. So at host registration, you would like the appropriate Linux/Windows template to be applied to the host being registered. By default, only the hostname is sent to the server at autoregistration, which might not be enough. In order to make sure the proper template is applied to the host you should use host metadata.
zh-cn	##### 例1  使用主机元数据区分Linux和Windows主机。  假设你想让主机自动注册到Zabbix server。 网络中有配置了active agent(参阅上述"配置"章节)的Windows和Linux主机，并且Zabbix页面中有"Linux by Zabbix agent"和"Windows by Zabbix agent"这两个可用模板。 于是你想在注册过程中将Linux/Windows模板自动应用到对应主机。在自动注册过程中，默认只有主机名称会发送给Zabbix server，可是这些信息并不够。要想确保合适的模板应用到对应主机上，需要使用主机元数据。

en-us	##### Example 2  Calculating a 10-minute average of the number of values processed by Zabbix.  Use of function **avg**:      avg(/Zabbix Server/zabbix[wcache,values],10m)  Note that extensive use of calculated items with long time periods may affect performance of Zabbix server.
zh-cn	##### 示例 2  计算 Zabbix 处理的值的 10 分钟平均值。  使用函数 **avg**:      avg(/Zabbix Server/zabbix[wcache,values],10m)  请注意，可计算监控项选取长时间段的数据会影响 Zabbix 服务器的性能。

en-us	##### Example 2  Free disk space is too low.  Problem expression: it is less than 10GB for last 5 minutes      max(/server/vfs.fs.size[/,free],5m)<10G  Recovery expression: it is more than 40GB for last 10 minutes      min(/server/vfs.fs.size[/,free],10m)>40G
zh-cn	##### 示例 2   磁盘剩余空间过低。  问题表达式: 最后 5 分钟小于 10GB      max(/server/vfs.fs.size[/,free],5m)<10G  恢复表达式：最近10分钟超过40GB      min(/server/vfs.fs.size[/,free],10m)>40G

en-us	##### Example 2  Let's add more sense!      UserParameter=mysql.ping[*],mysqladmin -u$1 -p$2 ping | grep -c alive  This parameter can be used for monitoring availability of MySQL database. We can pass user name and password:      mysql.ping[zabbix,our_password]
zh-cn	##### 示例2  让我们更进一步！\      UserParameter=mysql.ping[*],mysqladmin -u$1 -p$2 ping | grep -c alive  这个用户自定义参数可以用来监控 MySQL 数据库的可用性状态。我们可以传入用户名和密码：      mysql.ping[zabbix,our_password]

en-us	##### Example 2  Message:      Processor load is: {?last(/zabbix.zabbix.com/system.cpu.load[,avg1])}  When you receive the message, the message will be replaced by something like:      Processor load is: 1.45
zh-cn	##### 示例 2  消息：      Processor load is: {?last(/zabbix.zabbix.com/system.cpu.load[,avg1])}  当收到消息时，将被替换为类似如下内容：      Processor load is: 1.45

en-us	##### Example 2  Monitoring of uptime:  |Parameter|Description| |--|--------| |**OID**|MIB::sysUpTime.0| |**Key**|router.uptime| |**Value type**|Float| |**Units**|uptime| |**Preprocessing step: Custom multiplier**|0.01|
zh-cn	##### 示例 2  监控正常运行时间：  |参数|说明| |---------|------------| |**OID**|MIB::sysUpTime.0| |**Key**|router.uptime| |**Value type**|浮点数| |**Units**|uptime| |**Multiplier**|0.01| |**Preprocessing step: Custom multiplier**|0.01|

en-us	##### Example 2  Sending a delayed notification about a long-standing problem. To configure:  -   In Operations tab, set the *Default operation step duration* to     '10h' (10 hours) -   Set the escalation steps to be *From* '2' *To* '2'  ![](../../../../../assets/en/manual/config/escalations_b.png){width="600"}  A notification will only be sent at Step 2 of the escalation scenario, or 10 hours after the problem starts.  You can customize the message text to something like 'The problem is more than 10 hours old'.
zh-cn	##### 例2  发送有关长期问题的延迟通知。要配置：  - 在“操作”选项卡中，将“默认操作步骤持续时间”设置为“10小时”（10小时） - 将升级步骤设置为从*2'*到*2'  ![](../../../../../assets/en/manual/config/escalations_b.png){width=“600”}  只有在升级场景的第2步，或问题开始10小时后，才会发送通知。  您可以将消息文本自定义为类似“问题已超过10小时”的内容。

en-us	##### Example 2  Send simple POST requests to retrieve data from services such as Elasticsearch:  -   Create a POST item with URL:     `http://localhost:9200/str/values/_search?scroll=10s` -   Configure the following POST body to obtain the processor load (1     min average per core)  ```{=html} <!-- --> ```     {         "query": {             "bool": {                 "must": [{                     "match": {                         "itemid": 28275                     }                 }],                 "filter": [{                     "range": {                         "clock": {                             "gt": 1517565836,                             "lte": 1517566137                         }                     }                 }]             }         }     }  -   Received:  ```{=html} <!-- --> ```     {         "_scroll_id": "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAAkFllRMlZBWS1UU1pxTmdEeGVwQjRBTFEAAAAAAAAAJRZZUTJWQVktVFNacU5nRHhlcEI0QUxRAAAAAAAAACYWWVEyVkFZLVRTWnFOZ0R4ZXBCNEFMUQAAAAAAAAAnFllRMlZBWS1UU1pxTmdEeGVwQjRBTFEAAAAAAAAAKBZZUTJWQVktVFNacU5nRHhlcEI0QUxR",         "took": 18,         "timed_out": false,         "_shards": {             "total": 5,             "successful": 5,             "skipped": 0,             "failed": 0         },         "hits": {             "total": 1,             "max_score": 1.0,             "hits": [{                 "_index": "dbl",                 "_type": "values",                 "_id": "dqX9VWEBV6sEKSMyk6sw",                 "_score": 1.0,                 "_source": {                     "itemid": 28275,                     "value": "0.138750",                     "clock": 1517566136,                     "ns": 25388713,                     "ttl": 604800                 }             }]         }     }  -   Now use a JSONPath preprocessing step to get the item value:     `$.hits.hits[0]._source.value`
zh-cn	 ##### 示例 2  发送一个简单POST请求，从其他服务抓取数据。以Elasticsearch为例：  -   创建一个POST监控项使用此URL:    `http://localhost:9200/str/values/_search?scroll=10s` -   配置以下的POST请求体获取处理器负载（1分钟平均值/核心）  ```{=html} <!-- --> ```     {         "query": {             "bool": {                 "must": [{                     "match": {                         "itemid": 28275                     }                 }],                 "filter": [{                     "range": {                         "clock": {                             "gt": 1517565836,                             "lte": 1517566137                         }                     }                 }]             }         }     }  -   得到响应:  ```{=html} <!-- --> ```     {         "_scroll_id": "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAAkFllRMlZBWS1UU1pxTmdEeGVwQjRBTFEAAAAAAAAAJRZZUTJWQVktVFNacU5nRHhlcEI0QUxRAAAAAAAAACYWWVEyVkFZLVRTWnFOZ0R4ZXBCNEFMUQAAAAAAAAAnFllRMlZBWS1UU1pxTmdEeGVwQjRBTFEAAAAAAAAAKBZZUTJWQVktVFNacU5nRHhlcEI0QUxR",         "took": 18,         "timed_out": false,         "_shards": {             "total": 5,             "successful": 5,             "skipped": 0,             "failed": 0         },         "hits": {             "total": 1,             "max_score": 1.0,             "hits": [{                 "_index": "dbl",                 "_type": "values",                 "_id": "dqX9VWEBV6sEKSMyk6sw",                 "_score": 1.0,                 "_source": {                     "itemid": 28275,                     "value": "0.138750",                     "clock": 1517566136,                     "ns": 25388713,                     "ttl": 604800                 }             }]         }     }  -   现在可以使用JSONPath 预处理步骤获取监控项的值： `$.hits.hits[0]._source.value`  

en-us	##### Example 2  Sum of latest values of all items matching net.if.in\[\*\] on the host.      sum(last_foreach(/host/net.if.in[*]))
zh-cn	##### 示例 2  主机上与 net.if.in[*]匹配的所有项的最新值之和。      sum(last_foreach(/host/net.if.in[*]))

en-us	##### Example 2  To create a "Web scenario failed" trigger with a useful problem description in the trigger name, you can define a trigger with name:      Web scenario "Scenario" failed: {ITEM.VALUE}  and trigger expression:      length(last(/host/web.test.error[Scenario]))>0 and last(/host/web.test.fail[Scenario])>0  Make sure to replace 'Scenario' with the real name of your scenario.
zh-cn	##### 示例 2  要在触发器名称中创建一个带有有用问题描述的"Web scenario failed（ Web 场景失败）"触发器，您可以使用名称定义触发器：      Web scenario "Scenario" failed: {ITEM.VALUE}  和触发表达式：      length(last(/host/web.test.error[Scenario]))>0 and last(/host/web.test.fail[Scenario])>0  确保将 'Scenario' 替换为场景的真实名称。

en-us	##### Example 2  Use of host-level macro in the "CPU load is too high" trigger:  `last(/ca_001/system.cpu.load[,avg1])>{$MAX_CPULOAD}`  Such a trigger would be created on the template, not edited in individual hosts.  ::: notetip If you want to use the amount of values as the function parameter (for example, **max(/host/key,\#3)**), include hash mark in the macro definition like this: SOME\_PERIOD => \#3 :::
zh-cn	##### 示例 2  在“CPU负载太高”触发器中使用主机级宏：`last(/ca_001/system.cpu.load[,avg1])>{$MAX_CPULOAD}`  这样的触发器将在模板上创建，而不是在个别主机。  ::: notetip 如果要使用值的数量作为函数参数（例如，**max(/host/key,\#3)**），在宏定义中包含如下哈希标记： SOME\_PERIOD => \#3 :::

en-us	##### Example 2  www.example.com is overloaded.      last(/www.example.com/system.cpu.load[all,avg1])>5 or min(/www.example.com/system.cpu.load[all,avg1],10m)>2   The expression is true when either the current processor load is more than 5 or the processor load was more than 2 during last 10 minutes.
zh-cn	##### 示例 2  www.example.com 已超载。      last(/www.example.com/system.cpu.load[all,avg1])>5 or min(/www.example.com/system.cpu.load[all,avg1],10m)>2   当前处理器负载超过5或过去10分钟内CPU负载都超过2。

en-us	##### Example 3  Average processor load of host group 'MySQL Servers'.      avg(last_foreach(/*/system.cpu.load[,avg1]?[group="MySQL Servers"]))
zh-cn	##### 示例 3  主机组“MySQL Servers”的平均处理器负载。      avg(last_foreach(/*/system.cpu.load[,avg1]?[group="MySQL Servers"]))

en-us	##### Example 3  Calculating total bandwidth on eth0.  Sum of two functions:      last(//net.if.in[eth0,bytes])+last(//net.if.out[eth0,bytes])
zh-cn	##### 示例 3  计算eth0的总带宽  两个函数之和:      last(//net.if.in[eth0,bytes])+last(//net.if.out[eth0,bytes])

en-us	##### Example 3  Checking if Zabbix API is alive, using [apiinfo.version](/manual/api/reference/apiinfo/version).  -   Item configuration:  ![](../../../../../assets/en/manual/config/items/itemtypes/example3_a.png)  Note the use of the POST method with JSON data, setting request headers and asking to return headers only:  -   Item value preprocessing with regular expression to get HTTP code:  ![](../../../../../assets/en/manual/config/items/itemtypes/example3_b.png)  -   Checking the result in *Latest data*:  ![](../../../../../assets/en/manual/config/items/itemtypes/example3_c.png){width="600"}
zh-cn	##### 示例 3  检查Zabbix API是否可用，可以用[apiinfo.version](/manual/api/reference/apiinfo/version) 这个接口  -   监控项配置:  ![](../../../../../assets/en/manual/config/items/itemtypes/example3_a.png)  注意使用POST方法传输JSON数据，设定请求头并仅要求检索头信息：  -   配置监控项值的预处理功能，使用正则表达式方法获取HTTP响应代码：  ![](../../../../../assets/en/manual/config/items/itemtypes/example3_b.png)  -   在 *最新数据* 中检查最新获取的数据：  ![](../../../../../assets/en/manual/config/items/itemtypes/example3_c.png){width="600"}

en-us	##### Example 3  Escalating the problem to the Boss.  In the first example above we configured periodical sending of messages to MySQL administrators. In this case, the administrators will get four messages before the problem will be escalated to the Database manager. Note that the manager will get a message only in case the problem is not acknowledged yet, supposedly no one is working on it.  ![](../../../../../assets/en/manual/config/escalations_c.png){width="600"}  Details of Operation 2:  ![](../../../../../assets/en/manual/config/escalations_cc.png)  Note the use of {ESC.HISTORY} macro in the customized message. The macro will contain information about all previously executed steps on this escalation, such as notifications sent and commands executed.
zh-cn	##### 例3  把问题上报给老板。  在上面的第一个示例中，我们配置了定期向MySQL管理员发送消息。在这种情况下，在问题升级到数据库管理器之前，管理员将收到四条消息。请注意，只有在问题尚未得到确认的情况下，经理才会收到一条消息，假设没有人在处理该问题。  ![](../../../../../assets/en/manual/config/escalations_c.png){width=“600”}  操作2的详情：  ![](../../../../../assets/en/manual/config/escalations_cc.png)  注意在定制消息中使用了{ESC.HISTORY}宏。宏将包含有关此升级之前执行的所有步骤的信息，例如发送的通知和执行的命令。

en-us	##### Example 3  How many lines matching a regular expression in a file?      UserParameter=wc[*],grep -c "$2" $1  This parameter can be used to calculate number of lines in a file.      wc[/etc/passwd,root]     wc[/etc/services,zabbix]
zh-cn	##### 示例3  一个文件中有多少行匹配正则表达式？      UserParameter=wc[*],grep -c "$2" $1  这个用户自定义参数能用来计算一个文件中有多少行匹配相应的表达式。就像下面一样：      wc[/etc/passwd,root]     wc[/etc/services,zabbix]

en-us	##### Example 3  Message:      Latest value: {?last(/{HOST.HOST}/{ITEM.KEY})}     MAX for 15 minutes: {?max(/{HOST.HOST}/{ITEM.KEY},15m)}     MIN for 15 minutes: {?min(/{HOST.HOST}/{ITEM.KEY},15m)}  When you receive the message, the message will be replaced by something like:      Latest value: 1.45     MAX for 15 minutes: 2.33     MIN for 15 minutes: 1.01
zh-cn	##### 示例 3  消息：      Latest value: {?last(/{HOST.HOST}/{ITEM.KEY})}     MAX for 15 minutes: {?max(/{HOST.HOST}/{ITEM.KEY},15m)}     MIN for 15 minutes: {?min(/{HOST.HOST}/{ITEM.KEY},15m)}  当收到消息时，将被替换为类似如下内容：      Latest value: 1.45     MAX for 15 minutes: 2.33     MIN for 15 minutes: 1.01

en-us	##### Example 3  To create a "Web application is slow" trigger, you can define a trigger expression:      last(/host/web.test.in[Scenario,,bps])<10000  Make sure to replace 'Scenario' with the real name of your scenario.
zh-cn	##### 示例 3  要创建 "Web application is slow（Web 应用程序慢）" 的触发器，可以定义以下触发器表达式：      last(/host/web.test.in[Scenario,,bps])<10000  确保将 'Scenario' 替换为场景的真实名称。

en-us	##### Example 3  Use of two macros in the "CPU load is too high" trigger:  `min(/ca_001/system.cpu.load[,avg1],{$CPULOAD_PERIOD})>{$MAX_CPULOAD}`  Note that a macro can be used as a parameter of trigger function, in this example function **min()**.
zh-cn	##### 示例 3  在“CPU负载太高”触发器中使用两个宏：`min(/ca_001/system.cpu.load[,avg1],{$CPULOAD_PERIOD})>{$MAX_CPULOAD}`  注意宏可以作为触发函数的参数，在这个示例函数**min()**。

en-us	##### Example 4  5-minute average of the number of queries per second for host group 'MySQL Servers'.      avg(avg_foreach(/*/mysql.qps?[group="MySQL Servers"],5m))
zh-cn	##### 示例 4  主机组“MySQL Servers”每秒平均查询次数5分钟平均值。      avg(avg_foreach(/*/mysql.qps?[group="MySQL Servers"],5m))

en-us	##### Example 4  A more complex scenario. After multiple messages to MySQL administrators and escalation to the manager, Zabbix will try to restart the MySQL database. It will happen if the problem exists for 2:30 hours and it hasn't been acknowledged.  If the problem still exists, after another 30 minutes Zabbix will send a message to all guest users.  If this does not help, after another hour Zabbix will reboot server with the MySQL database (second remote command) using IPMI commands.  ![](../../../../../assets/en/manual/config/escalations_d.png){width="600"}
zh-cn	##### 例4  更复杂的情况。在向MySQL管理员发送多条消息并升级到manager后，Zabbix将尝试重新启动MySQL数据库。如果问题存在2:30小时，但尚未确认，则会发生这种情况。  如果问题仍然存在，30分钟后，Zabbix将向所有来宾用户发送消息。  如果这没有帮助，再过一个小时，Zabbix将使用IPMI命令使用MySQL数据库（第二个远程命令）重新启动服务器。  ![](../../../../../assets/en/manual/config/escalations_d.png){width=“600”}

en-us	##### Example 4  Calculating percentage of incoming traffic.  More complex expression:      100*last(//net.if.in[eth0,bytes])/(last(//net.if.in[eth0,bytes])+last(//net.if.out[eth0,bytes]))  See also: [Examples of aggregate calculations](/manual/config/items/itemtypes/calculated/aggregate#usage_examples)  
zh-cn	##### 示例 4  计算入站流量的百分比  更为复杂的表达式：      100*last(//net.if.in[eth0,bytes])/(last(//net.if.in[eth0,bytes])+last(//net.if.out[eth0,bytes]))  另请参阅: [聚合计算示例](/manual/config/items/itemtypes/calculated/aggregate#usage_examples)

en-us	##### Example 4  Message:      http://<server_ip_or_name>/zabbix/tr_events.php?triggerid={TRIGGER.ID}&eventid={EVENT.ID}  When you receive the message, it will contain a link to the *Event details* page, which provides information about the event, its trigger, and a list of latest events generated by the same trigger.
zh-cn	##### 示例 4  消息：      http://<server_ip_or_name>/zabbix/tr_events.php?triggerid={TRIGGER.ID}&eventid={EVENT.ID}  当收到消息时，将会包含 *Event details*页面的链接，该页面提供该事件、它的触发器和近期由相同触发器产生的事件列表。 

en-us	##### Example 4  Retrieving weather information by connecting to the Openweathermap public service.  -   Configure a master item for bulk data collection in a single JSON:  ![](../../../../../assets/en/manual/config/items/itemtypes/example4_a.png)  Note the usage of macros in query fields. Refer to the [Openweathermap API](https://openweathermap.org/current) for how to fill them.  Sample JSON returned in response to HTTP agent:  ``` {.json} {     "body": {         "coord": {             "lon": 40.01,             "lat": 56.11         },         "weather": [{             "id": 801,             "main": "Clouds",             "description": "few clouds",             "icon": "02n"         }],         "base": "stations",         "main": {             "temp": 15.14,             "pressure": 1012.6,             "humidity": 66,             "temp_min": 15.14,             "temp_max": 15.14,             "sea_level": 1030.91,             "grnd_level": 1012.6         },         "wind": {             "speed": 1.86,             "deg": 246.001         },         "clouds": {             "all": 20         },         "dt": 1526509427,         "sys": {             "message": 0.0035,             "country": "RU",             "sunrise": 1526432608,             "sunset": 1526491828         },         "id": 487837,         "name": "Stavrovo",         "cod": 200     } } ```  The next task is to configure dependent items that extract data from the JSON.  -   Configure a sample dependent item for humidity:  ![](../../../../../assets/en/manual/config/items/itemtypes/example4_b.png)  Other weather metrics such as 'Temperature' are added in the same manner.  -   Sample dependent item value preprocessing with JSONPath:  ![](../../../../../assets/en/manual/config/items/itemtypes/example4_c.png)  -   Check the result of weather data in *Latest data*:  ![](../../../../../assets/en/manual/config/items/itemtypes/example4_d.png){width="600"}
zh-cn	 ##### 示例 4  通过连接到 Openweathermap 检索天气信息公共服务。  -   配置主要监控项将大量数据收集到一个简单JSON对象：  ![](../../../../../assets/en/manual/config/items/itemtypes/example4_a.png)  注意在query的字段中使用宏。参考 [Openweathermap API文档](https://openweathermap.org/current) 来了解如何填写它们。  一个简单JSON对象会被返回给HTTPS agent：  ``` {.json} {     "body": {         "coord": {             "lon": 40.01,             "lat": 56.11         },         "weather": [{             "id": 801,             "main": "Clouds",             "description": "few clouds",             "icon": "02n"         }],         "base": "stations",         "main": {             "temp": 15.14,             "pressure": 1012.6,             "humidity": 66,             "temp_min": 15.14,             "temp_max": 15.14,             "sea_level": 1030.91,             "grnd_level": 1012.6         },         "wind": {             "speed": 1.86,             "deg": 246.001         },         "clouds": {             "all": 20         },         "dt": 1526509427,         "sys": {             "message": 0.0035,             "country": "RU",             "sunrise": 1526432608,             "sunset": 1526491828         },         "id": 487837,         "name": "Stavrovo",         "cod": 200     } } ```  下一个任务是配置从属监控项从这个JSON对象中导出必要的数据。  -   配置一个简单的从属监控项获取湿度数据：  ![](../../../../../assets/en/manual/config/items/itemtypes/example4_b.png)  其他天气指标，例如 “温度” 可以以相同方式添加。  -  使用JSONPath来配置简单的从属监控项的值预处理步骤：  ![](../../../../../assets/en/manual/config/items/itemtypes/example4_c.png)  -   在 *最新数据* 中检查天气数据的结果：   ![](../../../../../assets/en/manual/config/items/itemtypes/example4_d.png){width="600"}

en-us	##### Example 4  Someone is downloading a large file from the Internet.  Use of function min:      min(/www.example.com/net.if.in[eth0,bytes],5m)>100K  The expression is true when number of received bytes on eth0 is more than 100 KB within last 5 minutes.
zh-cn	##### 示例 4  服务器网卡从 Internet 下载一个大文件。  min 函数的使用：      min(/www.example.com/net.if.in[eth0,bytes],5m)>100K  在过去5分钟内，eth0上接收字节数大于100kb时，表达式为true。

en-us	##### Example 4  Synchronize the agent unavailability condition with the item update interval:  -   define {$INTERVAL} macro and use it in the item update interval; -   use {$INTERVAL} as parameter of the agent unavailability trigger:  `nodata(/ca_001/agent.ping,{$INTERVAL})=1`
zh-cn	##### 示例 4  将代理不可用条件与项目更新同步间隔：  - 定义 {$INTERVAL} 宏并在项目更新间隔中使用它； - 使用 {$INTERVAL} 作为代理不可用触发器的参数：  `nodata(/ca_001/agent.ping,{$INTERVAL})=1`

en-us	##### Example 5  An escalation with several operations assigned to one step and custom intervals used. The default operation step duration is 30 minutes.  ![](../../../../../assets/en/manual/config/escalations_e.png){width="600"}  Notifications will be sent as follows:  -   to MySQL administrators at 0:00, 0:30, 1:00, 1:30 after the problem     starts -   to Database manager at 2:00 and 2:10 (and not at 3:00; seeing that     steps 5 and 6 overlap with the next operation, the shorter custom     step duration of 10 minutes in the next operation overrides the     longer step duration of 1 hour tried to set here) -   to Zabbix administrators at 2:00, 2:10, 2:20 after the problem     starts (the custom step duration of 10 minutes working) -   to guest users at 4:00 hours after the problem start (the default     step duration of 30 minutes returning between steps 8 and 11)
zh-cn	##### 例5  将多个操作分配给一个步骤并使用自定义间隔的升级。默认操作步骤持续时间为30分钟。  ![](../../../../../assets/en/manual/config/escalations_e.png){width=“600”}  通知将按如下方式发送：  -在问题开始后的0:00、0:30、1:00、1:30向MySQL管理员发送 -在2:00和2:10（而不是在3:00；看到步骤5和6与下一个操作重叠，下一个操作中10分钟的较短自定义步骤持续时间将覆盖此处尝试设置的1小时的较长步骤持续时间） -在问题开始后的2:00、2:10、2:20向Zabbix管理员发送（自定义步骤持续时间为10分钟） -在问题开始后4:00向来宾用户发送（默认步骤持续时间为30分钟，在步骤8和11之间返回）

en-us	##### Example 5  Average CPU load on all hosts in multiple host groups that have the specific tags.      avg(last_foreach(/*/system.cpu.load?[(group="Servers A" or group="Servers B" or group="Servers C") and (tag="Service:" or tag="Importance:High")]))
zh-cn	##### 示例 5  具有特定标记的多个主机组中所有主机的平均 CPU 负载。      avg(last_foreach(/*/system.cpu.load?[(group="Servers A" or group="Servers B" or group="Servers C") and (tag="Service:" or tag="Importance:High")]))

en-us	##### Example 5  Both nodes of clustered SMTP server are down.  Note use of two different hosts in one expression:      last(/smtp1.example.com/net.tcp.service[smtp])=0 and last(/smtp2.example.com/net.tcp.service[smtp])=0  The expression is true when both SMTP servers are down on both smtp1.example.com and smtp2.example.com.
zh-cn	##### 示例 5   SMTP服务群集的两个节点都停止。  注意在一个表达式中使用两个不同的主机:      last(/smtp1.example.com/net.tcp.service[smtp])=0 and last(/smtp2.example.com/net.tcp.service[smtp])=0  当两个SMTP服务器（smtp1.example.com 和 smtp2.example.com）的smtp服务关闭时为真。

en-us	##### Example 5  Centralize configuration of working hours:  -   create a global {$WORKING\_HOURS} macro equal to `1-5,09:00-18:00`; -   use it in the *Working time* field in *Administration* → *General* →     *GUI*; -   use it in the *When active* field in *Administration* → *User* →     *Media*; -   use it to set up more frequent item polling during working hours:  ![](../../../../assets/en/manual/config/macros/usermacro_example5.png)  -   use it in the *Time period* action condition; -   adjust the working time in *Administration* → *General* → *Macros*,     if needed.
zh-cn	##### 示例 5  集中配置工作时间：  - 创建一个全局 {$WORKING\_HOURS} 宏，等于 `1-5,09:00-18:00`； - 在 *Administration* → *General* → *Working time* 字段中使用它  *图形界面*； - 在 *Administration* → *User* → *When active* 字段中使用它  *媒体*; - 使用它在工作时间设置更频繁的项目轮询：  ![](../../../../assets/en/manual/config/macros/usermacro_example5.png)  - 在*时间段*动作条件下使用； - 在 *Administration* → *General* → *Macros* 中调整工作时间， 如果需要的话。

en-us	##### Example 5  Connecting to Nginx status page and getting its metrics in bulk.  -   Configure Nginx following the [official     guide](https://nginx.ru/en/docs/http/ngx_http_stub_status_module.html).  ```{=html} <!-- --> ``` -   Configure a master item for bulk data collection:  ![](../../../../../assets/en/manual/config/items/itemtypes/example5_a.png)  Sample Nginx stub status output:      Active connections: 1 Active connections:     server accepts handled requests      52 52 52      Reading: 0 Writing: 1 Waiting: 0  The next task is to configure dependent items that extract data.  -   Configure a sample dependent item for requests per second:  ![](../../../../../assets/en/manual/config/items/itemtypes/example5_b.png)  -   Sample dependent item value preprocessing with regular expression     `server accepts handled requests\s+([0-9]+) ([0-9]+) ([0-9]+)`:  ![](../../../../../assets/en/manual/config/items/itemtypes/example5_c.png){width="600"}  -   Check the complete result from stub module in *Latest data*:  ![](../../../../../assets/en/manual/config/items/itemtypes/example5_d.png){width="600"}
zh-cn	 ##### 示例 5  链接Nginx状态页面，批量获取它的指标。  -   根据 [官方指南](https://nginx.ru/en/docs/http/ngx_http_stub_status_module.html)配置NGINX。  ```{=html} <!-- --> ``` -  配置一个主要监控项批量收集数据:   ![](../../../../../assets/en/manual/config/items/itemtypes/example5_a.png)  简单的Nginx状态也输出如下：      Active connections: 1 Active connections:     server accepts handled requests      52 52 52      Reading: 0 Writing: 1 Waiting: 0  下一个任务是任务是配置从属监控项提取数据。  -   配置简单从属监控项名以采集每秒请求数数据：  ![](../../../../../assets/en/manual/config/items/itemtypes/example5_b.png)  -   这个简单从属监控项，需要配置正则表达式预处理步骤     `server accepts handled requests\s+([0-9]+) ([0-9]+) ([0-9]+)`:  ![](../../../../../assets/en/manual/config/items/itemtypes/example5_c.png){width="600"}  -   对所有数据都配置好了从属监控项后，在 *最新数据* 中，可以查看到来自stub模块的完整结果  ![](../../../../../assets/en/manual/config/items/itemtypes/example5_d.png){width="600"}

en-us	##### Example 5  Informing about values from several hosts in a trigger expression.  Message:      Problem name: {TRIGGER.NAME}     Trigger expression: {TRIGGER.EXPRESSION}           1. Item value on {HOST.NAME1}: {ITEM.VALUE1} ({ITEM.NAME1})     2. Item value on {HOST.NAME2}: {ITEM.VALUE2} ({ITEM.NAME2})  When you receive the message, the message will be replaced by something like:      Problem name: Processor load is too high on a local host     Trigger expression: last(/Myhost/system.cpu.load[percpu,avg1])>5 or last(/Myotherhost/system.cpu.load[percpu,avg1])>5      1. Item value on Myhost: 0.83 (Processor load (1 min average per core))     2. Item value on Myotherhost: 5.125 (Processor load (1 min average per core))
zh-cn	##### 示例 5  在触发器表达式中通知来自多个主机的值。  消息：      Problem name: {TRIGGER.NAME}     Trigger expression: {TRIGGER.EXPRESSION}           1. Item value on {HOST.NAME1}: {ITEM.VALUE1} ({ITEM.NAME1})     2. Item value on {HOST.NAME2}: {ITEM.VALUE2} ({ITEM.NAME2})  当收到消息时，将被替换为类似如下内容：      Problem name: Processor load is too high on a local host     Trigger expression: last(/Myhost/system.cpu.load[percpu,avg1])>5 or last(/Myotherhost/system.cpu.load[percpu,avg1])>5      1. Item value on Myhost: 0.83 (Processor load (1 min average per core))     2. Item value on Myotherhost: 5.125 (Processor load (1 min average per core))

en-us	##### Example 6  Calculation used on the latest item value sums of a whole host group.      sum(last_foreach(/*/net.if.out[eth0,bytes]?[group="video"])) / sum(last_foreach(/*/nginx_stat.sh[active]?[group="video"])) 
zh-cn	##### 示例 6  用于计算整个主机组的监控项最新值总和。      sum(last_foreach(/*/net.if.out[eth0,bytes]?[group="video"])) / sum(last_foreach(/*/nginx_stat.sh[active]?[group="video"])) 

en-us	##### Example 6  Receiving details of both the problem event and recovery event in a [recovery](/manual/config/notifications/action/recovery_operations) message:  Message:      Problem:      Event ID: {EVENT.ID}     Event value: {EVENT.VALUE}      Event status: {EVENT.STATUS}      Event time: {EVENT.TIME}     Event date: {EVENT.DATE}     Event age: {EVENT.AGE}     Event acknowledgment: {EVENT.ACK.STATUS}      Event update history: {EVENT.UPDATE.HISTORY}      Recovery:       Event ID: {EVENT.RECOVERY.ID}     Event value: {EVENT.RECOVERY.VALUE}      Event status: {EVENT.RECOVERY.STATUS}      Event time: {EVENT.RECOVERY.TIME}     Event date: {EVENT.RECOVERY.DATE}     Operational data: {EVENT.OPDATA}  When you receive the message, the macros will be replaced by something like:      Problem:      Event ID: 21874     Event value: 1      Event status: PROBLEM      Event time: 13:04:30     Event date: 2018.01.02     Event age: 5m     Event acknowledgment: Yes      Event update history: 2018.01.02 13:05:51 "John Smith (Admin)"     Actions: acknowledged.      Recovery:       Event ID: 21896     Event value: 0      Event status: OK      Event time: 13:10:07     Event date: 2018.01.02     Operational data: Current value is 0.83  ::: noteimportant Separate notification macros for the original problem event and recovery event are supported since Zabbix 2.2.0. :::
zh-cn	##### 示例 6  在同一个[恢复](/manual/config/notifications/action/recovery_operations)消息中接收故障事件和恢复事件的详情：  消息：      Problem:      Event ID: {EVENT.ID}     Event value: {EVENT.VALUE}      Event status: {EVENT.STATUS}      Event time: {EVENT.TIME}     Event date: {EVENT.DATE}     Event age: {EVENT.AGE}     Event acknowledgment: {EVENT.ACK.STATUS}      Event update history: {EVENT.UPDATE.HISTORY}      Recovery:       Event ID: {EVENT.RECOVERY.ID}     Event value: {EVENT.RECOVERY.VALUE}      Event status: {EVENT.RECOVERY.STATUS}      Event time: {EVENT.RECOVERY.TIME}     Event date: {EVENT.RECOVERY.DATE}     Operational data: {EVENT.OPDATA}  当收到消息时，宏将被替换为类似如下内容：       Problem:      Event ID: 21874     Event value: 1      Event status: PROBLEM      Event time: 13:04:30     Event date: 2018.01.02     Event age: 5m     Event acknowledgment: Yes      Event update history: 2018.01.02 13:05:51 "John Smith (Admin)"     Actions: acknowledged.      Recovery:       Event ID: 21896     Event value: 0      Event status: OK      Event time: 13:10:07     Event date: 2018.01.02     Operational data: Current value is 0.83  ::: noteimportant 自 Zabbix 2.2.0开始支持原始故障事件和恢复事件单独的通知宏。 :::

en-us	##### Example 6  Use host prototype macro to configure items for discovered hosts:  -   on a host prototype define user macro {$SNMPVALUE} with     {\#SNMPVALUE} [low-level     discovery](/manual/config/macros/lld_macros) macro as a value:  ![](../../../../assets/en/manual/config/macros/usermacro_example6.png)  -   assign *Generic SNMPv2* template to the host prototype; -   use {$SNMPVALUE} in the *SNMP OID* field of *Generic SNMPv2*     template items.
zh-cn	##### 示例 6  使用主机原型宏为发现的主机配置项目：  - 在主机原型上定义用户宏 {$SNMPVALUE}和{\#SNMPVALUE} [低级发现](/manual/config/macros/lld_macros) 宏作为值：  ![](../../../../assets/en/manual/config/macros/usermacro_example6.png)  - 将 *Generic SNMPv2* 模板分配给主机原型； - 在 *Generic SNMPv2* 的 *SNMP OID* 字段中使用 {$SNMPVALUE} 模板项。

en-us	##### Example 6  Zabbix agent needs to be upgraded.  Use of function find():      find(/example.example.com/agent.version,,"like","beta8")=1  The expression is true if Zabbix agent has version beta8.
zh-cn	##### 示例 6  Zabbix 代理需要升级。 函数 find() 的使用：      find(/example.example.com/agent.version,,"like","beta8")=1  如果 Zabbix 代理的版本为 beta8，则表达式为真。

en-us	##### Example 7  Server is unreachable.      count(/example.example.com/icmpping,30m,,"0")>5  The expression is true if host "example.example.com" is unreachable more than 5 times in the last 30 minutes.
zh-cn	##### 示例 7  服务器无法访问。      count(/example.example.com/icmpping,30m,,"0")>5  如果主机“example.example.com” 在过去 30 分钟内超过 5 次无法访问，则表达式为真。

en-us	##### Example 7  The total number of unsupported items in host group 'Zabbix servers'.      sum(last_foreach(/*/zabbix[host,,items_unsupported]?[group="Zabbix servers"]))
zh-cn	##### 示例 7  主机组“Zabbix servers”中不支持的监控项总数。       sum(last_foreach(/*/zabbix[host,,items_unsupported]?[group="Zabbix servers"]))

en-us	##### Example 8  No heartbeats within last 3 minutes.  Use of function nodata():      nodata(/example.example.com/tick,3m)=1  To make use of this trigger, 'tick' must be defined as a Zabbix [trapper](/manual/config/items/itemtypes/trapper) item. The host should periodically send data for this item using zabbix\_sender. If no data is received within 180 seconds, the trigger value becomes PROBLEM.  *Note* that 'nodata' can be used for any item type.
zh-cn	##### 示例 8  最近 3 分钟内没有心跳。 函数 nodata() 的使用：      nodata(/example.example.com/tick,3m)=1  要使用这个触发器，'tick'必须定义成一个[trapper陷阱器](/manual/config/items/itemtypes/trapper)监控项。主机应该使用zabbix_sender定期发送这个监控项的数据。如果在180秒内没有接收到数据，则触发值变为异常状态。  *注释* ‘nodata’可以在任何类型的监控项中使用。

en-us	##### Example 9  CPU activity at night time.  Use of function time():      min(/Zabbix server/system.cpu.load[all,avg1],5m)>2 and time()>000000 and time()<060000  The trigger may change its status to true only at night (00:00-06:00).
zh-cn	##### 示例 9  夜间的CPU负载  使用time()函数:      min(/Zabbix server/system.cpu.load[all,avg1],5m)>2 and time()>000000 and time()<060000  触发器只能在晚上 (00:00-06:00) 将其状态更改为 true。

en-us	##### Example configuration for Apache      # ..     ProxyPass "/" http://host/zabbix/     ProxyPassReverse "/" http://host/zabbix/     ProxyPassReverseCookiePath /zabbix /     ProxyPassReverseCookieDomain host zabbix.example.com     # ..
zh-cn	#####  Apache 的示例配置      # ..     ProxyPass "/" http://host/zabbix/     ProxyPassReverse "/" http://host/zabbix/     ProxyPassReverseCookiePath /zabbix /     ProxyPassReverseCookieDomain host zabbix.example.com     # ..

en-us	##### Example configuration for nginx      # ..     location / {     # ..     proxy_cookie_path /zabbix /;     proxy_pass http://192.168.0.94/zabbix/;     # ..
zh-cn	 #####  nginx 的示例配置      # ..     location / {     # ..     proxy_cookie_path /zabbix /;     proxy_pass http://192.168.0.94/zabbix/;     # ..

en-us	#### Example  Getting memory usage of *apache* process.  If using this OID syntax:      HOST-RESOURCES-MIB::hrSWRunPerfMem["index","HOST-RESOURCES-MIB::hrSWRunPath", "/usr/sbin/apache2"]  the index number will be looked up here:      ...     HOST-RESOURCES-MIB::hrSWRunPath.5376 = STRING: "/sbin/getty"     HOST-RESOURCES-MIB::hrSWRunPath.5377 = STRING: "/sbin/getty"     HOST-RESOURCES-MIB::hrSWRunPath.5388 = STRING: "/usr/sbin/apache2"     HOST-RESOURCES-MIB::hrSWRunPath.5389 = STRING: "/sbin/sshd"     ...  Now we have the index, 5388. The index will be appended to the data OID in order to receive the value we are interested in:      HOST-RESOURCES-MIB::hrSWRunPerfMem.5388 = INTEGER: 31468 KBytes
zh-cn	#### 示例  获取 *apache* 进程的内存使用率。  如果使用这种OID语法:      HOST-RESOURCES-MIB::hrSWRunPerfMem["index","HOST-RESOURCES-MIB::hrSWRunPath", "/usr/sbin/apache2"]  索引号将在这里查找:      ...     HOST-RESOURCES-MIB::hrSWRunPath.5376 = STRING: "/sbin/getty"     HOST-RESOURCES-MIB::hrSWRunPath.5377 = STRING: "/sbin/getty"     HOST-RESOURCES-MIB::hrSWRunPath.5388 = STRING: "/usr/sbin/apache2"     HOST-RESOURCES-MIB::hrSWRunPath.5389 = STRING: "/sbin/sshd"     ...  现在我们有索引，5388.索引将附加到此数据OID，以便接收我们需要的值：      HOST-RESOURCES-MIB::hrSWRunPerfMem.5388 = INTEGER: 31468 KBytes

en-us	 *Example:*  Problem *Web camera 3 is down* has tags `type:video surveillance`, `floor:1st` and `name:webcam 3` and status *Warning*  The service **Web camera 3** has the only problem tag specified: `name:webcam 3`       ![](../../../assets/en/manual/config/services_example_tags.png){width=600}     Service status will change from *OK* to *Warning* when this problem is detected.   If the service **Web camera 3** had problem tags `name:webcam 3` and `floor:2nd`, its status would not be changed, when the problem is detected, because the conditions are only partially met. 
zh-cn	*示例：*  问题 *Web camera 3 is down* 有标签 `type:video surveillance`， `floor:1st` 和 `name:webcam 3` ，状态为 *Warning*  服务 **Web camera 3** 具有指定的唯一问题标签： `name:webcam 3`       ![](../../../assets/en/manual/config/services_example_tags.png){width=600}     检测到此问题时，服务状态将从 *OK* 变为 *Warning*。  如果服务 **Web camera 3** 有问题标签 `name:webcam 3` 和 `floor:2nd`，则在检测到问题时不会更改其状态，因为仅部分条件满足。

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 参考示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 例如

en-us	### Examples
zh-cn	 ### Examples例如

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 参考示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 参考示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 案例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 参考示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 参考示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	 ### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 参考示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 参考示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 示例

en-us	### Examples
zh-cn	### 参考示例

en-us	### Examples
zh-cn	### 示例

en-us	#### Examples
zh-cn	#### 示例

en-us	#### Examples
zh-cn	#### 示例

en-us	#### Examples
zh-cn	#### 示例

en-us	#### Examples
zh-cn	#### 示例

en-us	#### Examples  
zh-cn	#### 示例

en-us	#### - Examples and dealing with errors  To get a warning when you are about to run out of free disk space on your host you may use a trigger expression like this:      timeleft(/host/vfs.fs.size[/,free],1h,0)}<1h  However, error code -1 may come into play and put your trigger in a problem state. Generally it's good because you get a warning that your predictions don't work correctly and you should look at them more thoroughly to find out why. But sometimes it's bad because -1 can simply mean that there was no data about the host free disk space obtained in the last hour. If you are getting too many false positive alerts consider using more complicated trigger expression [^5]:      timeleft(/host/vfs.fs.size[/,free],1h,0)<1h and timeleft(/host/vfs.fs.size[/,free],1h,0)<>-1  The situation is a bit more difficult with **forecast**. First of all, -1 may or may not put the trigger in a problem state depending on whether you have expression like `forecast(/host/item,(...))<...` or like `forecast(/host/item,(...))>...`  Furthermore, -1 may be a valid forecast if it's normal for the item value to be negative. But probability of this situation in the real world situation is negligible (see [how](/manual/config/triggers/expression) the operator **=** works). So add `... or forecast(/host/item,(...))=-1` or `... and forecast(/host/item,(...))<>-1` if you want or don't want to treat -1 as a problem respectively.  [^1]: For example, a simple trigger like     `timeleft(/host/item,1h,X) < 1h` may go into problem state when the     item value approaches X and then suddenly recover once value X is     reached. If the problem is item value being below X use:     `last(/host/item) < X or timeleft(/host/item,1h,X) < 1h` If the     problem is item value being above X use:     `last(/host/item) > X or timeleft(/host/item,1h,X) < 1h`  [^2]: Polynomial degree can be from 1 to 6, *polynomial1* is equivalent     to *linear*. However, use higher degree polynomials [with     caution](https://en.wikipedia.org/wiki/Runge's_phenomenon). If the     evaluation period contains less points than needed to determine     polynomial coefficients, polynomial degree will be lowered (e.g     *polynomial5* is requested, but there are only 4 points, therefore     *polynomial3* will be fitted).  [^3]: For example fitting *exponential* or *power* functions involves     calculating log() of item values. If data contains zeros or negative     numbers you will get an error since log() is defined for positive     values only.  [^4]: For *linear*, *exponential*, *logarithmic* and *power* fits all     necessary calculations can be written explicitly. For *polynomial*     only *value* can be calculated without any additional steps.     Calculating *avg* involves computing polynomial antiderivative     (analytically). Computing *max*, *min* and *delta* involves     computing polynomial derivative (analytically) and finding its roots     (numerically). Solving f(t) = 0 involves finding polynomial roots     (numerically).  [^5]: But in this case -1 can cause your trigger to recover from the     problem state. To be fully protected use:     `timeleft(/host/vfs.fs.size[/,free],1h,0)<1h and ({TRIGGER.VALUE}=0 and timeleft(/host/vfs.fs.size[/,free],1h,0)<>-1 or {TRIGGER.VALUE}=1)`
zh-cn	#### 5 示例和错误处理  要在主机上的可用磁盘空间即将用完时收到警告，可以使用如下触发器表达式：      timeleft(/host/vfs.fs.size[/,free],1h,0)}<1h  但是，错误代码 -1 可能会发挥作用并使你的触发器处于问题状态。一般来说，你会收到警告说明你的预测无法正常工作，你应该更彻底地查看它们以找出原因。但有时它很糟糕，因为 -1 可能只是意味着没有关于在过去一小时内获得的主机可用磁盘空间的数据。如果您收到太多误报警报，请考虑使用更复杂的触发器表达式 [^5]：      timeleft(/host/vfs.fs.size[/,free],1h,0)<1h and timeleft(/host/vfs.fs.size[/,free],1h,0)<>-1   **forecast**情况有点困难。 首先，-1 可能会或可能不会将触发器置于问题状态，具体取决于您是否有表达式 像`forecast(/host/item,(...))<...`或像 `forecast(/host/item,(...))>...`  此外，如果监控项值为负是正常的，则 -1 可能是有效的预测。但是在现实世界中这种情况的概率可以忽略不计 (看看operator **=**[如何](/manual/config/triggers/expression)工作)。因此，如果您想要或不想分别将 -1 视为问题，可以添加 `... 或 forecast(/host/item,(...))=-1`或`... and forecast(/host/item,(...))<>-1`  [^1]: 例如，一个简单的触发器 `timeleft(/host/item,1h,X) < 1h` 可能会在监控项值接近 X 时进入问题状态，然后在达到值 X 时突然恢复。如果异常时监控项值低于X，请使用：`last(/host/item) < X or timeleft(/host/item,1h,X) < 1h`如果异常时监控项值高于X，请使用： `last(/host/item) > X or timeleft(/host/item,1h,X) < 1h`  [^2]: 多项式次数可以是 1 到 6, *多项式1*等价于*线性*。但是 [请谨慎](https://en.wikipedia.org/wiki/Runge's_phenomenon)使用高次多项式。如果评估周期包含的点数少于确定多项式系数所需的点数，则会降低多项式次数(例如 要求*多项式5*, 但只有4个点，因此将拟合*多项式3* )。  [^3]: 例如，拟合 *指数* 或 *幂* 函数涉及计算监控项值的log() 。如果数据包含零或负数，你将收到错误，因为 log() 仅针对正值定义。  [^4]: 对于*线性*, *指数*, *对数* 和 *幂* 拟合，所有必要的计算都可以明确写出来。对于*多项式*无需任何额外步骤即可计算仅*值* 。计算 *平均* 涉及计算多项式反导数（分析）。计算*最大*, *最小* 和 *增量*涉及计算多项式导数 (解析) 并找到它的根 (数值). 求解 f(t) = 0 涉及找到多项式根（数值）。  [^5]: 但在这种情况下，-1 可能会导致您的触发器从问题状态中恢复。要完全保护使用 ：`timeleft(/host/vfs.fs.size[/,free],1h,0)<1h and ({TRIGGER.VALUE}=0 and timeleft(/host/vfs.fs.size[/,free],1h,0)<>-1 or {TRIGGER.VALUE}=1)`

en-us	#### Examples  **Example 1**      # git checkout 5.4     # docker-compose -f ./docker-compose_v3_alpine_mysql_latest.yaml up -d  The command will download latest Zabbix 5.4 images for each Zabbix component and run them in detach mode.  ::: noteimportant Do not forget to download `.env_<type of component>` files from github.com official Zabbix repository with compose files. :::  **Example 2**      # git checkout 5.4     # docker-compose -f ./docker-compose_v3_ubuntu_mysql_local.yaml up -d  The command will download base image Ubuntu 20.04 (focal), then build Zabbix 5.4 components locally and run them in detach mode.
zh-cn	#### 示例  **示例 1**      # git checkout 5.4     # docker-compose -f ./docker-compose_v3_alpine_mysql_latest.yaml up -d  这个命令将会为每个 Zabbix 组件下载最新的 Zabbix 5.4 image，并以 detach 模式运行。  ::: noteimportant 不要忘记从 github.com 的 Zabbix 官方镜像仓库下载 `.env_<type of component>` 文件和 compose 文件。 :::  **示例 2**      # git checkout 5.4     # docker-compose -f ./docker-compose_v3_ubuntu_mysql_local.yaml up -d  这个命令将会下载基于 Ubuntu 20.04 的 image，并在本地构建 Zabbix 5.4 组件，以 detach 模式运行。

en-us	#### Examples  Examples here illustrate how you can use macros in messages.
zh-cn	#### 示例 此处的示例说明了如何在消息中使用宏。

en-us	#### Examples  Examples of [global scripts](/manual/web_interface/frontend_sections/administration/scripts#configuring_a_global_script) that may be used as remote commands in action operations.
zh-cn	#### 示例  可能在动作的操作中使用的[全局脚本](/manual/web_interface/frontend_sections/administration/scripts#configuring_a_global_script)的示例。

en-us	#### Examples  Here are some code snippets showing how to add Zabbix protocol header to the data you want to send in order  to obtain the packet you should send to Zabbix so that it is interpreted correctly. These code snippets  assume that the data is not larger than 1GB, thus the large packet format is not used.  ##### Python    ```python packet = b"ZBXD\1" + struct.pack("<II", len(data), 0) + data ```  or  ```python def zbx_create_header(plain_data_size, compressed_data_size=None):     protocol = b"ZBXD"     flags = 0x01     if compressed_data_size is None:         datalen = plain_data_size         reserved = 0     else:         flags |= 0x02         datalen = compressed_data_size         reserved = plain_data_size     return protocol + struct.pack("<BII", flags, datalen, reserved)  packet = zbx_create_header(len(data)) + data ```  ##### Perl  ```perl my $packet = "ZBXD\1" . pack("(II)<", length($data), 0) . $data; ```  or  ```perl sub zbx_create_header($;$) {     my $plain_data_size = shift;     my $compressed_data_size = shift;      my $protocol = "ZBXD";     my $flags = 0x01;     my $datalen;     my $reserved;      if (!defined($compressed_data_size))     {         $datalen = $plain_data_size;         $reserved = 0;     }     else     {         $flags |= 0x02;         $datalen = $compressed_data_size;         $reserved = $plain_data_size;     }      return $protocol . chr($flags) . pack("(II)<", $datalen, $reserved); }  my $packet = zbx_create_header(length($data)) . $data; ```  ##### PHP  ```php $packet = "ZBXD\1" . pack("VV", strlen($data), 0) . $data; ```  or  ```php function zbx_create_header($plain_data_size, $compressed_data_size = null) {     $protocol = "ZBXD";     $flags = 0x01;     if (is_null($compressed_data_size))     {         $datalen = $plain_data_size;         $reserved = 0;     }     else     {         $flags |= 0x02;         $datalen = $compressed_data_size;         $reserved = $plain_data_size;     }     return $protocol . chr($flags) . pack("VV", $datalen, $reserved); }  $packet = zbx_create_header(strlen($data)) . $data; ```  ##### Bash    ```bash datalen=$(printf "%08x" ${#data}) datalen="\\x${datalen:6:2}\\x${datalen:4:2}\\x${datalen:2:2}\\x${datalen:0:2}" printf "ZBXD\1${datalen}\0\0\0\0%s" "$data" ```
zh-cn	#### 例子  以下是一些代码片段，展示了如何将 Zabbix 协议标头添加到您要发送的数据中，以便获得您应该发送到 Zabbix 的数据包，从而正确解释它。 这些代码片段假定数据不大于 1GB，因此不使用大数据包格式。  ##### Python  ```python packet = b"ZBXD\1" + struct.pack("<II", len(data), 0) + data ```  or  ```python def zbx_create_header(plain_data_size, compressed_data_size=None):  · protocol = b"ZBXD"  · flags = 0x01  · if compressed_data_size is None:  · datalen = plain_data_size  · reserved = 0  · else:  · flags |= 0x02  · datalen = compressed_data_size  · reserved = plain_data_size  · return protocol + struct.pack("<BII", flags, datalen, reserved)  packet = zbx_create_header(len(data)) + data ```  ##### Perl  ```perl my $packet = "ZBXD\1" . pack("(II)<", length($data), 0) . $data; ```  or  ```perl sub zbx_create_header($;$) {  · my $plain_data_size = shift;  · my $compressed_data_size = shift;   · my $protocol = "ZBXD";  · my $flags = 0x01;  · my $datalen;  · my $reserved;   · if (!defined($compressed_data_size))  · {  · $datalen = $plain_data_size;  · $reserved = 0;  · }  · else  · {  · $flags |= 0x02;  · $datalen = $compressed_data_size;  · $reserved = $plain_data_size;  · }   · return $protocol . chr($flags) . pack("(II)<", $datalen, $reserved); }  my $packet = zbx_create_header(length($data)) . $data; ```  ##### PHP  ```php $packet = "ZBXD\1" . pack("VV", strlen($data), 0) . $data; ```  or  ```php function zbx_create_header($plain_data_size, $compressed_data_size = null) {  · $protocol = "ZBXD";  · $flags = 0x01;  · if (is_null($compressed_data_size))  · {  · $datalen = $plain_data_size;  · $reserved = 0;  · }  · else  · {  · $flags |= 0x02;  · $datalen = $compressed_data_size;  · $reserved = $plain_data_size;  · }  · return $protocol . chr($flags) . pack("VV", $datalen, $reserved); }  $packet = zbx_create_header(strlen($data)) . $data; ```  ##### Bash  ```bash datalen=$(printf "%08x" ${#data}) datalen="\\x${datalen:6:2}\\x${datalen:4:2}\\x${datalen:2:2}\\x${datalen:0:2}" printf "ZBXD\1${datalen}\0\0\0\0%s" "$data" ```

en-us	##### Examples  Numeric (unsigned) value:      {"host":{"host":"Host B","name":"Host B visible"},"groups":["Group X","Group Y","Group Z"],"itemid":3,"name":"Agent availability","clock":1519304285,"ns":123456789,"value":1,"type":3}  Numeric (float) value:      {"host":{"host":"Host B","name":"Host B visible"},"groups":["Group X","Group Y","Group Z"],"itemid":4,"name":"CPU Load","clock":1519304285,"ns":123456789,"value":0.1,"type":0}  Character, text value:      {"host":{"host":"Host B","name":"Host B visible"},"groups":["Group X","Group Y","Group Z"],"itemid":2,"name":"Agent version","clock":1519304285,"ns":123456789,"value":"3.4.4","type":4}  Log value:      {"host":{"host":"Host A","name":"Host A visible"},"groups":["Group X","Group Y","Group Z"],"itemid":1,"name":"Messages in log file","clock":1519304285,"ns":123456789,"timestamp":1519304285,"source":"","severity":0,"eventid":0,"value":"log file message","type":2}
zh-cn	##### 例  数值（无符号):      {"host":{"host":"Host B","name":"Host B visible"},"groups":["Group X","Group Y","Group Z"],"itemid":3,"name":"Agent availability","clock":1519304285,"ns":123456789,"value":1,"type":3}  数值（浮点数）:      {"host":{"host":"Host B","name":"Host B visible"},"groups":["Group X","Group Y","Group Z"],"itemid":4,"name":"CPU Load","clock":1519304285,"ns":123456789,"value":0.1,"type":0}  字符, 文本:      {"host":{"host":"Host B","name":"Host B visible"},"groups":["Group X","Group Y","Group Z"],"itemid":2,"name":"Agent version","clock":1519304285,"ns":123456789,"value":"3.4.4","type":4}  日志:      {"host":{"host":"Host A","name":"Host A visible"},"groups":["Group X","Group Y","Group Z"],"itemid":1,"name":"Messages in log file","clock":1519304285,"ns":123456789,"timestamp":1519304285,"source":"","severity":0,"eventid":0,"value":"log file message","type":2}

en-us	##### Examples  Numeric (unsigned) value:      {"host":{"host":"Host B","name":"Host B visible"},"groups":["Group X","Group Y","Group Z"],"itemid":3,"name":"Agent availability","clock":1519311600,"count":60,"min":1,"avg":1,"max":1,"type":3}  Numeric (float) value:      {"host":{"host":"Host B","name":"Host B visible"},"groups":["Group X","Group Y","Group Z"],"itemid":4,"name":"CPU Load","clock":1519311600,"count":60,"min":0.01,"avg":0.15,"max":1.5,"type":0}
zh-cn	##### 例  数值（无符号）:      {"host":{"host":"Host B","name":"Host B visible"},"groups":["Group X","Group Y","Group Z"],"itemid":3,"name":"Agent availability","clock":1519311600,"count":60,"min":1,"avg":1,"max":1,"type":3}  数值（浮点数）:      {"host":{"host":"Host B","name":"Host B visible"},"groups":["Group X","Group Y","Group Z"],"itemid":4,"name":"CPU Load","clock":1519311600,"count":60,"min":0.01,"avg":0.15,"max":1.5,"type":0}

en-us	 ##### Examples of correct/incorrect syntax  Expressions (including function calls) cannot be used as history, trend, or foreach [function](/manual/appendix/functions) parameters. However, those functions themselves can be used in other (non-historical) function parameters.  |Expression|Example| |-|---------| |Valid|`avg(last(/host/key1),last(/host/key2)*10,last(/host/key1)*100)`<br>`max(avg(avg_foreach(/*/system.cpu.load?[group="Servers A"],5m)),avg(avg_foreach(/*/system.cpu.load?[group="Servers B"],5m)),avg(avg_foreach(/*/system.cpu.load?[group="Servers C"],5m)))`| |Invalid|`sum(/host/key,10+2)`<br>`sum(/host/key, avg(10,2))`<br>`sum(/host/key,last(/host/key2))`|  Note that in an expression like:      sum(sum_foreach(//resptime[*],5m))/sum(count_foreach(//resptime[*],5m))  it cannot be guaranteed that both parts of the equation will always have the same set of values.  While one part of the expression is evaluated, a new value for the requested period may arrive and  then the other part of the expression will have a different set of values.
zh-cn	 ##### 正确/错误的语法示例  表达式（包括函数调用）不能用作历史、趋势或循环 [函数](/manual/appendix/functions) 参数。 但是，这些函数本身可以在其他（非历史）函数参数中使用。  |表达式|示例| |-|---------| |有效的|`avg(last(/host/key1),last(/host/key2)*10,last(/host/key1)*100)`<br>`max(avg(avg_foreach(/*/system.cpu.load?[group="Servers A"],5m)),avg(avg_foreach(/*/system.cpu.load?[group="Servers B"],5m)),avg(avg_foreach(/*/system.cpu.load?[group="Servers C"],5m)))`| |无效的|`sum(/host/key,10+2)`<br>`sum(/host/key, avg(10,2))`<br>`sum(/host/key,last(/host/key2))`|  请注意，在如下表达式中：   · sum(sum_foreach(//resptime[*],5m))/sum(count_foreach(//resptime[*],5m))  不能保证等式的两个部分始终具有相同的一组值。在计算表达式的一部分时，可能会收到请求期间的新值，然后表达式的另一部分将具有一组不同的值。

en-us	#### Examples of hardware configuration  The table provides examples of hardware configuration, assuming a **Linux/BSD/Unix** platform.  These are size and hardware configuration examples to start with. Each Zabbix installation is unique.  Make sure to benchmark the performance of your Zabbix system in a staging or development environment,  so that you can fully understand your requirements before deploying the Zabbix installation to its  production environment.  |Installation size|Monitored metrics^**1**^|CPU/vCPU cores|Memory<br>(GiB)|Database|Amazon EC2^**2**^| |-|-|-|-|-|-| |Small|1 000|2|8|MySQL Server,<br>Percona Server,<br>MariaDB Server,<br>PostgreSQL|m6i.large/m6g.large| |Medium|10 000|4|16|MySQL Server,<br>Percona Server,<br>MariaDB Server,<br>PostgreSQL|m6i.xlarge/m6g.xlarge| |Large|100 000|16|64|MySQL Server,<br>Percona Server,<br>MariaDB Server,<br>PostgreSQL,<br>Oracle|m6i.4xlarge/m6g.4xlarge| |Very large|1 000 000|32|96|MySQL Server,<br>Percona Server,<br>MariaDB Server,<br>PostgreSQL,<br>Oracle|m6i.8xlarge/m6g.8xlarge|  ^**1**^ 1 metric = 1 item + 1 trigger + 1 graph<br> ^**2**^ Example with Amazon general purpose EC2 instances, using ARM64 or x86_64 architecture, a  proper instance type like Compute/Memory/Storage optimised should be selected during Zabbix  installation evaluation and testing before installing in its production environment.  ::: noteclassic Actual configuration depends on the number of active items and refresh rates very much (see [database size](/manual/installation/requirements#Database_size) section of this page for details). It is highly recommended to run the database on a separate box for large installations. :::
zh-cn	#### 硬件配置示例  该表提供了硬件配置示例，假设是 **Linux/BSD/Unix** 平台。  这些是开始时的大小和硬件配置示例。 每个 Zabbix 安装都是独一无二的。 确保在暂存或开发环境中对 Zabbix 系统的性能进行基准测试，以便在将 Zabbix 安装部署到其生产环境之前充分了解您的要求。  |安装大小|监控指标^**1**^|CPU/vCPU 内核|内存<br>(GiB)|数据库|Amazon EC2^**2**^| |-|-|-|-|-|-| |小|1 000|2|8|MySQL 服务器，<br>Percona 服务器，<br>MariaDB 服务器，<br>PostgreSQL|m6i.large/m6g.large| |中|10 000|4|16|MySQL 服务器，<br>Percona 服务器，<br>MariaDB 服务器，<br>PostgreSQL|m6i.xlarge/m6g.xlarge| |大|100 000|16|64|MySQL 服务器，<br>Percona 服务器，<br>MariaDB 服务器，<br>PostgreSQL，<br>Oracle|m6i.4xlarge/m6g.4xlarge| |非常大|1 000 000|32|96|MySQL 服务器，<br>Percona 服务器，<br>MariaDB 服务器，<br>PostgreSQL，<br>Oracle|m6i.8xlarge/m6g.8xlarge|  ^**1**^ 1 个指标 = 1 个项目 + 1 个触发器 + 1 个图表<br> ^**2**^ Amazon 通用 EC2 实例示例，使用 ARM64 或 x86_64 架构，在 Zabbix 安装评估和测试期间应选择适当的实例类型，如计算/内存/存储优化，然后再安装到其生产环境中。  ::: noteclassic 实际配置很大程度上取决于活动监控项的数量和刷新率（请参阅本节的 [数据库大小](/manual/installation/requirements#Database_size) 部分 详情页）。 对于大型安装，强烈建议在单独的机器上运行数据库。 ::::

en-us	##### Examples of hardware configuration  The table provides several examples of hardware configurations:  |Name|Platform|CPU/Memory|Database|Monitored hosts| |----|--------|----------|--------|---------------| |*Small*|CentOS|Virtual Appliance|MySQL InnoDB|100| |*Medium*|CentOS|2 CPU cores/2GB|MySQL InnoDB|500| |*Large*|RedHat Enterprise Linux|4 CPU cores/8GB|RAID10 MySQL InnoDB or PostgreSQL|>1000| |*Very large*|RedHat Enterprise Linux|8 CPU cores/16GB|Fast RAID10 MySQL InnoDB or PostgreSQL|>10000|  ::: noteclassic Actual configuration depends on the number of active items and refresh rates very much (see [database size](/manual/installation/requirements#Database_size) section of this page for details). It is highly recommended to run the database on a separate box for large installations. :::
zh-cn	##### 硬件资源配置参考  下表提供了几个硬件配置参考：  |名称|平台|CPU/内存|数据库|监控主机数| |----|--------|----------|--------|---------------| |*小*|CentOS|Virtual Appliance|MySQL InnoDB|100| |*中*|CentOS|2 CPU cores/2GB|MySQL InnoDB|500| |*大*|RedHat Enterprise Linux|4 CPU cores/8GB|RAID10 MySQL InnoDB or PostgreSQL|>1000| |*非常大*|RedHat Enterprise Linux|8 CPU cores/16GB|Fast RAID10 MySQL InnoDB or PostgreSQL|>10000|  ::: noteclassic 实际上，Zabbix 环境的配置非常依赖于监控项（主动）和更新间隔。 （查看这个页面的 [数据库大小](/manual/installation/requirements#Database_size) 章节以了解详情）。如果是进行大规模部署，强烈建议将数据库独立部署。 :::

en-us	##### Examples of simple user parameters  A simple command:      UserParameter=ping,echo 1  The agent will always return '1' for an item with 'ping' key.  A more complex example:      UserParameter=mysql.ping,mysqladmin -uroot ping | grep -c alive  The agent will return '1', if MySQL server is alive, '0' - otherwise.
zh-cn	##### 用户自定义参数用例  一个简单的命令：      UserParameter=ping,echo 1  agent 将始终为使用“ping”为key的监控项返回“1”。  一个复杂一些的例子：      UserParameter=mysql.ping,mysqladmin -uroot ping | grep -c alive  如果Mysql服务器是活动状态，agent将返回“1”，否则会返回“0”。

en-us	#### Examples of triggers
zh-cn	#### 触发器示例

en-us	##### Examples  Problem:      {"clock":1519304285,"ns":123456789,"value":1,"name":"Either Zabbix agent is unreachable on Host B or pollers are too busy on Zabbix Server","severity":3,"eventid":42, "hosts":[{"host":"Host B", "name":"Host B visible"},{"host":"Zabbix Server","name":"Zabbix Server visible"}],"groups":["Group X","Group Y","Group Z","Zabbix servers"],"tags":[{"tag":"availability","value":""},{"tag":"data center","value":"Riga"}]}  Recovery:      {"clock":1519304345,"ns":987654321,"value":0,"eventid":43,"p_eventid":42}  Problem (multiple problem event generation):      {"clock":1519304286,"ns":123456789,"value":1,"eventid":43,"name":"Either Zabbix agent is unreachable on Host B or pollers are too busy on Zabbix Server","severity":3,"hosts":[{"host":"Host B", "name":"Host B visible"},{"host":"Zabbix Server","name":"Zabbix Server visible"}],"groups":["Group X","Group Y","Group Z","Zabbix servers"],"tags":[{"tag":"availability","value":""},{"tag":"data center","value":"Riga"}]}      {"clock":1519304286,"ns":123456789,"value":1,"eventid":43,"name":"Either Zabbix agent is unreachable on Host B or pollers are too busy on Zabbix Server","severity":3,"hosts":[{"host":"Host B", "name":"Host B visible"},{"host":"Zabbix Server","name":"Zabbix Server visible"}],"groups":["Group X","Group Y","Group Z","Zabbix servers"],"tags":[{"tag":"availability","value":""},{"tag":"data center","value":"Riga"}]}  Recovery:      {"clock":1519304346,"ns":987654321,"value":0,"eventid":44,"p_eventid":43}      {"clock":1519304346,"ns":987654321,"value":0,"eventid":44,"p_eventid":42}
zh-cn	##### 例  问题:      {"clock":1519304285,"ns":123456789,"value":1,"name":"Either Zabbix agent is unreachable on Host B or pollers are too busy on Zabbix Server","severity":3,"eventid":42, "hosts":[{"host":"Host B", "name":"Host B visible"},{"host":"Zabbix Server","name":"Zabbix Server visible"}],"groups":["Group X","Group Y","Group Z","Zabbix servers"],"tags":[{"tag":"availability","value":""},{"tag":"data center","value":"Riga"}]}  恢复:      {"clock":1519304345,"ns":987654321,"value":0,"eventid":43,"p_eventid":42}  问题（多个问题事件生成）：      {"clock":1519304286,"ns":123456789,"value":1,"eventid":43,"name":"Either Zabbix agent is unreachable on Host B or pollers are too busy on Zabbix Server","severity":3,"hosts":[{"host":"Host B", "name":"Host B visible"},{"host":"Zabbix Server","name":"Zabbix Server visible"}],"groups":["Group X","Group Y","Group Z","Zabbix servers"],"tags":[{"tag":"availability","value":""},{"tag":"data center","value":"Riga"}]}      {"clock":1519304286,"ns":123456789,"value":1,"eventid":43,"name":"Either Zabbix agent is unreachable on Host B or pollers are too busy on Zabbix Server","severity":3,"hosts":[{"host":"Host B", "name":"Host B visible"},{"host":"Zabbix Server","name":"Zabbix Server visible"}],"groups":["Group X","Group Y","Group Z","Zabbix servers"],"tags":[{"tag":"availability","value":""},{"tag":"data center","value":"Riga"}]}  恢复:      {"clock":1519304346,"ns":987654321,"value":0,"eventid":44,"p_eventid":43}      {"clock":1519304346,"ns":987654321,"value":0,"eventid":44,"p_eventid":42}

en-us	### Examples  Request:  ``` {.java} {    "jsonrpc": "2.0",     "method": "autoregistration.get",     "params": {         "output": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "tls_accept": "3"     },     "id": 1 } ```
zh-cn	### 示例  请求：  ```json {    "jsonrpc": "2.0",     "method": "autoregistration.get",     "params": {         "output": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": {         "tls_accept": "3"     },     "id": 1 } ```

en-us	### Examples  Request:  ```json {     "jsonrpc": "2.0",     "method": "authentication.get",     "params": {         "output": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "authentication_type": "0",         "http_auth_enabled": "0",         "http_login_form": "0",         "http_strip_domains": "",         "http_case_sensitive": "1",         "ldap_configured": "0",         "ldap_host": "",         "ldap_port": "389",         "ldap_base_dn": "",         "ldap_search_attribute": "",         "ldap_bind_dn": "",         "ldap_case_sensitive": "1",         "ldap_bind_password": "",         "saml_auth_enabled": "0",         "saml_idp_entityid": "",         "saml_sso_url": "",         "saml_slo_url": "",         "saml_username_attribute": "",         "saml_sp_entityid": "",         "saml_nameid_format": "",         "saml_sign_messages": "0",         "saml_sign_assertions": "0",         "saml_sign_authn_requests": "0",         "saml_sign_logout_requests": "0",         "saml_sign_logout_responses": "0",         "saml_encrypt_nameid": "0",         "saml_encrypt_assertions": "0",         "saml_case_sensitive": "0",         "passwd_min_length": "8",         "passwd_check_rules": "8"     },     "id": 1 } ```
zh-cn	### 示例  请求：  ```json {     "jsonrpc": "2.0",     "method": "authentication.get",     "params": {         "output": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": {         "authentication_type": "0",         "http_auth_enabled": "0",         "http_login_form": "0",         "http_strip_domains": "",         "http_case_sensitive": "1",         "ldap_configured": "0",         "ldap_host": "",         "ldap_port": "389",         "ldap_base_dn": "",         "ldap_search_attribute": "",         "ldap_bind_dn": "",         "ldap_case_sensitive": "1",         "ldap_bind_password": "",         "saml_auth_enabled": "0",         "saml_idp_entityid": "",         "saml_sso_url": "",         "saml_slo_url": "",         "saml_username_attribute": "",         "saml_sp_entityid": "",         "saml_nameid_format": "",         "saml_sign_messages": "0",         "saml_sign_assertions": "0",         "saml_sign_authn_requests": "0",         "saml_sign_logout_requests": "0",         "saml_sign_logout_responses": "0",         "saml_encrypt_nameid": "0",         "saml_encrypt_assertions": "0",         "saml_case_sensitive": "0",         "passwd_min_length": "8",         "passwd_check_rules": "8"     },     "id": 1 } ```

en-us	### Examples  Request:  ```json {     "jsonrpc": "2.0",     "method": "authentication.update",     "params": {         "http_auth_enabled": 1,         "http_case_sensitive": 0,         "http_login_form": 1     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         "http_auth_enabled",         "http_case_sensitive",         "http_login_form"     ],     "id": 1 } ```
zh-cn	### 示例  请求：  ```json {     "jsonrpc": "2.0",     "method": "authentication.update",     "params": {         "http_auth_enabled": 1,         "http_case_sensitive": 0,         "http_login_form": 1     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         "http_auth_enabled",         "http_case_sensitive",         "http_login_form"     ],     "id": 1 } ```

en-us	### Examples  Request:  ```json {     "jsonrpc": "2.0",     "method": "autoregistration.update",     "params": {         "tls_accept": "3",         "tls_psk_identity": "PSK 001",         "tls_psk": "11111595725ac58dd977beef14b97461a7c1045b9a1c923453302c5473193478"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": true,     "id": 1 } ```
zh-cn	### 示例  请求：  ```json {     "jsonrpc": "2.0",     "method": "autoregistration.update",     "params": {         "tls_accept": "3",         "tls_psk_identity": "PSK 001",         "tls_psk": "11111595725ac58dd977beef14b97461a7c1045b9a1c923453302c5473193478"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": true,     "id": 1 } ```

en-us	### Examples  Request:  ```json {     "jsonrpc": "2.0",     "method": "housekeeping.get",     "params": {         "output": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "hk_events_mode": "1",         "hk_events_trigger": "365d",         "hk_events_service": "1d",         "hk_events_internal": "1d",         "hk_events_discovery": "1d",         "hk_events_autoreg": "1d",         "hk_services_mode": "1",         "hk_services": "365d",         "hk_audit_mode": "1",         "hk_audit": "365d",         "hk_sessions_mode": "1",         "hk_sessions": "365d",         "hk_history_mode": "1",         "hk_history_global": "0",         "hk_history": "90d",         "hk_trends_mode": "1",         "hk_trends_global": "0",         "hk_trends": "365d",         "db_extension": "",         "compression_status": "0",         "compress_older": "7d"     },     "id": 1 } ```
zh-cn	### 示例  请求:  ```json {     "jsonrpc": "2.0",     "method": "housekeeping.get",     "params": {         "output": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "hk_events_mode": "1",         "hk_events_trigger": "365d",         "hk_events_service": "1d",         "hk_events_internal": "1d",         "hk_events_discovery": "1d",         "hk_events_autoreg": "1d",         "hk_services_mode": "1",         "hk_services": "365d",         "hk_audit_mode": "1",         "hk_audit": "365d",         "hk_sessions_mode": "1",         "hk_sessions": "365d",         "hk_history_mode": "1",         "hk_history_global": "0",         "hk_history": "90d",         "hk_trends_mode": "1",         "hk_trends_global": "0",         "hk_trends": "365d",         "db_extension": "",         "compression_status": "0",         "compress_older": "7d"     },     "id": 1 } ```

en-us	### Examples  Request:  ```json {     "jsonrpc": "2.0",     "method": "housekeeping.update",     "params": {         "hk_events_mode": "1",         "hk_events_trigger": "200d",         "hk_events_internal": "2d",         "hk_events_discovery": "2d"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         "hk_events_mode",         "hk_events_trigger",         "hk_events_internal",         "hk_events_discovery"     ],     "id": 1 } ```
zh-cn	### 示例  请求:  ```json {     "jsonrpc": "2.0",     "method": "housekeeping.update",     "params": {         "hk_events_mode": "1",         "hk_events_trigger": "200d",         "hk_events_internal": "2d",         "hk_events_discovery": "2d"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": [         "hk_events_mode",         "hk_events_trigger",         "hk_events_internal",         "hk_events_discovery"     ],     "id": 1 } ```

en-us	### Examples  Request:  ```json {     "jsonrpc": "2.0",     "method": "settings.get",     "params": {         "output": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "default_theme": "blue-theme",         "search_limit": "1000",         "max_in_table": "50",         "server_check_interval": "10",         "work_period": "1-5,09:00-18:00",         "show_technical_errors": "0",         "history_period": "24h",         "period_default": "1h",         "max_period": "2y",         "severity_color_0": "97AAB3",         "severity_color_1": "7499FF",         "severity_color_2": "FFC859",         "severity_color_3": "FFA059",         "severity_color_4": "E97659",         "severity_color_5": "E45959",         "severity_name_0": "Not classified",         "severity_name_1": "Information",         "severity_name_2": "Warning",         "severity_name_3": "Average",         "severity_name_4": "High",         "severity_name_5": "Disaster",         "custom_color": "0",         "ok_period": "5m",         "blink_period": "2m",         "problem_unack_color": "CC0000",         "problem_ack_color": "CC0000",         "ok_unack_color": "009900",         "ok_ack_color": "009900",         "problem_unack_style": "1",         "problem_ack_style": "1",         "ok_unack_style": "1",         "ok_ack_style": "1",         "discovery_groupid": "5",         "default_inventory_mode": "-1",         "alert_usrgrpid": "7",         "snmptrap_logging": "1",         "default_lang": "en_GB",         "default_timezone": "system",         "login_attempts": "5",         "login_block": "30s",         "validate_uri_schemes": "1",         "uri_valid_schemes": "http,https,ftp,file,mailto,tel,ssh",         "x_frame_options": "SAMEORIGIN",         "iframe_sandboxing_enabled": "1",         "iframe_sandboxing_exceptions": "",         "max_overview_table_size": "50",         "connect_timeout": "3s",         "socket_timeout": "3s",         "media_type_test_timeout": "65s",         "script_timeout": "60s",         "item_test_timeout": "60s",         "url": "",         "report_test_timeout": "60s",         "auditlog_enabled": "1",         "ha_failover_delay": "1m",         "geomaps_tile_provider": "OpenStreetMap.Mapnik",         "geomaps_tile_url": "",         "geomaps_max_zoom": "0",         "geomaps_attribution": ""     },     "id": 1 } ```
zh-cn	### 示例  请求：  ``` json {     "jsonrpc": "2.0",     "method": "settings.get",     "params": {         "output": "extend"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": {         "default_theme": "blue-theme",         "search_limit": "1000",         "max_in_table": "50",         "server_check_interval": "10",         "work_period": "1-5,09:00-18:00",         "show_technical_errors": "0",         "history_period": "24h",         "period_default": "1h",         "max_period": "2y",         "severity_color_0": "97AAB3",         "severity_color_1": "7499FF",         "severity_color_2": "FFC859",         "severity_color_3": "FFA059",         "severity_color_4": "E97659",         "severity_color_5": "E45959",         "severity_name_0": "Not classified",         "severity_name_1": "Information",         "severity_name_2": "Warning",         "severity_name_3": "Average",         "severity_name_4": "High",         "severity_name_5": "Disaster",         "custom_color": "0",         "ok_period": "5m",         "blink_period": "2m",         "problem_unack_color": "CC0000",         "problem_ack_color": "CC0000",         "ok_unack_color": "009900",         "ok_ack_color": "009900",         "problem_unack_style": "1",         "problem_ack_style": "1",         "ok_unack_style": "1",         "ok_ack_style": "1",         "discovery_groupid": "5",         "default_inventory_mode": "-1",         "alert_usrgrpid": "7",         "snmptrap_logging": "1",         "default_lang": "en_GB",         "default_timezone": "system",         "login_attempts": "5",         "login_block": "30s",         "validate_uri_schemes": "1",         "uri_valid_schemes": "http,https,ftp,file,mailto,tel,ssh",         "x_frame_options": "SAMEORIGIN",         "iframe_sandboxing_enabled": "1",         "iframe_sandboxing_exceptions": "",         "max_overview_table_size": "50",         "connect_timeout": "3s",         "socket_timeout": "3s",         "media_type_test_timeout": "65s",         "script_timeout": "60s",         "item_test_timeout": "60s",         "url": "",         "report_test_timeout": "60s",         "auditlog_enabled": "1",         "ha_failover_delay": "1m",         "geomaps_tile_provider": "OpenStreetMap.Mapnik",         "geomaps_tile_url": "",         "geomaps_max_zoom": "0",         "geomaps_attribution": ""     },     "id": 1 } ```

en-us	### Examples  Request:  ```json {     "jsonrpc": "2.0",     "method": "settings.update",     "params": {         "login_attempts": "1",         "login_block": "1m"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         "login_attempts",         "login_block"     ],     "id": 1 } ```
zh-cn	### 示例  请求：  ```json {     "jsonrpc": "2.0",     "method": "settings.update",     "params": {         "login_attempts": "1",         "login_block": "1m"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         "login_attempts",         "login_block"     ],     "id": 1 } ```

en-us	### Examples  Request:  ```json {     "jsonrpc": "2.0",     "method": "user.checkAuthentication",     "params": {         "sessionid": "673b8ba11562a35da902c66cf5c23fa2"     },     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": {         "userid": "1",         "username": "Admin",         "name": "Zabbix",         "surname": "Administrator",         "url": "",         "autologin": "1",         "autologout": "0",         "lang": "ru_RU",         "refresh": "0",         "theme": "default",         "attempt_failed": "0",         "attempt_ip": "127.0.0.1",         "attempt_clock": "1355919038",         "rows_per_page": "50",         "timezone": "Europe/Riga",         "roleid": "3",         "type": 3,         "sessionid": "673b8ba11562a35da902c66cf5c23fa2"         "debug_mode": 0,         "userip": "127.0.0.1",         "gui_access": 0     },     "id": 1 } ```  ::: noteclassic Response is similar to [User.login](/manual/api/reference/user/login) call response with "userData" parameter set to true (the difference is that user data is retrieved by session id and not by username / password). :::
zh-cn	### 示例  请求:  ```json {     "jsonrpc": "2.0",     "method": "user.checkAuthentication",     "params": {         "sessionid": "673b8ba11562a35da902c66cf5c23fa2"     },     "id": 1 } ```  响应:  ```json {     "jsonrpc": "2.0",     "result": {         "userid": "1",         "username": "Admin",         "name": "Zabbix",         "surname": "Administrator",         "url": "",         "autologin": "1",         "autologout": "0",         "lang": "ru_RU",         "refresh": "0",         "theme": "default",         "attempt_failed": "0",         "attempt_ip": "127.0.0.1",         "attempt_clock": "1355919038",         "rows_per_page": "50",         "timezone": "Europe/Riga",         "roleid": "3",         "type": 3,         "sessionid": "673b8ba11562a35da902c66cf5c23fa2"         "debug_mode": 0,         "userip": "127.0.0.1",         "gui_access": 0     },     "id": 1 } ```  ::: noteclassic "userData" 参数设置为true，返回的响应和调用 [User.login](/manual/api/reference/user/login) 方法返回相似(区别在于通过会话ID检索用户数据，而不是按照用户名/密码检索). :::

en-us	#### Examples  The ways in which macro functions can be used to customize macro values is illustrated in the following examples on received values:  |Received value|Macro|Output| |----|----|----| |`24.3413523`|`{{ITEM.VALUE}.fmtnum(2)}`|`24.34`| |`24.3413523`|`{{ITEM.VALUE}.fmtnum(0)}`|`24`| |`12:36:01`|`{{TIME}.fmttime(%B)}`|`October`| |`12:36:01`|`{{TIME}.fmttime(%d %B,-1M/M)}`|`1 September`| |`123Log line`|`{{ITEM.VALUE}.regsub(^[0-9]+, Problem)}`|`Problem`| |`123 Log line`|`{{ITEM.VALUE}.regsub("^([0-9]+)", "Problem")}`|`Problem`| |`123 Log line`|`{{ITEM.VALUE}.regsub("^([0-9]+)", Problem ID: \1)}`|`Problem ID: 123`| |`Log line`|`{{ITEM.VALUE}.regsub(".*", "Problem ID: \1")}`|''Problem ID: ''| |`MySQL crashed errno 123`|`{{ITEM.VALUE}.regsub("^(\w+).*?([0-9]+)", " Problem ID: \1_\2 ")}`|'' Problem ID: MySQL\_123 ''| |`123 Log line`|`{{ITEM.VALUE}.regsub("([1-9]+", "Problem ID: \1")}`|`*UNKNOWN*` (invalid regular expression)| |`customername_1`|`{{#IFALIAS}.regsub("(.*)_([0-9]+)", \1)}`|`customername`| |`customername_1`|`{{#IFALIAS}.regsub("(.*)_([0-9]+)", \2)}`|`1`| |`customername_1`|`{{#IFALIAS}.regsub("(.*)_([0-9]+", \1)}`|`{{#IFALIAS}.regsub("(.*)_([0-9]+", \1)}` (invalid regular expression)| |`customername_1`|`{$MACRO:"{{#IFALIAS}.regsub(\"(.*)_([0-9]+)\", \1)}"}`|`{$MACRO:"customername"}`| |`customername_1`|`{$MACRO:"{{#IFALIAS}.regsub(\"(.*)_([0-9]+)\", \2)}"}`|`{$MACRO:"1"}`| |`customername_1`|`{$MACRO:"{{#IFALIAS}.regsub(\"(.*)_([0-9]+\", \1)}"}`|`{$MACRO:"{{#M}.regsub(\"(.*)_([0-9]+\", \1)}"}` (invalid regular expression)| |`customername_1`|`"{$MACRO:\"{{#IFALIAS}.regsub(\\"(.*)_([0-9]+)\\", \1)}\"}"`|`"{$MACRO:\"customername\"}"`| |`customername_1`|`"{$MACRO:\"{{#IFALIAS}.regsub(\\"(.*)_([0-9]+)\\", \2)}\"}"`|`"{$MACRO:\"1\"}")`| |`customername_1`|`"{$MACRO:\"{{#IFALIAS}.regsub(\\"(.*)_([0-9]+\\", \1)}\"}"`|`"{$MACRO:\"{{#IFALIAS}.regsub(\\"(.*)_([0-9]+\\", \1)}\"}")` (invalid regular expression)|  ##### Seeing full item values  Long values of resolved {ITEM.VALUE} and {ITEM.LASTVALUE} macros for text/log items are truncated to 20 characters in some frontend locations. To see the full values of these macros you may use macro functions, e.g.:  `{{ITEM.VALUE}.regsub("(.*)", \1)}`<br> `{{ITEM.LASTVALUE}.regsub("(.*)", \1)}`  See also: {ITEM.VALUE} and {ITEM.LASTVALUE} [macro details](/manual/appendix/macros/supported_by_location).
zh-cn	#### 例子  以下示例说明了使用宏函数自定义宏值的方法：  |收到的值|宏变量|输出| |--------------|-----|------| |`24.3413523`|`{{ITEM.VALUE}.fmtnum(2)}`|`24.34`| |`24.3413523`|`{{ITEM.VALUE}.fmtnum(0)}`|`24`| |`12:36:01`|`{{TIME}.fmttime(%B)}`|`October`| |`12:36:01`|`{{TIME}.fmttime(%d %B,-1M/M)}`|`1 September`| |`123Log line`|`{{ITEM.VALUE}.regsub(^[0-9]+, Problem)}`|`Problem`| |`123 Log line`|`{{ITEM.VALUE}.regsub("^([0-9]+)", "Problem")}`|`Problem`| |`123 Log line`|`{{ITEM.VALUE}.regsub("^([0-9]+)", Problem ID: \1)}`|`Problem ID: 123`| |`Log line`|`{{ITEM.VALUE}.regsub(".*", "Problem ID: \1")}`|''Problem ID: ''| |`MySQL crashed errno 123`|`{{ITEM.VALUE}.regsub("^(\w+).*?([0-9]+)", " Problem ID: \1_\2 ")}`|'' Problem ID: MySQL\_123 ''| |`123 Log line`|`{{ITEM.VALUE}.regsub("([1-9]+", "Problem ID: \1")}`|`*UNKNOWN*` (invalid regular expression)| |`customername_1`|`{{#IFALIAS}.regsub("(.*)_([0-9]+)", \1)}`|`customername`| |`customername_1`|`{{#IFALIAS}.regsub("(.*)_([0-9]+)", \2)}`|`1`| |`customername_1`|`{{#IFALIAS}.regsub("(.*)_([0-9]+", \1)}`|`{{#IFALIAS}.regsub("(.*)_([0-9]+", \1)}` (invalid regular expression)| |`customername_1`|`{$MACRO:"{{#IFALIAS}.regsub(\"(.*)_([0-9]+)\", \1)}"}`|`{$MACRO:"customername"}`| |`customername_1`|`{$MACRO:"{{#IFALIAS}.regsub(\"(.*)_([0-9]+)\", \2)}"}`|`{$MACRO:"1"}`| |`customername_1`|`{$MACRO:"{{#IFALIAS}.regsub(\"(.*)_([0-9]+\", \1)}"}`|`{$MACRO:"{{#M}.regsub(\"(.*)_([0-9]+\", \1)}"}` (invalid regular expression)| |`customername_1`|`"{$MACRO:\"{{#IFALIAS}.regsub(\\"(.*)_([0-9]+)\\", \1)}\"}"`|`"{$MACRO:\"customername\"}"`| |`customername_1`|`"{$MACRO:\"{{#IFALIAS}.regsub(\\"(.*)_([0-9]+)\\", \2)}\"}"`|`"{$MACRO:\"1\"}")`| |`customername_1`|`"{$MACRO:\"{{#IFALIAS}.regsub(\\"(.*)_([0-9]+\\", \1)}\"}"`|`"{$MACRO:\"{{#IFALIAS}.regsub(\\"(.*)_([0-9]+\\", \1)}\"}")` (invalid regular expression)|  ##### 查看完整的监控项值  已解析的文本/日志监控项的 {ITEM.VALUE} 和 {ITEM.LASTVALUE} 宏的长值在某些前端位置被截断为 20 个字符。 要查看这些宏的完整值，您可以使用宏函数，例如：  `{{ITEM.VALUE}.regsub("(.*)", \1)}`<br> `{{ITEM.LASTVALUE}.regsub("(.*)", \1)}`  另请参阅：{ITEM.VALUE} 和 {ITEM.LASTVALUE} [宏详细信息](/manual/appendix/macros/supported_by_location)。

en-us	#### Examples  Working hours. Monday - Friday from 9:00 till 18:00:      1-5,09:00-18:00  Working hours plus weekend. Monday - Friday from 9:00 till 18:00 and Saturday, Sunday from 10:00 till 16:00:      1-5,09:00-18:00;6-7,10:00-16:00  
zh-cn	 #### 示例  工作时间。周一至周五 9:00 到18:00：      1-5,09:00-18:00  工作时间加上周末。周一至周五9:00 到18:00 和周六、周日10:00 到 16:00：      1-5,09:00-18:00;6-7,10:00-16:00

en-us	## EXAMPLES  **zabbix\_get -s 127.0.0.1 -p 10050 -k "system.cpu.load\[all,avg1\]"**\ **zabbix\_get -s 127.0.0.1 -p 10050 -k "system.cpu.load\[all,avg1\]" --tls-connect cert --tls-ca-file /home/zabbix/zabbix\_ca\_file --tls-agent-cert-issuer "CN=Signing CA,OU=IT operations,O=Example Corp,DC=example,DC=com" --tls-agent-cert-subject "CN=server1,OU=IT operations,O=Example Corp,DC=example,DC=com" --tls-cert-file /home/zabbix/zabbix\_get.crt --tls-key-file /home/zabbix/zabbix\_get.key\ zabbix\_get -s 127.0.0.1 -p 10050 -k "system.cpu.load\[all,avg1\]" --tls-connect psk --tls-psk-identity "PSK ID Zabbix agentd" --tls-psk-file /home/zabbix/zabbix\_agentd.psk** [ ]{#lbAH}
zh-cn	 ## 示例  **zabbix\_get -s 127.0.0.1 -p 10050 -k "system.cpu.load\[all,avg1\]"**\ **zabbix\_get -s 127.0.0.1 -p 10050 -k "system.cpu.load\[all,avg1\]" --tls-connect cert --tls-ca-file /home/zabbix/zabbix\_ca\_file --tls-agent-cert-issuer "CN=Signing CA,OU=IT operations,O=Example Corp,DC=example,DC=com" --tls-agent-cert-subject "CN=server1,OU=IT operations,O=Example Corp,DC=example,DC=com" --tls-cert-file /home/zabbix/zabbix\_get.crt --tls-key-file /home/zabbix/zabbix\_get.key\ zabbix\_get -s 127.0.0.1 -p 10050 -k "system.cpu.load\[all,avg1\]" --tls-connect psk --tls-psk-identity "PSK ID Zabbix agentd" --tls-psk-file /home/zabbix/zabbix\_agentd.psk** [ ]{#lbAH}

en-us	## EXAMPLES  **zabbix\_js -s script-file.js -p example** [ ]{#lbAG}
zh-cn	 ## 示例  **zabbix\_js -s script-file.js -p example** [ ]{#lbAG}

en-us	## EXAMPLES  **zabbix\_sender -c /etc/zabbix/zabbix\_agentd.conf -k mysql.queries -o 342.45**\     Send **342.45** as the value for **mysql.queries** item of monitored host. Use monitored host and Zabbix server defined in agent configuration file.  **zabbix\_sender -c /etc/zabbix/zabbix\_agentd.conf -s "Monitored Host" -k mysql.queries -o 342.45**\     Send **342.45** as the value for **mysql.queries** item of **Monitored Host** host using Zabbix server defined in agent configuration file.  \ **zabbix\_sender -z 192.168.1.113 -i data\_values.txt**     \ Send values from file **data\_values.txt** to Zabbix server with IP **192.168.1.113**. Host names and keys are defined in the file.  \ **echo "- hw.serial.number 1287872261 SQ4321ASDF" | zabbix\_sender -c /usr/local/etc/zabbix\_agentd.conf -T -i -**\     Send a timestamped value from the commandline to Zabbix server, specified in the agent configuration file. Dash in the input data indicates that hostname also should be used from the same configuration file.  \ **echo '"Zabbix server" trapper.item ""' | zabbix\_sender -z 192.168.1.113 -p 10000 -i -**\     Send empty value of an item to the Zabbix server with IP address **192.168.1.113** on port **10000** from the commandline. Empty values must be indicated by empty double quotes.  **zabbix\_sender -z 192.168.1.113 -s "Monitored Host" -k mysql.queries -o 342.45 --tls-connect cert --tls-ca-file /home/zabbix/zabbix\_ca\_file --tls-cert-file /home/zabbix/zabbix\_agentd.crt --tls-key-file /home/zabbix/zabbix\_agentd.key**\     Send **342.45** as the value for **mysql.queries** item in **Monitored Host** host to server with IP **192.168.1.113** using TLS with certificate.  **zabbix\_sender -z 192.168.1.113 -s "Monitored Host" -k mysql.queries -o 342.45 --tls-connect psk --tls-psk-identity "PSK ID Zabbix agentd" --tls-psk-file /home/zabbix/zabbix\_agentd.psk**\     Send **342.45** as the value for **mysql.queries** item in **Monitored Host** host to server with IP **192.168.1.113** using TLS with pre-shared key (PSK).  [ ]{#lbAI}
zh-cn	  ## 示例  **zabbix\_sender -c /etc/zabbix/zabbix\_agentd.conf -k mysql.queries -o 342.45**\    发送 **342.45** 作为受监视主机的 **mysql.queries** 项的值。使用代理配置文件中定义的受监视主机和 Zabbix 服务器。  **zabbix\_sender -c /etc/zabbix/zabbix\_agentd.conf -s "Monitored Host" -k mysql.queries -o 342.45**\    使用代理配置文件中定义的 Zabbix 服务器发送 **342.45** 作为在前端注册的 **受监视主机** 主机的 **mysql.queries** 项的值。  \ **zabbix\_sender -z 192.168.1.113 -i data\_values.txt**   \ 将值从文件 **data\_values.txt** 发送到 IP 为 **192.168.1.113** 的 Zabbix 服务器。主机名和密钥在文件中定义。   \ **echo "- hw.serial.number 1287872261 SQ4321ASDF" | zabbix\_sender -c /usr/local/etc/zabbix\_agentd.conf -T -i -**\    将带时间戳的值从命令行发送到agent配置文件中指定的 Zabbix 服务器。输入数据中的短划线表示主机名也应从同一使用的配置文件中读取。  \ **echo '"Zabbix server" trapper.item ""' | zabbix\_sender -z 192.168.1.113 -p 10000 -i -**\   从命令行将项目的空值发送到端口 **10000** 上的 IP 地址为 **192.168.1.113** 的 Zabbix 服务器。空值必须由空双引号表示。  **zabbix\_sender -z 192.168.1.113 -s "Monitored Host" -k mysql.queries -o 342.45 --tls-connect cert --tls-ca-file /home/zabbix/zabbix\_ca\_file --tls-cert-file /home/zabbix/zabbix\_agentd.crt --tls-key-file /home/zabbix/zabbix\_agentd.key**\     使用带有证书的 TLS 将 **342.45** 作为 **mysql.queries** 项的值发送到 IP 为 192.168.1.113** 的 IP 主机的服务器。  **zabbix\_sender -z 192.168.1.113 -s "Monitored Host" -k mysql.queries -o 342.45 --tls-connect psk --tls-psk-identity "PSK ID Zabbix agentd" --tls-psk-file /home/zabbix/zabbix\_agentd.psk**\  使用带有预共享密钥 （PSK） 的 TLS 将 **342.45** 作为 **mysql.queries** 项的值发送到 IP 为 IP 为 **192.168.1.113** 的服务器。  [ ]{#lbAI}

en-us	#### Example  The following example demonstrates how to quickly setup VMware monitoring on Zabbix:  -   compile zabbix server with required options (--with-libxml2 and     --with-libcurl) -   set the StartVMwareCollectors option in Zabbix server configuration     file to 1 or more -   create a new host -   set the host macros required for VMware authentication:  ```{=html} <!-- --> ```         {{..:..:assets:en:manual:vm_monitoring:vm_host_macros.png|}}     * Link the host to the VMware service template:          {{..:..:assets:en:manual:vm_monitoring:vm_host_templates.png|}}     * Click on the //Add// button to save the host
zh-cn	#### 示例  以下示例演示了如何在 Zabbix 上快速设置 VMware 监控：  -   使用所需选项（--with-libxml2 和 --with-libcurl）编译 zabbix server -   将 Zabbix server 配置文件中的 StartVMwareCollectors 选项设置为 1 或更多 -   创建一个新主机 -   设置 VMware 身份验证所需的主机宏：  ```{=html} <!-- --> ```         {{..:..:assets:en:manual:vm_monitoring:vm_host_macros.png|}}     * Link the host to the VMware service template:          {{..:..:assets:en:manual:vm_monitoring:vm_host_templates.png|}}     * Click on the //Add// button to save the host        

en-us	##### Example with an inline regex modifier  Use of the following regular expression including an inline modifier (?i) to match the characters "error":      (?i)error  ![regexp\_expr\_3a.png](../../assets/en/manual/regular_expressions/regexp_expr_3a.png)  Chosen *Expression type*: "Result is TRUE". Characters "error" are matched.
zh-cn	##### 使用内联正则表达式修饰符的示例  使用以下正则表达式，包括一个内联修饰符 (?i) 来匹配字符 "error"：      (?i)error  ![regexp\_expr\_3a.png](../../assets/en/manual/regular_expressions/regexp_expr_3a.png)  选择的 *Expression type（表达式类型）*："Result is TRUE（结果为真）"。字符 "error" 被匹配。

en-us	### Example workflow  The following section will walk you through some usage examples in more detail.
zh-cn	### 示例工作流  以下部分将更详细地引导您完成一些用法示例。

en-us	#### Exit code  Before version 2.2 Zabbix agent returned 0 in case of successful exit and 255 in case of failure. Starting from version 2.2 and higher Zabbix agent returns 0 in case of successful exit and 1 in case of failure.
zh-cn	 #### 退出码  在2.2版本之前，Zabbix代理在成功退出时返回0，在失败时返回255。从版本2.2和更高版本开始，Zabbix代理在成功退出时返回0，在失败时返回1。

en-us	#### Exit codes  Starting from version 4.4.8 Zabbix agent 2 can also be compiled with older OpenSSL versions (1.0.1, 1.0.2).  In this case Zabbix provides mutexes for locking in OpenSSL. If a mutex lock or unlock fails then an error message is printed to the standard error stream (STDERR) and Agent 2 exits with return code 2 or 3, respectively.  
zh-cn	#### 退出码  从版本4.4.8开始，Zabbix agent 2也可以用 旧的OpenSSL版本(1.0.1,1.0.2)。  在这种情况下，Zabbix提供了在OpenSSL中锁定的互斥体。如果互斥锁锁定或解锁失败，则错误消息被打印到标准错误流(STDERR)，Agent2退出，返回代码分别为2或3。

en-us	## EXIT STATUS  The exit status is 0 if the values were sent and all of them were successfully processed by server. If data was sent, but processing of at least one of the values failed, the exit status is 2. If data sending failed, the exit status is 1.  [ ]{#lbAH}
zh-cn	 ## 退出状态  如果值已发送且服务器已成功处理所有值，则退出状态为0。如果发送了数据，但至少一个值的处理失败，则退出状态为2。如果数据发送失败，退出状态为1。  [ ]{#lbAH}

en-us	 ### Expandable lists in latest data subfilter  Expandable lists have been introduced in the [latest data](/manual/web_interface/frontend_sections/monitoring/latest_data) subfilter:  -   For each entity group (e.g. tags, hosts) up to 10 rows of entities are now displayed. If there are more entities,  this list can be expanded to a maximum of 1000 entries (the value of SUBFILTER_VALUES_PER_GROUP in [frontend definitions](/manual/web_interface/definitions))  by clicking on a three-dot icon displayed at the end. Previously a non-expandable maximum of 100 entries was the limit.  -   In the list of *Tag values* up to 10 rows of tag names are now displayed. If there are more tag names with values,  this list can be expanded to a maximum of 200 tag names by clicking on a three-dot icon displayed at the bottom.  Previously, a non-expandable maximum of 20 rows with tag names was the limit.  For each tag name up to 10 rows of values are displayed (expandable to 1000 entries  (the value of SUBFILTER_VALUES_PER_GROUP in [frontend definitions](/manual/web_interface/definitions))).
zh-cn	### 在最新的数据过滤器中的扩展列表  在 [latest data](/manual/web_interface/frontend_sections/monitoring/latest_data) 的数据子过滤器找那个引入了可扩展列表:  -   对于每个条目组(例如标签，主机)，最多可以显示10行记录。如果想显示更多的记录条数，通过点击最后显示的三个点图标这个列表可以扩展到最多1000个条目 ( 在 [frontend definitions](/manual/web_interface/definitions) 的SUBFILTER_VALUES_PER_GROUP 的值) 。 by clicking on a three-dot icon displayed at the end. 之前这个上限是 100，而且不可用扩展增加.  -   在 *Tag values* 列表中，现在显示了最多10行 Tag 名称。如果有更多带值的 Tag 名称，通过单击显示在底部的三个点图标，可以将该列表扩展到最多200个 Tag 名称。  在以前，带 Tag 名称的列表条数上限是 20 行，而且不可以扩展。标记名的不可扩展的最多20行是限制。  对于每个Tag 名称，最多显示10行的值 (可扩展到1000个条目 (在 [frontend definitions](/manual/web_interface/definitions)) 中的SUBFILTER_VALUES_PER_GROUP 的值 ).

en-us	#### Export and import  Export and import Zabbix configuration data for configuration backups, migration or large-scale configuration updates.  [Configuration API](/manual/api/reference/configuration)
zh-cn	#### 导入和导出  导出和导入Zabbix配置数据，用于配置备份，迁移或大规模配置更新。  [Configuration API](/manual/api/reference/configuration)

en-us	##### Export format  Data can be exported using the Zabbix web frontend or [Zabbix API](/manual/api/reference/configuration). Supported export formats are YAML, XML and JSON.
zh-cn	 ##### 输出格式  数据可以使用Zabbix web前端或 [Zabbix API](/manual/api/reference/configuration)。 支持的导出格式是YAML, XML和JSON。

en-us	#### Exporting a host  Export the configuration of a host as an XML string.  Request:  ```json {     "jsonrpc": "2.0",     "method": "configuration.export",     "params": {         "options": {             "hosts": [                 "10161"             ]         },         "format": "xml"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<zabbix_export><version>5.4</version><date>2020-03-13T15:31:45Z</date><groups><group><uuid>6f6799aa69e844b4b3918f779f2abf08</uuid><name>Zabbix servers</name></group></groups><hosts><host><host>Export host</host><name>Export host</name><groups><group><name>Zabbix servers</name></group></groups><interfaces><interface><interface_ref>if1</interface_ref></interface></interfaces><items><item><name>Item</name><key>item.key</key><delay>30s</delay><tags><tag><tag>Application</tag><value>CPU</value></tag></tags><valuemap><name>Host status</name></valuemap><interface_ref>if1</interface_ref><request_method>POST</request_method></item></items><valuemaps><valuemap><name>Host status</name><mappings><mapping><value>0</value><newvalue>Up</newvalue></mapping><mapping><value>2</value><newvalue>Unreachable</newvalue></mapping></mappings></valuemap></valuemaps></host></hosts></zabbix_export>\n",     "id": 1 } ```
zh-cn	#### 导出一台主机  以XML形式导出一台主机的配置。  请求：  ```json {     "jsonrpc": "2.0",     "method": "configuration.export",     "params": {         "options": {             "hosts": [                 "10161"             ]         },         "format": "xml"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<zabbix_export><version>5.4</version><date>2020-03-13T15:31:45Z</date><groups><group><uuid>6f6799aa69e844b4b3918f779f2abf08</uuid><name>Zabbix servers</name></group></groups><hosts><host><host>Export host</host><name>Export host</name><groups><group><name>Zabbix servers</name></group></groups><interfaces><interface><interface_ref>if1</interface_ref></interface></interfaces><items><item><name>Item</name><key>item.key</key><delay>30s</delay><tags><tag><tag>Application</tag><value>CPU</value></tag></tags><valuemap><name>Host status</name></valuemap><interface_ref>if1</interface_ref><request_method>POST</request_method></item></items><valuemaps><valuemap><name>Host status</name><mappings><mapping><value>0</value><newvalue>Up</newvalue></mapping><mapping><value>2</value><newvalue>Unreachable</newvalue></mapping></mappings></valuemap></valuemaps></host></hosts></zabbix_export>\n",     "id": 1 } ```

en-us	#### Exporting  To export hosts, do the following:  -   Go to: *Configuration* → *Hosts* -   Mark the checkboxes of the hosts to export -   Click on *Export* below the list  ![](../../../assets/en/manual/xml_export_import/export_hosts.png)  Depending on the selected format, hosts are exported to a local file with a default name:  -   *zabbix\_export\_hosts.yaml* - in YAML export (default option for     export) -   *zabbix\_export\_hosts.xml* - in XML export -   *zabbix\_export\_hosts.json* - in JSON export
zh-cn	 #### 导出  要导出主机，请执行以下操作:  -   前往: *Configuration* → *Hosts* -   标记要导出的主机的复选框 -   单击列表下方的*导出*  ![](../../../assets/en/manual/xml_export_import/export_hosts.png)  根据选定的格式，主机将导出到具有默认名称的本地文件：  -   *zabbix\_export\_hosts.yaml* - 导出YAML格式 (默认导出) -   *zabbix\_export\_hosts.xml* - 导出XML格式 -   *zabbix\_export\_hosts.json* - 导出JSON格式

en-us	#### Exporting  To export media types, do the following:  -   Go to: *Administration* → *Media types* -   Mark the checkboxes of the media types to export -   Click on *Export* below the list  ![](../../../assets/en/manual/xml_export_import/export_mediatypes.png)  Depending on the selected format, media types are exported to a local file with a default name:  -   *zabbix\_export\_mediatypes.yaml* - in YAML export (default option     for export) -   *zabbix\_export\_mediatypes.xml* - in XML export -   *zabbix\_export\_mediatypes.json* - in JSON export
zh-cn	#### 导出时  导出媒体类型，请执行以下操作:  -   前往: *Administration* → *Media types* -   标记要导出的媒介类型的复选框 -   点击列表下面的*导出*  ![](../../../assets/en/manual/xml_export_import/export_mediatypes.png)  根据选择的格式，媒体类型被导出到一个默认名称的本地文件:  -   *zabbix\_export\_mediatypes.yaml* - 在YAML导出(导出的默认选项) -   *zabbix\_export\_mediatypes.xml* - 在XML导出 -   *zabbix\_export\_mediatypes.json* - 在JSON导出

en-us	#### Exporting  To export network maps, do the following:  -   Go to: *Monitoring* → *Maps* -   Mark the checkboxes of the network maps to export -   Click on *Export* below the list  ![](../../../assets/en/manual/xml_export_import/export_maps.png)  Depending on the selected format, maps are exported to a local file with a default name:  -   *zabbix\_export\_maps.yaml* - in YAML export (default option for     export) -   *zabbix\_export\_maps.xml* - in XML export -   *zabbix\_export\_maps.json* - in JSON export
zh-cn	#### 导出时  要导出网络拓扑图时，请执行以下操作:  -   前往: *Monitoring* → *Maps* -   标记要导出的网络拓扑图的复选框 -   点击列表下方的*Export*  ![](../../../assets/en/manual/xml_export_import/export_maps.png)  根据选择的格式，拓扑图被导出到一个默认名称的本地文件:  -   *zabbix\_export\_maps.yaml* -  在YAML导出(导出的默认选项) -   *zabbix\_export\_maps.xml* - 在XML导出 -   *zabbix\_export\_maps.json* - 在JSON导出

en-us	#### Exporting  To export templates, do the following:  -   Go to: *Configuration* → *Templates* -   Mark the checkboxes of the templates to export -   Click on *Export* below the list  ![](../../../assets/en/manual/xml_export_import/export_templates.png)  Depending on the selected format, templates are exported to a local file with a default name:  -   *zabbix\_export\_templates.yaml* - in YAML export (default option     for export) -   *zabbix\_export\_templates.xml* - in XML export -   *zabbix\_export\_templates.json* - in JSON export
zh-cn	 #### 导出时  导出模板的步骤如下:  -   前往: *配置* → *模板* -   标记要导出的模板的复选框 -   点击列表下方的*Export*  ![](../../../assets/en/manual/xml_export_import/export_templates.png)  根据所选择的格式，模板被导出到一个默认名称的本地文件:  -   *zabbix\_export\_templates.yaml* - 在 YAML 中导出 (导出的默认选项) -   *zabbix\_export\_templates.xml* - 在 XML 中导出 -   *zabbix\_export\_templates.json* - 在 JSON 中导出

en-us	#### Exposed metrics  The stats items gather the statistics in bulk and return a JSON, which is the basis for dependent items to get their data from. The following [internal metrics](/manual/config/items/itemtypes/internal) are returned by either of the two items:  -   `zabbix[boottime]` -   `zabbix[hosts]` -   `zabbix[items]` -   `zabbix[items_unsupported]` -   `zabbix[preprocessing_queue]` (server only) -   `zabbix[process,<type>,<mode>,<state>]` (only process type based     statistics) -   `zabbix[rcache,<cache>,<mode>]` -   `zabbix[requiredperformance]` -   `zabbix[triggers]` (server only) -   `zabbix[uptime]` -   `zabbix[vcache,buffer,<mode>]` (server only) -   `zabbix[vcache,cache,<parameter>]` -   `zabbix[version]` -   `zabbix[vmware,buffer,<mode>]` -   `zabbix[wcache,<cache>,<mode>]` ('trends' cache type server only)
zh-cn	 #### 内部指标  状态监控项收集统计信息后返回一个JSON，这是其他依赖监控项从中获取数据的基础。以下[内部指标](/manual/config/items/itemtypes/internal) 的用法：  -   `zabbix[boottime]` -   `zabbix[hosts]` -   `zabbix[items]` -   `zabbix[items_unsupported]` -   `zabbix[preprocessing_queue]` (server only) -   `zabbix[process,<type>,<mode>,<state>]` (only process type based     statistics) -   `zabbix[rcache,<cache>,<mode>]` -   `zabbix[requiredperformance]` -   `zabbix[triggers]` (server only) -   `zabbix[uptime]` -   `zabbix[vcache,buffer,<mode>]` (server only) -   `zabbix[vcache,cache,<parameter>]` -   `zabbix[version]` -   `zabbix[vmware,buffer,<mode>]` -   `zabbix[wcache,<cache>,<mode>]` ('trends' cache type server only)

en-us	 ### Expression macros  {ITEM.KEY<1-9>} macros are now supported inside [expression macros](/manual/config/macros/expression_macros).
zh-cn	### 表达式宏  [表达式宏](/manual/config/macros/expression_macros) 现在支持 {ITEM.KEY<1-9>} 宏。

en-us	#### Expressions with unsupported items and unknown values  Versions before Zabbix 3.2 are very strict about unsupported items in a trigger expression. Any unsupported item in the expression immediately renders trigger value to `Unknown`.  Since Zabbix 3.2 there is a more flexible approach to unsupported items by admitting unknown values into expression evaluation:  -   For the nodata() function, the values are not affected by whether an     item is supported or unsupported. The function is evaluated even if     it refers to an unsupported item. -   Logical expressions with OR and AND can be evaluated to known values     in two cases regardless of unknown operands:     -   "1 `or` Unsupported\_item1.some\_function() `or`         Unsupported\_item2.some\_function() `or` ..." can be evaluated to         '1' (True),     -   "0 `and` Unsupported\_item1.some\_function() `and`         Unsupported\_item2.some\_function() `and` ..." can be evaluated         to '0' (False).\         Zabbix tries to evaluate logical expressions taking unsupported         items as `Unknown` values. In the two cases mentioned above a         known value will be produced; in other cases trigger value will         be `Unknown`. -   If a function evaluation for supported item results in error, the     function value is `Unknown` and it takes part in further expression     evaluation.  Note that unknown values may "disappear" only in logical expressions as described above. In arithmetic expressions unknown values always lead to result `Unknown` (except division by 0).  If a trigger expression with several unsupported items evaluates to `Unknown` the error message in the frontend refers to the last unsupported item evaluated.
zh-cn	#### 不支持项的表达式和未知的值  Zabbix3.2之前的版本对触发器表达式中不支持的监控项非常严格。表达式中的任何不支持的监控项都会立即将触发器值呈现为“未知”。  从Zabbix3.2开始通过将未知值引入到表达式评估中，对不受支持的项有更灵活的方法：  -   对于nodata()函数，监控项是否支持不影响。即使引用不支持的监控项，函数也会评估。 -   具有 OR 和 AND 的逻辑表达式可以计算为已知值 无论未知操作数如何，在两种情况下：     -    "1  `or`  不支持的监控项函数1  `or`  不支持的监控项函数2  `or`  ..." 可以被评估为'1' (True)，     -   "0  `and`  不支持的监控项函数1  `and`  不支持的监控项函数2  `and`  ..." 可以被评估为'0' (False)，       Zabbix试图评估不支持的监控项作为`Unknown`值的逻辑表达式。在上述两种情况下，将产生一个已知值；在其他情况下，触发值将是`Unknown`。 -   如果对受支持监控项的函数评估导致错误，则 函数值为`Unknown`，参与进一步表达 评估。  请注意，未知值可能仅在逻辑表达式中“消失”为 如上所述。在算术表达式中，未知值总是导致 结果“未知”（除以 0 除外）  如果具有多个不受支持的监控项的触发器表达式计算为 `Unknown` ，前端的错误信息指向最后一个评估不支持的监控项。

en-us	 ### Extended SNMP gateway functionality SNMP gateway can now provide information about triggers in a problem state and reveal host information in trigger details.   Additionally, it is now possible to limit the rate of SNMP traps sent by SNMP gateway.   The list of supported OIDs has been extended with a new OID **.10** for a comma-delimited list of trigger hostnames.  New parameters have been added to the SNMP gateway configuration file: - *ProblemBaseOID* - OID of the problem trigger table; - *ProblemMinSeverity* - minimum severity, triggers having lower severity will not be included; - *ProblemHideAck* - if specified, only triggers with unacknowledged problems will be included; - *ProblemTagFilter* - if specified, only triggers with the specified tag name will be included;  - *TrapTimer* - if set, Zabbix will send no more than one trap of the highest severity in the given time frame.  For details, see [Zabbix SNMP Gateway](https://git.zabbix.com/projects/ZT/repos/snmp-gateway/browse/README.md).
zh-cn	### 扩展的 SNMP 网关功能  SNMP 网关现在可以提供有关处于问题状态的触发器的信息，并在触发器详细信息中显示主机信息。  此外，现在可以限制 SNMP 网关发送 SNMP traps 的速率。  支持的 OID 列表已扩展为新的 OID **.10**，用于以逗号分隔的触发器主机名列表。  SNMP 网关配置文件中添加了新参数： - *ProblemBaseOID* - 问题触发表的 OID； - *ProblemMinSeverity* - 最低严重性，不包括严重性较低的触发器； - *ProblemHideAck* - 如果指定，仅包含未确认问题的触发器； - *ProblemTagFilter* - 如果指定，仅包含具有指定标签名称的触发器； - *TrapTimer* - 如果设置，Zabbix 将在给定时间范围内发送不超过一个严重性最高的trap。  有关详细信息，请参阅 [Zabbix SNMP 网关](https://git.zabbix.com/projects/ZT/repos/snmp-gateway/browse/README.md)。

en-us	 ### External MongoDB plugin  MongoDB [plugin](https://git.zabbix.com/projects/AP/repos/mongodb/browse/README.md) is no longer part of Zabbix agent 2 and is now available as a loadable plugin instead. List of supported MongoDB versions has been extended to *2.6-5.3*.   Plugin functionality and set of supported [items](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2#mongodb) haven't change. 
zh-cn	### 扩展 MongoDB 插件  MongoDB [plugin](https://git.zabbix.com/projects/AP/repos/mongodb/browse/README.md) 插件不再是Zabbix agent 2 的一部分，现在是一个可加载的插件. MongoDB支持的版本列表已经扩展到 *2.6-5.3*.   插件功能和支持的 [items](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2#mongodb) 没有改变. 

en-us	 ### External MongoDB plugin  MongoDB [plugin](https://git.zabbix.com/projects/AP/repos/mongodb/browse/README.md) is no longer part of Zabbix agent 2 and is now available as a loadable plugin instead. List of supported MongoDB versions has been extended to *2.6-5.3*.   Plugin functionality and set of supported [items](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2#mongodb) haven't change. 
zh-cn	 ### 外部 MongoDB 插件  MongoDB [插件](https://git.zabbix.com/projects/AP/repos/mongodb/browse/README.md) 现已可以作为可加载的插件使用了，而不再是 Zabbix agent 2 的一部分。支持的MongoDB版本列表已扩展至 *2.6-5.3*。   插件功能及支持的 [监控项](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2#mongodb) 没有改变。

en-us	 ##### External plugin loader Previously, plugins could only be compiled into Zabbix agent 2, which required recompiling the agent every time you need to change the set of available plugins. Now, with the addition of the external plugin loader, plugins don't have to be integrated into the agent 2 directly and can be added as separate external add-ons, thus making the creation process of additional plugins for gathering new monitoring metrics easier.
zh-cn	##### 外部插件加载器  以前，插件只能编译到 Zabbix agent 2 中，每次需要更改可用插件集时都需要重新编译 agent。现在，通过添加外部插件加载器，插件不必直接集成到 agent 2 中，并且可以作为单独的外部插件添加，从而使用于收集新监控指标的附加插件的创建过程更加容易。

en-us	#### Extracting matching part of regular expression  Sometimes we may want to extract only the interesting value from a target file instead of returning the whole line when a regular expression match is found.  Since Zabbix 2.2.0, log items have the ability to extract desired values from matched lines. This is accomplished by the additional **output** parameter in `log` and `logrt` items.  Using the 'output' parameter allows to indicate the "capturing group" of the match that we may be interested in.  So, for example      log[/path/to/the/file,"large result buffer allocation.*Entries: ([0-9]+)",,,,\1]  should allow returning the entry count as found in the content of:      Fr Feb 07 2014 11:07:36.6690 */ Thread Id 1400 (GLEWF) large result     buffer allocation - /Length: 437136/Entries: 5948/Client Ver: >=10/RPC     ID: 41726453/User: AUser/Form: CFG:ServiceLevelAgreement  Only the number will be returned because **\\1** refers to the first and only capturing group: **(\[0-9\]+)**.  And, with the ability to extract and return a number, the value can be used to define triggers.  
zh-cn	#### 提取正则表达式的匹配部分  有时我们可能只想从目标文件中提取感兴趣的值，而不是在找到正则表达式匹配时返回整行。  自Zabbix2.2.0以后，日志监控项能够从匹配的行中提取所需的值。这是在通过`log`和`logrt` 监控项中附加**output**参数来实现的。  使用“output”参数可以指示我们可能感兴趣的匹配的子组。  例如      log[/path/to/the/file,"large result buffer allocation.*Entries: ([0-9]+)",,,,\1]  应该可以返回在以下内容中找到的条目数：      Fr Feb 07 2014 11:07:36.6690 */ Thread Id 1400 (GLEWF) large result     buffer allocation - /Length: 437136/Entries: 5948/Client Ver: >=10/RPC     ID: 41726453/User: AUser/Form: CFG:ServiceLevelAgreement  Zabbix只返回数字的原因是因为**\\1** 定义的，指的是第一个也是唯一的想要的子组：**(\[0-9\]+)**  而且，通过提取和返回数字的能力，该值可用于定义触发器。

en-us	### Failover to standby node  Zabbix will fail over to another node automatically if the active node stops. There  must be at least one node in standby status for the failover to happen.  How fast will the failover be? All nodes update their last access time (and status, if  it is changed) every 5 seconds. So:   -   If the active node shuts down and manages to report its status  as "stopped", another node will take over within **5 seconds**.  -   If the active node shuts down/becomes unavailable without being able to update  its status, standby nodes will wait for the **failover delay** + 5 seconds to take over  The failover delay is configurable, with the supported range between 10 seconds and 15  minutes (one minute by default). To change the failover delay, you may run:  ``` zabbix_server -R ha_set_failover_delay=5m ```
zh-cn	 ### 故障切换到备用节点  如果主节点停止，Zabbix将自动故障转移到另一个节点。 要发生故障转移，必须至少有一个节点处于备用状态。  故障转移会有多快? 所有节点每5秒更新一次他们的最后访问时间(和状态，如果它被更改)。 因此:   -   如果主节点关闭并成功报告其状态为“stopped”，另一个节点将在**5秒内**接管。  -  如果主节点关闭/变得不可用，而无法更新其状态，备用节点将等待**故障转移延迟** + 5秒来接管。  故障转移延迟是可配置的，支持的范围在10秒到15分钟之间(默认为1分钟)。 要修改故障切换延迟，可以执行以下命令:  ``` zabbix_server -R ha_set_failover_delay=5m ```

en-us	 ##### Favorite custom graphs no longer supported    It is no longer possible to add custom graphs to favorites in  *Monitoring* -> *Hosts* -> *Graphs*. After the upgrade any existing custom  graphs will be removed from favorites.   
zh-cn	##### 不再支持收藏的自定义图表    不再可以在 *Monitoring（监控）* -> *Hosts（主机）* -> *Graphs（图形）* 中将自定义图表添加到收藏夹。升级后，任何现有的自定义图表都将从收藏夹中删除。     

en-us	##### Field size limit Maximum field size has been increased for the following fields:  - [Item preprocessing](/manual/config/items/preprocessing#configuration) parameters - [Media type](/manual/config/notifications/media#common-parameters) message
zh-cn	##### 字段大小限制 以下字段的最大字段大小已增加：  - [Item preprocessing（监控项值预处理）](/manual/config/items/preprocessing#configuration) 参数 - [Media type（媒体消息类型）](/manual/config/notifications/media#common-parameters) 

en-us	##### File example  ``` {.php} <?php  return [     'BRAND_LOGO' => './images/custom_logo.png',     'BRAND_LOGO_SIDEBAR' => './images/custom_logo_sidebar.png',     'BRAND_LOGO_SIDEBAR_COMPACT' => './images/custom_logo_sidebar_compact.png',     'BRAND_FOOTER' => '© Zabbix',     'BRAND_HELP_URL' => 'https://www.example.com/help/' ]; ```
zh-cn	##### 示例文件  ``` {.php} <?php  return [    'BRAND_LOGO' => './images/custom_logo.png',    'BRAND_LOGO_SIDEBAR' => './images/custom_logo_sidebar.png',    'BRAND_LOGO_SIDEBAR_COMPACT' => './images/custom_logo_sidebar_compact.png',    'BRAND_FOOTER' => '© Zabbix',    'BRAND_HELP_URL' => 'https://www.example.com/help/' ]; ```

en-us	##### - File locations  -   Configuration files are located in **/etc/zabbix**. -   Zabbix server, proxy and agent logfiles are located in     **/var/log/zabbix**. -   Zabbix frontend is located in **/usr/share/zabbix**. -   Home directory for the user **zabbix** is **/var/lib/zabbix**.
zh-cn	##### - 文件路径  -   配置文件位于 **/etc/zabbix**. -   Zabbix server， proxy 及 agent 的日志文件位于   **/var/log/zabbix**。 -   Zabbix 前端位于 **/usr/share/zabbix**。 -    **zabbix** 用户的 home 目录位于 **/var/lib/zabbix**。

en-us	## FILES  */usr/local/etc/zabbix\_agent2.conf*   Default location of Zabbix agent 2 configuration file (if not modified during compile time).  [ ]{#lbAH}
zh-cn	 ## 文件  */usr/local/etc/zabbix\_agent2.conf*   Zabbix agent 2 配置文件的默认位置（如果在编译时未修改的话）。  [ ]{#lbAH}

en-us	## FILES  */usr/local/etc/zabbix\_agentd.conf*   Default location of Zabbix agent configuration file (if not modified during compile time).  [ ]{#lbAI}
zh-cn	 ## 文件  */usr/local/etc/zabbix\_agentd.conf*   Zabbix agent 配置文件的默认位置（如果在编译时未修改的话）。  [ ]{#lbAI}

en-us	## FILES  */usr/local/etc/zabbix\_proxy.conf*   Default location of Zabbix proxy configuration file (if not modified during compile time).  [ ]{#lbAI}
zh-cn	 ## 文件  */usr/local/etc/zabbix\_proxy.conf*   Zabbix proxy 配置文件的默认位置（如果在编译时未修改的话）。  [ ]{#lbAI}

en-us	## FILES  */usr/local/etc/zabbix\_server.conf*   Default location of Zabbix server configuration file (if not modified during compile time).  [ ]{#lbAI}
zh-cn	 ## 文件  */usr/local/etc/zabbix\_server.conf*   Zabbix proxy 配置文件的默认位置（如果在编译时未修改的话）。  [ ]{#lbAI}

en-us	## FILES  */usr/local/etc/zabbix\_web\_service.conf*   Default location of Zabbix web service configuration file (if not modified during compile time).  [ ]{#lbAG}
zh-cn	## 文件  */usr/local/etc/zabbix\_web\_service.conf*   Zabbix proxy 配置文件的默认位置（如果在编译时未修改的话）。  [ ]{#lbAG}

en-us	##### File system  Because of the trap file implementation, Zabbix needs the file system to support inodes to differentiate files (the information is acquired by a stat() call).
zh-cn	##### 文件系统  由于Trap文件的执行，Zabbix需要文件系统支持inode来区分文件（该信息由stat()调用获取）。

en-us	#### Filter  A filter can be used to generate real items, triggers, and graphs only for entities that match the criteria. The **Filters** tab contains discovery rule filter definitions allowing to filter discovery values:  ![](../../../assets/en/manual/discovery/low_level_discovery/lld_fs_d.png)  |Parameter|Description| |--|--------| |*Type of calculation*|The following options for calculating filters are available:<br>**And** - all filters must be passed;<br>**Or** - enough if one filter is passed;<br>**And/Or** - uses *And* with different macro names and *Or* with the same macro name;<br>**Custom expression** - offers the possibility to define a custom calculation of filters. The formula must include all filters in the list. Limited to 255 symbols.| |*Filters*|The following filter condition operators are available: *matches*, *does not match*, *exists*, *does not exist*.<br>*Matches* and *does not match* operators expect a [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE). For instance, if you are only interested in C:, D:, and E: file systems, you could put {\#FSNAME} into "Macro" and "\^C\|\^D\|\^E" regular expression into "Regular expression" text fields. Filtering is also possible by file system types using {\#FSTYPE} macro (e.g. "\^ext\|\^reiserfs") and by drive types (supported only by Windows agent) using {\#FSDRIVETYPE} macro (e.g., "fixed").<br>You can enter a regular expression or reference a global [regular expression](/manual/regular_expressions) in "Regular expression" field.<br>In order to test a regular expression you can use "grep -E", for example: ````for f in ext2 nfs reiserfs smbfs; do echo $f | grep -E '^ext|^reiserfs' || echo "SKIP: $f"; done```` <br><br> {\#FSDRIVETYPE} macro on Windows is supported since Zabbix **3.0.0**.<br><br>*Exists* and *does not exist* operators allow to filter entities based on the presence or absence of the specified LLD macro in the response (supported since version 5.4.0).<br>Defining several filters is supported since Zabbix **2.4.0**.<br>Note that if a macro from the filter is missing in the response, the found entity will be ignored, unless a "does not exist" condition is specified for this macro.<br><br>A warning will be displayed, if the absence of a macro affects the expression result. For example, if {#B} is missing in:<br>{#A} matches 1 and {#B} matches 2 - will give a warning<br>{#A} matches 1 or {#B} matches 2 - no warning.<br>This flexible warning logic is supported since Zabbix 6.0.11.|  ::: notewarning A mistake or a typo in the regular expression used in the LLD rule (for example, an incorrect "File systems for discovery" regular expression) may cause deletion of thousands of configuration elements, historical values, and events for many hosts.  :::  ::: noteimportant Zabbix database in MySQL must be created as case-sensitive if file system names that differ only by case are to be discovered correctly. :::
zh-cn	#### 过滤器  过滤器可用于生成只匹配过滤条件的监控项、触发器和图表。**过滤器** 选项卡包含自动发现规则的过滤器配置，其可以过滤自动发现的值：  ![](../../../assets/en/manual/discovery/low_level_discovery/lld_fs_d.png)  |参数|描述| |---------|-----------| |*计算类别*|可用的过滤器选项如下:<br>**和** - 必须满足所有过滤条件;<br>**或** - 只需满足其中一条过滤条件即可;<br>**和/或** - 不同宏的名称使用 *和*，相同宏的名称使用 *或* ;<br>**自定义表达式** - 可自定义过滤器的计算公式。公式必须包含列表中的所有过滤器。最大限制255个符号。| |*过滤器*|可用下列过滤器条件操作符: *匹配*, *不匹配*, *存在*, *不存在*.<br>*匹配* 和 *不匹配* 操作符可识别[与Perl兼容的正则表达式](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE). 例如, 如果你只对文件系统 C:, D: 和 E: 感兴趣, 那么可将 {\#FSNAME} 放入 "宏" 然后 将正则表达式 "\^C\|\^D\|\^E" 放入 "正则表达式" 文本区域. 还可通过使用{\#FSTYPE} 宏 (比如. "\^ext\|\^reiserfs") 过滤文件系统类型以及使用 {\#FSDRIVETYPE} 宏 (比如, "fixed")过滤驱动类型 (只支持Windows agent)。<br>可以在 "正则表达式" 区域输入正则表达式或引用全局的 [正则表达式](/manual/regular_expressions)。<br>要测试正则表达式，可以使用"grep -E", 比如: `for f in ext2 nfs reiserfs smbfs; do echo $f \| grep -E '^ext\|^reiserfs' \|\| echo "SKIP: $f"; done`{.bash}{\#FSDRIVETYPE}宏可用于Windows系统上，此特性从Zabbix **3.0.0**开始支持。<br><br>*存在* 和 *不存在* 操作符可以基于响应数据中包含的特定LLD宏(存在或缺失)进行过滤(从5.4.0版本开始支持)。<br>从Zabbix **2.4.0** 版本开始支持定义多个过滤器。<br>|注意，如果响应中检测不到过滤的宏，则发现出来的实体会被忽略，除非为这个宏设置条件"不存在"。<br><br>如果缺少宏会影响表达式结果，则会显示警告。例如，如果{#B}缺失：<br>{#A}匹配 1 和 {#B}匹配 2 - 将发出警告，<br>{#A} 匹配 1 或 {#B}匹配 2 - 没有警告。<br>从Zabbix 6.0.11开始支持这种灵活的告警逻辑。|  ::: 警告 用于LLD规则中的正则表达式中的拼写错误(例如, 一个错误的 "文件系统自动发现" 的正则表达式)可能造成很多个配置项、历史数据以及主机的事件信息被删除。  :::  ::: 重要 如果操作系统名称只能通过区分大小写来正确识别，那么Zabbix的MYSQL数据库必须配置成大小写敏感。 :::

en-us	##### Filter buttons  |   |   | |---|---| |![filter\_apply.png](../../../../../assets/en/manual/web_interface/filter_apply.png)|Apply specified filtering criteria (without saving).| |![filter\_reset.png](../../../../../assets/en/manual/web_interface/filter_reset.png)|Reset current filter and return to saved parameters of the current tab. On the Home tab, this will clear the filter.| |![filter\_save\_as.png](../../../../../assets/en/manual/web_interface/filter_save_as.png)|Save current filter parameters in a new tab. Only available on the *Home* tab.| |![filter\_update.png](../../../../../assets/en/manual/web_interface/filter_update.png)|Replace tab parameters with currently specified parameters. Not available on the *Home* tab.|  
zh-cn	##### Filter buttons  |   |   | |---|---| |![filter\_apply.png](../../../../../assets/en/manual/web_interface/filter_apply.png)|Apply specified filtering criteria (without saving).| |![filter\_reset.png](../../../../../assets/en/manual/web_interface/filter_reset.png)|Reset current filter and return to saved parameters of the current tab. On the Home tab, this will clear the filter.| |![filter\_save\_as.png](../../../../../assets/en/manual/web_interface/filter_save_as.png)|Save current filter parameters in a new tab. Only available on the *Home* tab.| |![filter\_update.png](../../../../../assets/en/manual/web_interface/filter_update.png)|Replace tab parameters with currently specified parameters. Not available on the *Home* tab.|  

en-us	##### Filter buttons  |   |   | |--|--------| |![filter\_apply.png](../../../../../assets/en/manual/web_interface/filter_apply.png)|Apply specified filtering criteria (without saving).| |![filter\_reset.png](../../../../../assets/en/manual/web_interface/filter_reset.png)|Reset current filter and return to saved parameters of the current tab. On the main tab, this will clear the filter.| |![filter\_save\_as.png](../../../../../assets/en/manual/web_interface/filter_save_as.png)|Save current filter parameters in a new tab. Only available on the main tab.| |![filter\_update.png](../../../../../assets/en/manual/web_interface/filter_update.png)|Replace tab parameters with currently specified parameters. Not available on the main tab.|
zh-cn	##### 过滤器按钮  | · | · | |---|---| |![filter\_apply.png](../../../../../assets/en/manual/web_interface/filter_apply.png)|应用指定的过滤器条件（不保存）。| |![filter\_reset.png](../../../../../assets/en/manual/web_interface/filter_reset.png)|重置当前过滤器并返回当前选项卡的已保存参数。在主选项卡上，这将清除过滤器。| |![filter\_save\_as.png](../../../../../assets/en/manual/web_interface/filter_save_as.png)|在新选项卡中保存当前的过滤器参数。只在主选项卡上可用。| |![filter\_update.png](../../../../../assets/en/manual/web_interface/filter_update.png)|将选项卡参数替换为当前指定的参数。在主选项卡上不可用。|

en-us	#### Filter expression  The filter expression is an arithmetical expression in infix notation.  Supported operands:  |Operand|Description|Example| |--|------|------| |`"<text>"`<br>`'<text>'`|Text constant.|'value: \\'1\\''<br>"value: '1'"| |`<number>`|Numeric constant supporting scientific notation.|123| |`<jsonpath starting with $>`|Value referred to by the JSONPath from the input document root node; only definite paths are supported.|$.object.name| |`<jsonpath starting with @>`|Value referred to by the JSONPath from the current object/element; only definite paths are supported.|@.name|  Supported operators:  |Operator|Type|Description|Result| |--|--------|----|----| |`-`|binary|Subtraction.|Number.| |`+`|binary|Addition.|Number.| |`/`|binary|Division.|Number.| |`*`|binary|Multiplication.|Number.| |`==`|binary|Is equal to.|Boolean (1 or 0).| |`!=`|binary|Is not equal to.|Boolean (1 or 0).| |`<`|binary|Is less than.|Boolean (1 or 0).| |`<=`|binary|Is less than or equal to.|Boolean (1 or 0).| |`>`|binary|Is greater than.|Boolean (1 or 0).| |`>=`|binary|Is greater than or equal to.|Boolean (1 or 0).| |`=~`|binary|Matches regular expression.|Boolean (1 or 0).| |`!`|unary|Boolean not.|Boolean (1 or 0).| |`||`|binary|Boolean or.|Boolean (1 or 0).| |`&&`|binary|Boolean and.|Boolean (1 or 0).|
zh-cn	#### 过滤表达式  过滤表达式是固定符号的一种表达式。  支持的操作：  |操作|描述|示例| |-------|-----------|-------| |`"<text>"`<br>`'<text>'`|文本常量。|'value: \\'1\\''<br>"value: '1'"| |`<number>`|支持科学计数法的数值常数。|123| |`<以$开头的jsonpath>`|来自输入文档根节点的JSONPath引用的值； 只支持明确的路径。|$.object.name| |`<以@开头的jsonpath>`|当前对象/元素的JSONPath引用的值； 只支持明确的路径。|@.name|   支持的操作：  |操作|类型|描述|结果| |--------|----|-----------|------| |`-`|二进制|减法|数字| |`+`|二进制|加法|数字| |`/`|二进制|除法|数字| |`*`|二进制|乘法|数字| |`==`|二进制|等于|布尔值（1 或 0）| |`!=`|二进制|不等于|布尔值（1 或 0）| |`<`|二进制|小于|布尔值（1 或 0）| |`<=`|二进制|小于或等于|布尔值（1 或 0）| |`>`|二进制|大于|布尔值（1 或 0）| |`>=`|二进制|大于或等于|布尔值（1 或 0）| |`=~`|二进制|匹配正则表达式|布尔值（1 或 0）| |`!`|一元|非布尔值|布尔值（1 或 0）| |`\|\|`|二进制|布尔值或|布尔值（1 或 0。| |`&&`|二进制|布尔值和|布尔值（1 或 0）|

en-us	##### Filtering by host  In the *by host* mode results can be filtered by a host or by the host group. Specifying a parent host group implicitly selects all nested host groups.
zh-cn	 ##### 按主机过滤  在*按主机*模式中，可以通过主机或者主机组对结果进行过滤。指定父主机组会隐式选择所有嵌套的主机组。

en-us	#### Filtering VMware event log records  Using a regular expression preprocessing to filter unnecessary events of the VMWare event log.  1\. On a working VMWare Hypervisor host check that the event log item `vmware.eventlog[<url>,<mode>]` is present and working properly. Note that the event log item could already be present on the hypervisor if the *Template VM VMWare* template has been linked during the host creation.  2\. On the VMWare Hypervisor host create a [dependent item](/manual/config/items/itemtypes/dependent_items) of 'Log' type and set the event log item as its master.  In the "Preprocessing" tab of the dependent item select the "Matches regular expression" validation option and fill pattern, for example:      ".* logged in .*" - filters all logging events in the event log     "\bUser\s+\K\S+" -  filter only lines with usernames from the event log  ::: noteimportant If the regular expression is not matched then the dependent item becomes unsupported with a corresponding error message. To avoid this mark the "Custom on fail" checkbox and select to discard unmatched value, for example. :::  Another approach that allows using matching groups and output control is to select "Regular expression" option in the "Preprocessing" tab and fill parameters, for example:      pattern: ".*logged in.*", output: "\0" - filters all logging events in the event log     pattern "User (.*?)(?=\ )", output: "\1" - filter only usernames from the event log
zh-cn	#### 过滤VMware事件日志记录  使用正则表达式预处理过滤 VMWare 事件日志的不必要事件。  1\. 在工作的 VMWare Hypervisor 主机上，检查事件日志项 `vmware.eventlog[<url>,<mode>]` 是否存在并且工作正常。 请注意，如果在主机创建期间已链接 *Template VM VMWare* 模板，则事件日志项可能已经存在于管理程序上。  2\. 在 VMWare Hypervisor 主机上创建一个“日志”类型的 [依赖项](/manual/config/items/itemtypes/dependent_items) 并将事件日志项设置为其主项。  在依赖项的“预处理”选项卡中，选择“匹配正则表达式”验证选项和填充模式，例如：      ".* logged in .*" - 过滤事件日志中的所有日志事件     "\bUser\s+\K\S+" -  只筛选事件日志中带有用户名的行  ::: noteimportant 如果正则表达式不匹配，则依赖项变得不受支持，并显示相应的错误消息。为了避免这种情况，请选中“失败时自定义”复选框并选择丢弃不匹配的值。 :::  另一种允许使用匹配组和输出控制的方法是在“预处理”选项卡中选择“正则表达式”选项并设置参数，例如:      pattern: ".*logged in.*", output: "\0" - 过滤事件日志中的每行日志事件     pattern "User (.*?)(?=\ )", output: "\1" - 仅截取事件日志中筛选用户名信息

en-us	 #### Filter settings remembered  In several Monitoring pages (*Problems*, *Hosts*, *Latest data*) the current filter settings are  now remembered in the user profile. When the user opens the page again, the filter settings  will have stayed the same.  Additionally, the marking of a changed (but not saved) favorite filter is now a green dot next  to the filter name, instead of the filter name in italics.
zh-cn	#### 记住过滤器设置  在几个监控页面（*问题*、*主机*、*最新数据*）中，当前的过滤器设置现在被记住在用户配置文件中。 当用户再次打开页面时，过滤器设置将保持不变。  此外，更改（但未保存）收藏过滤器的标记现在是过滤器名称旁边的绿点，而不是斜体的过滤器名称。

en-us	#### Find HTTP agent item  Find HTTP agent item with post body type XML for specific host id.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "hostids": "10255",         "filter": {             "type": "19",             "post_type": "3"         }     },     "id": 3,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "28252",             "type": "19",             "snmp_oid": "",             "hostid": "10255",             "name": "template item",             "key_": "ti",             "delay": "30s",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "localhost",             "query_fields": [                 {                     "mode": "xml"                 }             ],             "posts": "<body>\r\n<![CDATA[{$MACRO}<foo></bar>]]>\r\n</body>",             "status_codes": "200",             "follow_redirects": "0",             "post_type": "3",             "http_proxy": "",             "headers": [],             "retrieve_mode": "1",             "request_method": "3",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "parameters": []         }     ],     "id": 3 } ```
zh-cn	#### 查找 HTTP agent 监控项  查找具有特定主机 id 的 post 正文类型 XML 的 HTTP agent 监控项。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "hostids": "10255",         "filter": {             "type": "19",             "post_type": "3"         }     },     "id": 3,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "28252",             "type": "19",             "snmp_oid": "",             "hostid": "10255",             "name": "template item",             "key_": "ti",             "delay": "30s",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "localhost",             "query_fields": [                 {                     "mode": "xml"                 }             ],             "posts": "<body>\r\n<![CDATA[{$MACRO}<foo></bar>]]>\r\n</body>",             "status_codes": "200",             "follow_redirects": "0",             "post_type": "3",             "http_proxy": "",             "headers": [],             "retrieve_mode": "1",             "request_method": "3",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "parameters": []         }     ],     "id": 3 } ```

en-us	#### Find HTTP agent item  Find HTTP agent item with post body type XML for specific host ID.  Request:  ```json {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "hostids": "10255",         "filter": {             "type": 19,             "post_type": 3         }     },     "id": 3,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "28252",             "type": "19",             "snmp_oid": "",             "hostid": "10255",             "name": "template item",             "key_": "ti",             "delay": "30s",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "localhost",             "query_fields": [                 {                     "mode": "xml"                 }             ],             "posts": "<body>\r\n<![CDATA[{$MACRO}<foo></bar>]]>\r\n</body>",             "status_codes": "200",             "follow_redirects": "0",             "post_type": "3",             "http_proxy": "",             "headers": [],             "retrieve_mode": "1",             "request_method": "3",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "uuid": "",             "state": "0",             "error": "",             "parameters": [],             "lastclock": "0",             "lastns": "0",             "lastvalue": "",             "prevvalue": ""         }     ],     "id": 3 } ```
zh-cn	#### 查找 HTTP agent 监控项  查找具有特定主机 id 的 post 正文类型 XML 的 HTTP agent 监控项。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "hostids": "10255",         "filter": {             "type": "19",             "post_type": "3"         }     },     "id": 3,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "28252",             "type": "19",             "snmp_oid": "",             "hostid": "10255",             "name": "template item",             "key_": "ti",             "delay": "30s",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "localhost",             "query_fields": [                 {                     "mode": "xml"                 }             ],             "posts": "<body>\r\n<![CDATA[{$MACRO}<foo></bar>]]>\r\n</body>",             "status_codes": "200",             "follow_redirects": "0",             "post_type": "3",             "http_proxy": "",             "headers": [],             "retrieve_mode": "1",             "request_method": "3",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "parameters": []         }     ],     "id": 3 } ```

en-us	#### Find HTTP agent item prototype  Find HTTP agent item prototype with request method HEAD for specific host id.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "itemprototype.get",     "params": {         "hostids": "10254",         "filter": {             "type": "19",             "request_method": "3"         }     },     "id": 17,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "28257",             "type": "19",             "snmp_oid": "",             "hostid": "10254",             "name": "discovered",             "key_": "item[{#INAME}]",             "delay": "{#IUPDATE}",             "history": "90d",             "trends": "30d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "28255",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "2",             "interfaceid": "2",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "{#IURL}",             "query_fields": [],             "posts": "",             "status_codes": "",             "follow_redirects": "0",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "3",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "discover": "0",             "parameters": []         }     ],     "id": 17 } ```
zh-cn	#### 查找HTTP代理监控项原型  通过指定主机id的请求头部方法查找HTTP代理监控项原型。  请求:  ``` {.java} {  · "jsonrpc": "2.0",  · "method": "itemprototype.get",  · "params": {  · "hostids": "10254",  · "filter": {  · "type": "19",  · "request_method": "3"  · }  · },  · "id": 17,  · "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  返回:  ``` {.java} {  · "jsonrpc": "2.0",  · "result": [  · {  · "itemid": "28257",  · "type": "19",  · "snmp_oid": "",  · "hostid": "10254",  · "name": "discovered",  · "key_": "item[{#INAME}]",  · "delay": "{#IUPDATE}",  · "history": "90d",  · "trends": "30d",  · "status": "0",  · "value_type": "3",  · "trapper_hosts": "",  · "units": "",  · "formula": "",  · "error": "",  · "logtimefmt": "",  · "templateid": "28255",  · "valuemapid": "0",  · "params": "",  · "ipmi_sensor": "",  · "authtype": "0",  · "username": "",  · "password": "",  · "publickey": "",  · "privatekey": "",  · "flags": "2",  · "interfaceid": "2",  · "description": "",  · "inventory_link": "0",  · "lifetime": "30d",  · "state": "0",  · "evaltype": "0",  · "jmx_endpoint": "",  · "master_itemid": "0",  · "timeout": "3s",  · "url": "{#IURL}",  · "query_fields": [],  · "posts": "",  · "status_codes": "",  · "follow_redirects": "0",  · "post_type": "0",  · "http_proxy": "",  · "headers": [],  · "retrieve_mode": "0",  · "request_method": "3",  · "output_format": "0",  · "ssl_cert_file": "",  · "ssl_key_file": "",  · "ssl_key_password": "",  · "verify_peer": "0",  · "verify_host": "0",  · "allow_traps": "0",  · "discover": "0",  · "parameters": []  · }  · ],  · "id": 17 } ```

en-us	#### Find HTTP agent item prototype  Find HTTP agent item prototype with request method HEAD for specific host ID.  Request:  ```json {     "jsonrpc": "2.0",     "method": "itemprototype.get",     "params": {         "hostids": "10254",         "filter": {             "type": "19",             "request_method": "3"         }     },     "id": 17,     "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "28257",             "type": "19",             "snmp_oid": "",             "hostid": "10254",             "name": "discovered",             "key_": "item[{#INAME}]",             "delay": "{#IUPDATE}",             "history": "90d",             "trends": "30d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "logtimefmt": "",             "templateid": "28255",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "2",             "description": "",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "{#IURL}",             "query_fields": [],             "posts": "",             "status_codes": "",             "follow_redirects": "0",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "3",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "discover": "0",             "uuid": "",             "parameters": []         }     ],     "id": 17 } ```
zh-cn	#### 查找HTTP代理监控项原型  通过指定主机id的请求头部方法查找HTTP代理监控项原型。  请求:  ``` {.java} {  · "jsonrpc": "2.0",  · "method": "itemprototype.get",  · "params": {  · "hostids": "10254",  · "filter": {  · "type": "19",  · "request_method": "3"  · }  · },  · "id": 17,  · "auth": "d678e0b85688ce578ff061bd29a20d3b" } ```  返回:  ``` {.java} {  · "jsonrpc": "2.0",  · "result": [  · {  · "itemid": "28257",  · "type": "19",  · "snmp_oid": "",  · "hostid": "10254",  · "name": "discovered",  · "key_": "item[{#INAME}]",  · "delay": "{#IUPDATE}",  · "history": "90d",  · "trends": "30d",  · "status": "0",  · "value_type": "3",  · "trapper_hosts": "",  · "units": "",  · "formula": "",  · "error": "",  · "logtimefmt": "",  · "templateid": "28255",  · "valuemapid": "0",  · "params": "",  · "ipmi_sensor": "",  · "authtype": "0",  · "username": "",  · "password": "",  · "publickey": "",  · "privatekey": "",  · "flags": "2",  · "interfaceid": "2",  · "description": "",  · "inventory_link": "0",  · "lifetime": "30d",  · "state": "0",  · "evaltype": "0",  · "jmx_endpoint": "",  · "master_itemid": "0",  · "timeout": "3s",  · "url": "{#IURL}",  · "query_fields": [],  · "posts": "",  · "status_codes": "",  · "follow_redirects": "0",  · "post_type": "0",  · "http_proxy": "",  · "headers": [],  · "retrieve_mode": "0",  · "request_method": "3",  · "output_format": "0",  · "ssl_cert_file": "",  · "ssl_key_file": "",  · "ssl_key_password": "",  · "verify_peer": "0",  · "verify_host": "0",  · "allow_traps": "0",  · "discover": "0",  · "parameters": []  · }  · ],  · "id": 17 } ```

en-us	#### Finding dependent item  Find one Dependent item for item with ID "25545".  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": "extend",         "filter": {             "type": "18",             "master_itemid": "25545"         },         "limit": "1"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "25547",             "type": "18",             "snmp_oid": "",             "hostid": "10116",             "name": "Seconds",             "key_": "apache.status.uptime.seconds",             "delay": "0",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "master_itemid": "25545",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "discover": "0",             "parameters": []         }     ],     "id": 1 } ```
zh-cn	#### 查找依赖监控项  查找监控项ID “25545”的依赖监控项。  请求:  ``` {.java} {  · "jsonrpc": "2.0",  · "method": "item.get",  · "params": {  · "output": "extend",  · "filter": {  · "type": "18",  · "master_itemid": "25545"  · },  · "limit": "1"  · },  · "auth": "038e1d7b1735c6a5436ee9eae095879e",  · "id": 1 } ```  Response:  ``` {.java} {  · "jsonrpc": "2.0",  · "result": [  · {  · "itemid": "25547",  · "type": "18",  · "snmp_oid": "",  · "hostid": "10116",  · "name": "Seconds",  · "key_": "apache.status.uptime.seconds",  · "delay": "0",  · "history": "90d",  · "trends": "365d",  · "status": "0",  · "value_type": "3",  · "trapper_hosts": "",  · "units": "",  · "formula": "",  · "error": "",  · "logtimefmt": "",  · "templateid": "0",  · "valuemapid": "0",  · "params": "",  · "ipmi_sensor": "",  · "authtype": "0",  · "username": "",  · "password": "",  · "publickey": "",  · "privatekey": "",  · "flags": "0",  · "interfaceid": "0",  · "description": "",  · "inventory_link": "0",  · "lifetime": "30d",  · "state": "0",  · "evaltype": "0",  · "master_itemid": "25545",  · "jmx_endpoint": "",  · "master_itemid": "0",  · "timeout": "3s",  · "url": "",  · "query_fields": [],  · "posts": "",  · "status_codes": "200",  · "follow_redirects": "1",  · "post_type": "0",  · "http_proxy": "",  · "headers": [],  · "retrieve_mode": "0",  · "request_method": "0",  · "output_format": "0",  · "ssl_cert_file": "",  · "ssl_key_file": "",  · "ssl_key_password": "",  · "verify_peer": "0",  · "verify_host": "0",  · "allow_traps": "0",  · "lastclock": "0",  · "lastns": "0",  · "lastvalue": "0",  · "prevvalue": "0",  · "discover": "0",  · "parameters": []  · }  · ],  · "id": 1 } ```

en-us	#### Finding dependent item  Find one Dependent item for item with ID "25545".  Request:  ```json {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": "extend",         "filter": {             "type": "18",             "master_itemid": "25545"         },         "limit": "1"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "25547",             "type": "18",             "snmp_oid": "",             "hostid": "10116",             "name": "Seconds",             "key_": "apache.status.uptime.seconds",             "delay": "0",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "interfaceid": "0",             "description": "",             "evaltype": "0",             "master_itemid": "25545",             "jmx_endpoint": "",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "discover": "0",             "uuid": "",             "parameters": []         }     ],     "id": 1 } ```
zh-cn	#### 查找依赖监控项  查找监控项ID “25545”的依赖监控项。  请求:  ``` {.java} {  · "jsonrpc": "2.0",  · "method": "item.get",  · "params": {  · "output": "extend",  · "filter": {  · "type": "18",  · "master_itemid": "25545"  · },  · "limit": "1"  · },  · "auth": "038e1d7b1735c6a5436ee9eae095879e",  · "id": 1 } ```  Response:  ``` {.java} {  · "jsonrpc": "2.0",  · "result": [  · {  · "itemid": "25547",  · "type": "18",  · "snmp_oid": "",  · "hostid": "10116",  · "name": "Seconds",  · "key_": "apache.status.uptime.seconds",  · "delay": "0",  · "history": "90d",  · "trends": "365d",  · "status": "0",  · "value_type": "3",  · "trapper_hosts": "",  · "units": "",  · "formula": "",  · "error": "",  · "logtimefmt": "",  · "templateid": "0",  · "valuemapid": "0",  · "params": "",  · "ipmi_sensor": "",  · "authtype": "0",  · "username": "",  · "password": "",  · "publickey": "",  · "privatekey": "",  · "flags": "0",  · "interfaceid": "0",  · "description": "",  · "inventory_link": "0",  · "lifetime": "30d",  · "state": "0",  · "evaltype": "0",  · "master_itemid": "25545",  · "jmx_endpoint": "",  · "master_itemid": "0",  · "timeout": "3s",  · "url": "",  · "query_fields": [],  · "posts": "",  · "status_codes": "200",  · "follow_redirects": "1",  · "post_type": "0",  · "http_proxy": "",  · "headers": [],  · "retrieve_mode": "0",  · "request_method": "0",  · "output_format": "0",  · "ssl_cert_file": "",  · "ssl_key_file": "",  · "ssl_key_password": "",  · "verify_peer": "0",  · "verify_host": "0",  · "allow_traps": "0",  · "lastclock": "0",  · "lastns": "0",  · "lastvalue": "0",  · "prevvalue": "0",  · "discover": "0",  · "parameters": []  · }  · ],  · "id": 1 } ```

en-us	#### Finding dependent items by key  Retrieve all dependent items from host with ID "10116" that have the word "apache" in the key.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": "extend",         "hostids": "10116",         "search": {             "key_": "apache"         },         "filter": {             "type": "18"         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "25550",             "type": "18",             "snmp_oid": "",             "hostid": "10116",             "name": "Days",             "key_": "apache.status.uptime.days",             "delay": "",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "master_itemid": "25545",             "jmx_endpoint": "",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "parameters": []         },         {             "itemid": "25555",             "type": "18",             "snmp_oid": "",             "hostid": "10116",             "name": "Hours",             "key_": "apache.status.uptime.hours",             "delay": "0",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "master_itemid": "25545",             "jmx_endpoint": "",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "parameters": []         }     ],     "id": 1 } ```
zh-cn	#### 按关键字查找依赖监控项  检索目标 ID 为 “10116” 的主机，包含关键字 “apache” 的所有依赖监控项。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": "extend",         "hostids": "10116",         "search": {             "key_": "apache"         },         "filter": {             "type": "18"         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "25550",             "type": "18",             "snmp_oid": "",             "hostid": "10116",             "name": "Days",             "key_": "apache.status.uptime.days",             "delay": "",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "master_itemid": "25545",             "jmx_endpoint": "",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "parameters": []         },         {             "itemid": "25555",             "type": "18",             "snmp_oid": "",             "hostid": "10116",             "name": "Hours",             "key_": "apache.status.uptime.hours",             "delay": "0",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "master_itemid": "25545",             "jmx_endpoint": "",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "parameters": []         }     ],     "id": 1 } ```

en-us	#### Finding dependent items by key  Retrieve all dependent items from host with ID "10116" that have the word "apache" in the key.  Request:  ```json {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": "extend",         "hostids": "10116",         "search": {             "key_": "apache"         },         "filter": {             "type": 18         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "25550",             "type": "18",             "snmp_oid": "",             "hostid": "10116",             "name": "Days",             "key_": "apache.status.uptime.days",             "delay": "0",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "25545",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "uuid": "",             "state": "0",             "error": "",             "parameters": [],             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0"         },         {             "itemid": "25555",             "type": "18",             "snmp_oid": "",             "hostid": "10116",             "name": "Hours",             "key_": "apache.status.uptime.hours",             "delay": "0",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "25545",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "uuid": "",             "state": "0",             "error": "",             "parameters": [],             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0"         }     ],     "id": 1 } ```
zh-cn	#### 按关键字查找依赖监控项  检索目标 ID 为 “10116” 的主机，包含关键字 “apache” 的所有依赖监控项。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": "extend",         "hostids": "10116",         "search": {             "key_": "apache"         },         "filter": {             "type": "18"         }     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "25550",             "type": "18",             "snmp_oid": "",             "hostid": "10116",             "name": "Days",             "key_": "apache.status.uptime.days",             "delay": "",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "master_itemid": "25545",             "jmx_endpoint": "",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "parameters": []         },         {             "itemid": "25555",             "type": "18",             "snmp_oid": "",             "hostid": "10116",             "name": "Hours",             "key_": "apache.status.uptime.hours",             "delay": "0",             "history": "90d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "formula": "",             "error": "",             "logtimefmt": "",             "templateid": "0",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "",             "inventory_link": "0",             "lifetime": "30d",             "state": "0",             "evaltype": "0",             "master_itemid": "25545",             "jmx_endpoint": "",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0",             "parameters": []         }     ],     "id": 1 } ```

en-us	#### Finding items by key  Retrieve all items from host with ID "10084" that have the word "system" in the key and sort them by name.  Request:  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": "extend",         "hostids": "10084",         "search": {             "key_": "system"         },         "sortfield": "name"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "23298",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "Context switches per second",             "key_": "system.cpu.switches",             "delay": "1m",             "history": "7d",             "trends": "365d",             "lastvalue": "2552",             "lastclock": "1351090998",             "prevvalue": "2641",             "state": "0",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "sps",             "error": "",             "logtimefmt": "",             "templateid": "22680",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "lastns": "564054253",             "flags": "0",             "interfaceid": "1",             "description": "",             "inventory_link": "0",             "lifetime": "0s",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         },         {             "itemid": "23299",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "CPU $2 time",             "key_": "system.cpu.util[,idle]",             "delay": "1m",             "history": "7d",             "trends": "365d",             "lastvalue": "86.031879",             "lastclock": "1351090999",             "prevvalue": "85.306944",             "state": "0",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "%",             "error": "",             "logtimefmt": "",             "templateid": "17354",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "lastns": "564256864",             "flags": "0",             "interfaceid": "1",             "description": "The time the CPU has spent doing nothing.",             "inventory_link": "0",             "lifetime": "0s",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         },         {             "itemid": "23300",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "CPU $2 time",             "key_": "system.cpu.util[,interrupt]",             "history": "7d",             "trends": "365d",             "lastvalue": "0.008389",             "lastclock": "1351091000",             "prevvalue": "0.000000",             "state": "0",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "%",             "error": "",             "logtimefmt": "",             "templateid": "22671",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "lastns": "564661387",             "flags": "0",             "interfaceid": "1",             "description": "The amount of time the CPU has been servicing hardware interrupts.",             "inventory_link": "0",             "lifetime": "0s",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         }     ],     "id": 1 } ```
zh-cn	#### 按照关键字查找监控项  检索 ID 为 “10084” 的主机包含关键字 “系统” 一词的所有监控项，并按名称排序。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": "extend",         "hostids": "10084",         "search": {             "key_": "system"         },         "sortfield": "name"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "23298",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "Context switches per second",             "key_": "system.cpu.switches",             "delay": "1m",             "history": "7d",             "trends": "365d",             "lastvalue": "2552",             "lastclock": "1351090998",             "prevvalue": "2641",             "state": "0",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "sps",             "error": "",             "logtimefmt": "",             "templateid": "22680",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "lastns": "564054253",             "flags": "0",             "interfaceid": "1",             "description": "",             "inventory_link": "0",             "lifetime": "0s",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         },         {             "itemid": "23299",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "CPU $2 time",             "key_": "system.cpu.util[,idle]",             "delay": "1m",             "history": "7d",             "trends": "365d",             "lastvalue": "86.031879",             "lastclock": "1351090999",             "prevvalue": "85.306944",             "state": "0",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "%",             "error": "",             "logtimefmt": "",             "templateid": "17354",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "lastns": "564256864",             "flags": "0",             "interfaceid": "1",             "description": "The time the CPU has spent doing nothing.",             "inventory_link": "0",             "lifetime": "0s",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         },         {             "itemid": "23300",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "CPU $2 time",             "key_": "system.cpu.util[,interrupt]",             "history": "7d",             "trends": "365d",             "lastvalue": "0.008389",             "lastclock": "1351091000",             "prevvalue": "0.000000",             "state": "0",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "%",             "error": "",             "logtimefmt": "",             "templateid": "22671",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "lastns": "564661387",             "flags": "0",             "interfaceid": "1",             "description": "The amount of time the CPU has been servicing hardware interrupts.",             "inventory_link": "0",             "lifetime": "0s",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         }     ],     "id": 1 } ```

en-us	#### Finding items by key  Retrieve all items used in triggers specific host ID that have word "system.cpu" in the item key and sort results by name.  Request:  ```json {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": "extend",         "hostids": "10084",         "with_triggers": true,         "search": {             "key_": "system.cpu"         },         "sortfield": "name"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "itemid": "42269",             "type": "18",             "snmp_oid": "",             "hostid": "10084",             "name": "CPU utilization",             "key_": "system.cpu.util",             "delay": "0",             "history": "7d",             "trends": "365d",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "%",             "logtimefmt": "",             "templateid": "42267",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "0",             "description": "CPU utilization in %.",             "inventory_link": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "42264",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "uuid": "",             "state": "0",             "error": "",             "parameters": [],             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0"         },         {             "itemid": "42259",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "Load average (15m avg)",             "key_": "system.cpu.load[all,avg15]",             "delay": "1m",             "history": "7d",             "trends": "365d",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "",             "logtimefmt": "",             "templateid": "42219",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "1",             "description": "",             "inventory_link": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "uuid": "",             "state": "0",             "error": "",             "parameters": [],             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0"         },         {             "itemid": "42249",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "Load average (1m avg)",             "key_": "system.cpu.load[all,avg1]",             "delay": "1m",             "history": "7d",             "trends": "365d",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "",             "logtimefmt": "",             "templateid": "42209",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "1",             "description": "",             "inventory_link": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "uuid": "",             "state": "0",             "error": "",             "parameters": [],             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0"         },         {             "itemid": "42257",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "Load average (5m avg)",             "key_": "system.cpu.load[all,avg5]",             "delay": "1m",             "history": "7d",             "trends": "365d",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "",             "logtimefmt": "",             "templateid": "42217",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "1",             "description": "",             "inventory_link": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "uuid": "",             "state": "0",             "error": "",             "parameters": [],             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0"         },         {             "itemid": "42260",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "Number of CPUs",             "key_": "system.cpu.num",             "delay": "1m",             "history": "7d",             "trends": "365d",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "",             "logtimefmt": "",             "templateid": "42220",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "flags": "0",             "interfaceid": "1",             "description": "",             "inventory_link": "0",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "uuid": "",             "state": "0",             "error": "",             "parameters": [],             "lastclock": "0",             "lastns": "0",             "lastvalue": "0",             "prevvalue": "0"         }     ],     "id": 1 } ```
zh-cn	#### 按照关键字查找监控项  检索 ID 为 “10084” 的主机包含关键字 “系统” 一词的所有监控项，并按名称排序。  请求：  ``` {.java} {     "jsonrpc": "2.0",     "method": "item.get",     "params": {         "output": "extend",         "hostids": "10084",         "search": {             "key_": "system"         },         "sortfield": "name"     },     "auth": "038e1d7b1735c6a5436ee9eae095879e",     "id": 1 } ```  响应：  ``` {.java} {     "jsonrpc": "2.0",     "result": [         {             "itemid": "23298",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "Context switches per second",             "key_": "system.cpu.switches",             "delay": "1m",             "history": "7d",             "trends": "365d",             "lastvalue": "2552",             "lastclock": "1351090998",             "prevvalue": "2641",             "state": "0",             "status": "0",             "value_type": "3",             "trapper_hosts": "",             "units": "sps",             "error": "",             "logtimefmt": "",             "templateid": "22680",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "lastns": "564054253",             "flags": "0",             "interfaceid": "1",             "description": "",             "inventory_link": "0",             "lifetime": "0s",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         },         {             "itemid": "23299",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "CPU $2 time",             "key_": "system.cpu.util[,idle]",             "delay": "1m",             "history": "7d",             "trends": "365d",             "lastvalue": "86.031879",             "lastclock": "1351090999",             "prevvalue": "85.306944",             "state": "0",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "%",             "error": "",             "logtimefmt": "",             "templateid": "17354",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "lastns": "564256864",             "flags": "0",             "interfaceid": "1",             "description": "The time the CPU has spent doing nothing.",             "inventory_link": "0",             "lifetime": "0s",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         },         {             "itemid": "23300",             "type": "0",             "snmp_oid": "",             "hostid": "10084",             "name": "CPU $2 time",             "key_": "system.cpu.util[,interrupt]",             "history": "7d",             "trends": "365d",             "lastvalue": "0.008389",             "lastclock": "1351091000",             "prevvalue": "0.000000",             "state": "0",             "status": "0",             "value_type": "0",             "trapper_hosts": "",             "units": "%",             "error": "",             "logtimefmt": "",             "templateid": "22671",             "valuemapid": "0",             "params": "",             "ipmi_sensor": "",             "authtype": "0",             "username": "",             "password": "",             "publickey": "",             "privatekey": "",             "lastns": "564661387",             "flags": "0",             "interfaceid": "1",             "description": "The amount of time the CPU has been servicing hardware interrupts.",             "inventory_link": "0",             "lifetime": "0s",             "evaltype": "0",             "jmx_endpoint": "",             "master_itemid": "0",             "timeout": "3s",             "url": "",             "query_fields": [],             "posts": "",             "status_codes": "200",             "follow_redirects": "1",             "post_type": "0",             "http_proxy": "",             "headers": [],             "retrieve_mode": "0",             "request_method": "0",             "output_format": "0",             "ssl_cert_file": "",             "ssl_key_file": "",             "ssl_key_password": "",             "verify_peer": "0",             "verify_host": "0",             "allow_traps": "0",             "parameters": []         }     ],     "id": 1 } ```

en-us	#### - Firewall  By default, only the ports listed in the [configuration changes](#firewall_configuration) above are open. To open additional ports, modify "*/etc/sysconfig/iptables*" file and reload firewall rules:      systemctl reload iptables
zh-cn	#### - 防火墙  默认情况下，只有[配置更改](#firewall_configuration) 上列举的端口是开放的。要添加额外的端口，可编辑 "*/etc/sysconfig/iptables*" 文件并重新加载防火墙规则。      systemctl reload iptables

en-us	##### - Firewall configuration  The appliance uses iptables firewall with predefined rules:  -   Opened SSH port (22 TCP); -   Opened Zabbix agent (10050 TCP) and Zabbix trapper (10051 TCP)     ports; -   Opened HTTP (80 TCP) and HTTPS (443 TCP) ports; -   Opened SNMP trap port (162 UDP); -   Opened outgoing connections to NTP port (53 UDP); -   ICMP packets limited to 5 packets per second; -   All other incoming connections are dropped.
zh-cn	##### - 防火墙配置  Appliance 使用 iptables 防火墙预定义了一些规则：  -   开启了 SSH 端口 (22 TCP)； -   开启了 Zabbix agent (10050 TCP) 及 Zabbix trapper (10051 TCP)     端口； -   开启了 HTTP (80 TCP) 及 HTTPS (443 TCP) 端口； -   开启了 SNMP trap 端口 (162 UDP)； -   开启了 连接到 NTP 的端口 (53 UDP)； -   ICMP 数据包限制为每秒 5 个； -   所有其他传入连接都将断开。

en-us	##### - Fit functions  Default `fit` is the *linear* function. But if your monitored system is more complicated you have more options to choose from.  |`fit`|x = f(t)| |-----|--------| |*linear*|x = a + b\*t| |*polynomialN*[^2]|x = a~0~ + a~1~\*t + a~2~\*t^2^ + ... + a~n~\*t^n^| |*exponential*|x = a\*exp(b\*t)| |*logarithmic*|x = a + b\*log(t)| |*power*|x = a\*t^b^|
zh-cn	##### 2.4 拟合函数  默认`fit` 是*线性*函数. 但是，如果你的监控系统更复杂，可以有更多选项。  |`fit`|x = f(t)| |-----|--------| |*线性*|x = a + b\*t| |*多项式*[^2]|x = a~0~ + a~1~\*t + a~2~\*t^2^ + ... + a~n~\*t^n^| |*指数*|x = a\*exp(b\*t)| |*对数*|x = a + b\*log(t)| |*幂*|x = a\*t^b^|

en-us	#### Flexible intervals  Flexible intervals allow to redefine the default update interval for specific time periods. A flexible interval is defined with *Interval* and *Period* where:  -   *Interval* – the update interval for the specified time period -   *Period* – the time period when the flexible interval is active (see     the [time periods](/manual/appendix/time_period) for detailed     description of the *Period* format)  Up to seven flexible intervals can be defined. If multiple flexible intervals overlap, the smallest *Interval* value is used for the overlapping period. Note that if the smallest value of overlapping flexible intervals is '0', no polling will take place. Outside the flexible intervals the default update interval is used.  Note that if the flexible interval equals the length of the period, the item will be checked exactly once. If the flexible interval is greater than the period, the item might be checked once or it might not be checked at all (thus such configuration is not advisable). If the flexible interval is less than the period, the item will be checked at least once.  If the flexible interval is set to '0', the item is not polled during the flexible interval period and resumes polling according to the default *Update interval* once the period is over. Examples:  |Interval|Period|Description| |--|--|------| |10|1-5,09:00-18:00|Item will be checked every 10 seconds during working hours.| |0|1-7,00:00-7:00|Item will not be checked during the night.| |0|7-7,00:00-24:00|Item will not be checked on Sundays.| |60|1-7,12:00-12:01|Item will be checked at 12:00 every day. Note that this was used as a workaround for scheduled checks and starting with Zabbix 3.0 it is recommended to use scheduling intervals for such checks.|
zh-cn	#### 灵活间隔  灵活间隔允许重定义特定时间段的默认更新间隔。灵活的间隔用*间隔*和*期间*进行定义，其中：  -   *间隔* – 在指定时间段内的更新间隔 -   *期间* – 灵活间隔有效的时间段（周期格式请参阅详细说明[时间期间](/zh/manual/appendix/time_period)）  可以定义多达七种灵活的时间间隔。如果多个灵活间隔设置有冲突，则在冲突周期中使用其中最小的*间隔*值。请注意，如果灵活间隔的最小值为“0”，则不会进行轮询。在灵活间隔之外，使用默认更新间隔。  请注意，如果灵活间隔等于周期的长度，则该监控项将被精确检查一次。如果灵活间隔大于周期，则可能会检查该监控项一次，或者完全不检查该监控项（因此不建议这样配置）。如果灵活间隔小于周期，监控项将至少被检查一次。  如果灵活间隔设置为“0”，则在灵活间隔期间不轮询监控项，并在周期结束后根据默认*更新间隔*恢复轮询。示例：  |间隔|周期|描述| |------------|------|-| |10|1-5,09:00-18:00|监控项将在工作时间内每10秒检查一次。| |0|1-7,00:00-7:00|监控项不会在夜间检查。| |0|7-7,00:00-24:00|监控项不会在星期日检查。| |60|1-7,12:00-12:01|监控项将在每天12:00点检查。请注意，这被用作计划检查的变通方法，且从Zabbix 3.0开始建议使用调度间隔来实现。|

en-us	#### Flexible user parameters  Flexible user parameters accept parameters with the key. This way a flexible user parameter can be the basis for creating several items.  Flexible user parameters have the following syntax:      UserParameter=key[*],command  |Parameter|Description| |--|--------| |**Key**|Unique item key. The \[\*\] defines that this key accepts parameters within the brackets.<br>Parameters are given when configuring the item.| |**Command**|Command to be executed to evaluate value of the key.<br>*For flexible user parameters only*:<br>You may use positional references $1…$9 in the command to refer to the respective parameter in the item key.<br>Zabbix parses the parameters enclosed in \[ \] of the item key and substitutes $1,...,$9 in the command accordingly.<br>$0 will be substituted by the original command (prior to expansion of $0,...,$9) to be run.<br>Positional references are interpreted regardless of whether they are enclosed between double (") or single (') quotes.<br>To use positional references unaltered, specify a double dollar sign - for example, awk '{print $$2}'. In this case `$$2` will actually turn into `$2` when executing the command.|  ::: noteimportant Positional references with the $ sign are searched for and replaced by Zabbix agent only for flexible user parameters. For simple user parameters, such reference processing is skipped and, therefore, any $ sign quoting is not necessary. :::  ::: noteimportant Certain symbols are not allowed in user parameters by default. See [UnsafeUserParameters](/manual/appendix/config/zabbix_agentd) documentation for a full list. :::
zh-cn	#### 灵活的用户自定义参数  灵活的用户自定义参数可以从key中接受参数。这是一种使用一个用户自定义参数创建多个监控项的方式。\  灵活的用户自定义参数的语法如下：      UserParameter=key[*],command  |参数   |描述| |-------------------|---------------| |**Key**|唯一的监控项key。 \[\*\] 用于定义该key接受括号内的参数。<br>参数需在配置监控项时给出| |**Command**|命令在执行时，引用key中指定的值<br>*只对灵活的用户参数有效*:<br>你可以在命令中使用位置引用$1 … $9来引用监控项Key中的相应参数。<br>Zabbix解析监控项Key的\[\]中包含的参数，并相应地替换$1，…，$9。<br>$0会替换为完整的原始命令（在对$0，…，$9执行替换之前的命令）运行。<br>不管位置参数（$0,…,$9)是用双引号( " )还是单引号( ' )括起来，都会解析位置引用。<br>要使用位置引用解析，请指定双美元符号（$） - 例如， '' awk '{print $$2}' '' 。 在这种情况下，执行命令时， `$$2` 实际上会变成 `$2` 。|  ::: noteimportant 仅对灵活的用户自定义参数进行带有$符号的搜索，并由Zabbix agent解析替换。对于简单的用户自定义参数，这种引用会被跳过，因此不需要任何$符号引用。 :::  ::: noteimportant 默认情况下，用户自定义参数中不允许使用某些特殊符号。有关完整列表，请参阅[不安全的用户参数](/zh/manual/appendix/config/zabbix_agentd)文档。 :::

en-us	#### Flipping frontend locales  It has been observed that frontend locales may flip without apparent logic, i. e. some pages (or parts of pages) are displayed in one language while other pages (or parts of pages) in a different language. Typically the problem may appear when there are several users, some of whom use one locale, while others use another.  A known workaround to this is to disable multithreading in PHP and Apache.  The problem is related to how setting the locale works [in PHP](https://www.php.net/manual/en/function.setlocale): locale information is maintained per process, not per thread. So in a multi-thread environment, when there are several projects run by same Apache process, it is possible that the locale gets changed in another thread and that changes how data can be processed in the Zabbix thread.  For more information, please see related problem reports:  -   [ZBX-10911](https://support.zabbix.com/browse/ZBX-10911) (Problem     with flipping frontend locales) -   [ZBX-16297](https://support.zabbix.com/browse/ZBX-16297) (Problem     with number processing in graphs using the `bcdiv` function of BC     Math functions)
zh-cn	#### 前端区域信息错乱  已经观察到，前端当地区域值可能会在没有明显逻辑的情况下错乱，例如：某些页面（或部分页面）以一种语言显示，其他页面（或部分页面）显示另一种语言。常出现在一些用户使用一个语言环境，而其他用户使用另一个语言环境的情况。  已知的解决方法是在 PHP 和 Apache 中禁用多线程。 问题与如何 [在 PHP 中] (https://www.php.net/manualen/function.setlocale) 设置语言环境有关：语言环境信息是按进程维护的，而不是按线程维护的。因此，在多线程环境中，当有多个监控项由同一个 Apache 进程运行时，可能会在另一个线程中更改语言环境，从而改变 Zabbix 线程中处理数据的方式。  更多信息，详见相关问题报告: -   [ZBX-10911](https://support.zabbix.com/browse/ZBX-10911) (Problem with flipping frontend locales) -   [ZBX-16297](https://support.zabbix.com/browse/ZBX-16297) (Problem  with number processing in graphs using the `bcdiv` function of BC Math functions)

en-us	#### Flipping frontend locales  It has been observed that frontend locales may flip without apparent logic, i. e. some pages (or parts of pages) are displayed in one language while other pages (or parts of pages) in a different language. Typically the problem may appear when there are several users, some of whom use one locale, while others use another.  A known workaround to this is to disable multithreading in PHP and Apache.  The problem is related to how setting the locale works [in PHP](https://www.php.net/manual/en/function.setlocale): locale information is maintained per process, not per thread. So in a multi-thread environment, when there are several projects run by same Apache process, it is possible that the locale gets changed in another thread and that changes how data can be processed in the Zabbix thread.  For more information, please see related problem reports:  -   [ZBX-10911](https://support.zabbix.com/browse/ZBX-10911) (Problem     with flipping frontend locales) -   [ZBX-16297](https://support.zabbix.com/browse/ZBX-16297) (Problem     with number processing in graphs using the `bcdiv` function of BC     Math functions)  
zh-cn	#### 前端区域信息错乱  已经观察到，前端当地区域值可能会在没有明显逻辑的情况下错乱，例如：某些页面（或部分页面）以一种语言显示，其他页面（或部分页面）显示另一种语言。常出现在一些用户使用一个语言环境，而其他用户使用另一个语言环境的情况。  已知的解决方法是在 PHP 和 Apache 中禁用多线程。 问题与如何 [在 PHP 中] (https://www.php.net/manualen/function.setlocale) 设置语言环境有关：语言环境信息是按进程维护的，而不是按线程维护的。因此，在多线程环境中，当有多个监控项由同一个 Apache 进程运行时，可能会在另一个线程中更改语言环境，从而改变 Zabbix 线程中处理数据的方式。  更多信息，详见相关问题报告: -   [ZBX-10911](https://support.zabbix.com/browse/ZBX-10911) (Problem with flipping frontend locales) -   [ZBX-16297](https://support.zabbix.com/browse/ZBX-16297) (Problem  with number processing in graphs using the `bcdiv` function of BC Math functions)

en-us	### Float history  The float history object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |clock|timestamp|Time when that value was received.| |itemid|string|ID of the related item.| |ns|integer|Nanoseconds when the value was received.| |value|float|Received value.|
zh-cn	 ### 浮点型历史数据  浮点型历史数据对象具有以下属性。  |属性|[类型](/manual/api/reference_commentary#data_types)|描述| |--------|---------------------------------------------------|-----------| |clock|timestamp|收到该数值的时间。| |itemid|string|相关监控项的 ID。| |ns|integer|收到数值时的纳秒数。| |value|float|收到的数值。|

en-us	### Float history  The float history object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--------|---------------------------------------------------|-----------| |clock|timestamp|Time when that value was received.| |itemid|string|ID of the related item.| |ns|integer|Nanoseconds when the value was received.| |value|float|Received value.|
zh-cn	 ### 浮点型历史数据  浮点型历史数据对象具有以下属性。  |属性|[类型](/manual/api/reference_commentary#data_types)|描述| |--------|---------------------------------------------------|-----------| |clock|timestamp|收到该数值的时间。| |itemid|string|相关监控项的 ID。| |ns|integer|收到数值时的纳秒数。| |value|float|收到的数值。|

en-us	### Float trend  The float trend object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |clock|timestamp|Timestamp of an hour for which the value was calculated. E. g. timestamp of 04:00:00 means values calculated for period 04:00:00-04:59:59.| |itemid|integer|ID of the related item.| |num|integer|Number of values that were available for the hour.| |value\_min|float|Hourly minimum value.| |value\_avg|float|Hourly average value.| |value\_max|float|Hourly maximum value.|
zh-cn	### 浮点型趋势  浮点型趋势对象具有以下属性.  | 属性       | [类型](/manual/api/reference_commentary#data_types) | 描述                                                         | | ---------- | --------------------------------------------------- | ------------------------------------------------------------ | | clock      | timestamp                                           | 根据时间戳计算出一个小时内监控项的值， 例如，04:00:00 的时间戳表示为 04:00:00-04:59:59 期间计算出来的监控项的值. | | itemid     | integer                                             | 相关监控项的ID.                                              | | num        | integer                                             | 一小时内可用的值的数量是多少个.                              | | value\_min | float                                               | 每小时内的最小值.                                            | | value\_avg | float                                               | 每小时内的平均值.                                            | | value\_max | float                                               | 每小时内的最大值.                                            |

en-us	### Float trend  The float trend object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--------|---------------------------------------------------|-----------| |clock|timestamp|Timestamp of an hour for which the value was calculated. E. g. timestamp of 04:00:00 means values calculated for period 04:00:00-04:59:59.| |itemid|integer|ID of the related item.| |num|integer|Number of values that were available for the hour.| |value\_min|float|Hourly minimum value.| |value\_avg|float|Hourly average value.| |value\_max|float|Hourly maximum value.|
zh-cn	### 浮点型趋势  浮点型趋势对象具有以下属性.  | 属性       | [类型](/manual/api/reference_commentary#data_types) | 描述                                                         | | ---------- | --------------------------------------------------- | ------------------------------------------------------------ | | clock      | timestamp                                           | 根据时间戳计算出一个小时内监控项的值， 例如，04:00:00 的时间戳表示为 04:00:00-04:59:59 期间计算出来的监控项的值. | | itemid     | integer                                             | 相关监控项的ID.                                              | | num        | integer                                             | 一小时内可用的值的数量是多少个.                              | | value\_min | float                                               | 每小时内的最小值.                                            | | value\_avg | float                                               | 每小时内的平均值.                                            | | value\_max | float                                               | 每小时内的最大值.                                            |