en-us	##### Footnotes  ^**1**^A Linux-specific note. Zabbix agent must have read-only access to filesystem */proc*. Kernel patches from www.grsecurity.org limit access rights of non-privileged users.  ^**2**^ `vfs.dev.read[]`, `vfs.dev.write[]`: Zabbix agent will terminate "stale" device connections if the item values are not accessed for more than 3 hours. This may happen if a system has devices with dynamically changing paths or if a device gets manually removed. Note also that these items, if using an update interval of 3 hours or more, will always return '0'.  ^**3**^ `vfs.dev.read[]`, `vfs.dev.write[]`: If default *all* is used for the first parameter then the key will return summary statistics, including all block devices like sda, sbd and their partitions (sda1, sda2, sdb3...) and multiple devices (MD raid) based on those block devices/partitions and logical volumes (LVM) based on those block devices/partitions. In such cases returned values should be considered only as relative value (dynamic in time) but not as absolute values.  ^**4**^ SSL (HTTPS) is supported only if agent is compiled with cURL support. Otherwise the item will turn unsupported.
zh-cn	##### 脚注  ^**1**^Linux相关。Zabbix agent 必须对文件系统*/proc*有只读权限。www.grsecurity.org的内核补丁限制了未授权用户的访问权限。  ^**2**^ `vfs.dev.read[]`, `vfs.dev.write[]`: 如果监控项值超过3小时无法获取，Zabbix agent 会终止"过时"的设备连接。这可能在系统设备动态变化或者手动移除时发生。请注意这些监控项的更新间隔在3小时以上时，会永远返回'0'。  ^**3**^ `vfs.dev.read[]`, `vfs.dev.write[]`: 如果将默认的*all* 作为第一个参数，此键会返回汇总统计数据，包括所有的块设备如sda，sbd及其分区（sda1, sda2, sdb3...）和基于这些块设备/分区的多个设备（MD raid）和基于这些块设备/分区的逻辑设备（LVM）。在这些情况下返回值应只考虑相对值（随时间动态变化）而不是绝对值。  ^**4**^ SSL (HTTPS) 仅在agent在支持cURL的情况下编译时被支持。否则此监控项会返回不受支持。

en-us	##### Footnotes  ^**1**^ Default value.
zh-cn	##### 注释批注  ^**1**^ 默认值

en-us	##### Footnotes  ^**1**^ For string values, only the string will be exported (e.g. "EMAIL") without the numbering used in this table. The numbers for range values (corresponding to the API values) in this table is used for ordering only.
zh-cn	 ##### 附注  ^**1**^ 对于字符串值，只有字符串将被导出(例如“EMAIL”)，而不使用该表中使用的编号。 该表中的范围值(对应于API值)的编号仅用于排序。

en-us	##### Footnotes  ^**1**^ For string values, only the string will be exported (e.g. "ZABBIX\_ACTIVE") without the numbering used in this table. The numbers for range values (corresponding to the API values) in this table is used for ordering only.
zh-cn	##### 附注  ^**1**^ 对于字符串值，只有字符串将被导出(例如"ZABBIX\_ACTIVE")，而不使用该表中使用的编号。该表中的范围值(对应于API值)的编号仅用于排序。

en-us	##### Footnotes  ^**1**^ For string values, only the string will be exported (e.g. "ZABBIX\_ACTIVE") without the numbering used in this table. The numbers for range values (corresponding to the API values) in this table is used for ordering only.
zh-cn	 ##### 附注  ^**1**^ 对于字符串值，只有字符串将被导出(例如"ZABBIX\_ACTIVE")，而不使用该表中使用的编号。 该表中的范围值(对应于API值)的编号仅用于排序。

en-us	##### Footnotes  ^**1**^ If multiple macros in a field or macros mixed with text are not supported for the location, a single macro has to fill the whole field.  ^**2**^ URLs that contain a [secret macro](/manual/config/macros/user_macros#configuration) will not work, as the macro in them will be resolved as "\*\*\*\*\*\*".
zh-cn	##### 附注  ^**1**^ 如果该位置不支持字段中的多个宏或与混合文本的宏，则必须使用单个宏填充整个字段。  ^**2**^ URLs 包含[秘密宏](/manual/config/macros/user_macros#configuration) 将不起作用，因为其中的宏将被解析为 "\*\*\*\*\*\*"。

en-us	##### Footnotes  ^**1**^ In the fields marked with ^[1](lld_macros#footnotes)^ a single macro has to fill the whole field. Multiple macros in a field or macros mixed with text are not supported.
zh-cn	##### 脚注  ^**1**^ 在标有 ^[1](lld_macros#footnotes)^ 的字段中，单个宏必须填充整个字段。一个或多个字段中的多个宏不支持与文本混合。

en-us	##### Footnotes  ^**1**^ Note that too many data gathering processes (pollers, unreachable pollers, ODBC pollers, HTTP pollers, Java pollers, pingers, trappers, proxypollers) together with IPMI manager, SNMP trapper and preprocessing workers can **exhaust** the per-process file descriptor limit for the preprocessing manager.  ::: notewarning This will cause Zabbix server to stop (usually shortly after the start, but sometimes it can take more time). The configuration file should be revised or the limit should be raised to avoid this situation. :::  ^**2**^ When a lot of items are deleted it increases the load to the database, because the housekeeper will need to remove all the history data that these items had. For example, if we only have to remove 1 item prototype, but this prototype is linked to 50 hosts and for every host the prototype is expanded to 100 real items, 5000 items in total have to be removed (1\*50\*100). If 500 is set for MaxHousekeeperDelete (MaxHousekeeperDelete=500), the housekeeper process will have to remove up to 2500000 values (5000\*500) for the deleted items from history and trends tables in one cycle.
zh-cn	##### 附注  ^**1**^ 请注意，过多的数据采集进程（例如：pollers、unreachable pollers、ODBC pollers、HTTP pollers、Java pollers、pingers、trappers、proxypollers）连同 IPMI 管理进程、SNMP 捕获进程和预处理线程可能会**耗尽**预处理管理器的每进程文件描述符限制。  ::: notewarning 上述行为会导致 Zabbix 服务器宕机（通常发生在启动后不久，或是启动后的一段时间内发生）。因此，您应修改配置文件或提高最大限制以避免这种情况的发生。 :::  ^**2**^ 删除大量监控项时，会增加数据库的负载，这是因为删除某个监控项，管理程序需要删除该监控项的所有历史数据。例如，如果我们只需要删除 1 项监控项原型，但这个监控项原型链接到了 50 台主机，并且每台主机的监控项原型又扩展到了 100 个实际监控项，也就是说总共要删除 5000 个监控项（1\*50\*100）。如果 MaxHousekeeperDelete 设置为 500（MaxHousekeeperDelete=500），管理流程则必须在一个周期内从历史和趋势表中删除多达 2500000 个被删除监控项的相关值（5000\*500）。

en-us	##### Footnotes  ^**1**^ The `{HOST.*}` macros supported in item key parameters will resolve to the interface that is selected for the item. When used in items without interfaces they will resolve to either the Zabbix agent, SNMP, JMX or IPMI interface of the host in this order of priority or to 'UNKNOWN' if the host does not have any interface.  ^**2**^ In global scripts, interface IP/DNS fields and web scenarios the macro will resolve to the main agent interface, however, if it is not present, the main SNMP interface will be used. If SNMP is also not present, the main JMX interface will be used. If JMX is not present either, the main IPMI interface will be used. If the host does not have any interface, the macro resolves to 'UNKNOWN'.  ^**3**^ Only the **avg**, **last**, **max** and **min** functions, with seconds as parameter are supported in this macro in map labels.  ^**4**^ `{HOST.*}` macros are supported in web scenario *Variables*, *Headers*, *SSL certificate file* and *SSL key file* fields and in scenario step *URL*, *Post*, *Headers* and *Required string* fields. Since Zabbix 5.4.0, `{HOST.*}` macros are no longer supported in web scenario *Name* and web scenario step *Name* fields.  ^**5**^ Only the **avg**, **last**, **max** and **min** functions, with seconds as parameter are supported within this macro in graph names. The {HOST.HOST<1-9>} macro can be used as host within the macro. For example:       * last(/Cisco switch/ifAlias[{#SNMPINDEX}])      * last(/{HOST.HOST}/ifAlias[{#SNMPINDEX}])  ^**6**^ Supported since 5.2.5.
zh-cn	##### 脚注  ^**1**^ 监控项关键参数中支持的`{HOST.*}` 宏将解析为监控项选择的接口。当在没有接口的监控项中使用时， 它们将按此优先级顺序解析为主机的 Zabbix agent，SNMP，JMX 或 IPMI 接口，如果主机没有任何接口，则解析为“未知”。  ^**2**^在全局脚本、接口 IP/DNS 字段和 Web 场景中，宏将解析为主代理接口，但是，如果不存在，将使用主 SNMP 接口。如果 SNMP 也不存在，则将使用主 JMX 接口。如果 JMX 也不存在，则将使用主 IPMI 接口。如果主机没有任何接口，则宏解析为“未知”。  ^**3**^ 此宏在map 标签中仅支持以秒为参数的 **avg**, **last**, **max** 和 **min**函数。  ^**4**^ 在web场景中*变量*，*消息头*， *SSL 证书文件* 和*SSL 秘钥文件* 字段以及场景步骤中 *URL*， *Post*，*消息头* 和 *必填字符串* 字段均支持`{HOST.*}` 宏。从Zabbix 5.4.0开始，web场景 *名称*和web场景步骤*名称字段不再支持`{HOST.*}` 宏。  ^**5**^此宏在图形名称中仅支持以秒为参数的**avg**, **last**, **max** 和 **min**函数。{HOST.HOST<1-9>} 宏可用作宏内的主机。例如：       * last(/Cisco switch/ifAlias[{#SNMPINDEX}])      * last(/{HOST.HOST}/ifAlias[{#SNMPINDEX}])  ^**6**^ 从 5.2.5版本开始支持。

en-us	##### Footnotes  ^**1**^ The VMware performance counter path has the `group/counter[rollup]` format where:  -   `group` - the performance counter group, for example *cpu* -   `counter` - the performance counter name, for example *usagemhz* -   `rollup` - the performance counter rollup type, for example     *average*  So the above example would give the following counter path: `cpu/usagemhz[average]`  The performance counter group descriptions, counter names and rollup types can be found in [VMware documentation](https://developer.vmware.com/apis/968).  See also: [Creating custom performance counter names for VMware](/manual/appendix/items/perf_counters).  ^**2**^ The value of these items is obtained from VMware performance counters and the VMwarePerfFrequency [parameter](/manual/appendix/config/zabbix_server) is used to refresh their data in Zabbix VMware cache:  -   vmware.hv.datastore.read -   vmware.hv.datastore.write -   vmware.hv.network.in -   vmware.hv.network.out -   vmware.hv.perfcounter -   vmware.vm.cpu.ready -   vmware.vm.net.if.in -   vmware.vm.net.if.out -   vmware.vm.perfcounter -   vmware.vm.vfs.dev.read -   vmware.vm.vfs.dev.write
zh-cn	##### 脚注  ^**1**^ VMware 性能计数器路径具有`group/counter[rollup]` 格式，其中：  - `group` - 性能计数器组，例如 *cpu* - `counter` - 性能计数器名称，例如 *usagemhz* - `rollup` - 性能计数器汇总类型，例如 *average*  所以上面的例子会给出以下计数器路径： `cpu/usagemhz [average]`  性能计数器组描述、计数器名称和汇总类型可以在[VMware 文档](https://developer.vmware.com/apis/968)找到。  另请参阅：[为 VMware 创建自定义性能计数器名称](/manual/appendix/items/perf_counters)。  ^**2**^ 这些监控项的值取自VMware性能计数器和 VMwarePerfFrequency[参数](/manual/appendix/config/zabbix_server) 用于刷新他们在 Zabbix VMware 缓存中的数据：  - vmware.hv.datastore.read - vmware.hv.datastore.write - vmware.hv.network.in - vmware.hv.network.out - vmware.hv.perfcounter - vmware.vm.cpu.ready - vmware.vm.net.if.in - vmware.vm.net.if.out - vmware.vm.perfcounter - vmware.vm.vfs.dev.read - vmware.vm.vfs.dev.write

en-us	##### Footnotes  ^**1**^ The VMware performance counter path has the `group/counter[rollup]` format where:  -   `group` - the performance counter group, for example *cpu* -   `counter` - the performance counter name, for example *usagemhz* -   `rollup` - the performance counter rollup type, for example     *average*  So the above example would give the following counter path: `cpu/usagemhz[average]`  The performance counter group descriptions, counter names and rollup types can be found in [VMware documentation](https://www.vmware.com/support/developer/converter-sdk/conv60_apireference/vim.PerformanceManager.html).  ^**2**^ The value of these items is obtained from VMware performance counters and the VMwarePerfFrequency [parameter](/manual/appendix/config/zabbix_server) is used to refresh their data in Zabbix VMware cache:  -   vmware.hv.datastore.read -   vmware.hv.datastore.write -   vmware.hv.network.in -   vmware.hv.network.out -   vmware.hv.perfcounter -   vmware.vm.cpu.ready -   vmware.vm.net.if.in -   vmware.vm.net.if.out -   vmware.vm.perfcounter -   vmware.vm.vfs.dev.read -   vmware.vm.vfs.dev.write  
zh-cn	##### 脚注  ^**1**^ VMware性能计数器路径具格式为 `group/counter[rollup]` ， 其中:  -   `group` - 性能计数器组, 例如 *cpu* -   `counter` - 性能计数器名称, 例如 *usagemhz* -   `rollup` - 性能计数器汇总类型, 例如 *average*  所以上述示例会给出如下计数器路径： `cpu/usagemhz[average]`  性能计数器组描述、计数器名称和汇总类型可以在[VMware文档](https://www.vmware.com/support/developer/converter-sdk/conv60_apireference/vim.PerformanceManager.html)中找到  ^**2**^ 这些项的值来自VMware性能计数器，VMwarePerfFrequency [参数](/manual/appendix/config/zabbix_server) 用于刷新Zabbix VMware缓存中的数据：  -   vmware.hv.datastore.read -   vmware.hv.datastore.write -   vmware.hv.network.in -   vmware.hv.network.out -   vmware.hv.perfcounter -   vmware.vm.cpu.ready -   vmware.vm.net.if.in -   vmware.vm.net.if.out -   vmware.vm.perfcounter -   vmware.vm.vfs.dev.read -   vmware.vm.vfs.dev.write  

en-us	##### - Forecasting horizon  (**forecast** only)\ Parameter `time` specifies how far in the future Zabbix should extrapolate dependencies it finds in historic data. No matter if you use `time_shift` or not, `time` is always counted starting from the current moment.
zh-cn	##### 2.2 预测范围  (仅限**forecast** )\ 参数 `time` Zabbix 应该在多长时间内推断它在历史数据中找到的依赖关系。不管你是否使用`time_shift` ，`time` 总是从当前时刻开始计算。

en-us	#### - Format-specific notes
zh-cn	#### - 特定 image 的说明

en-us	#### Form buttons  Buttons at the bottom of the form allow to perform several operations.  |   |   | |--|--------| |![](../../../assets/en/manual/config/button_add.png)|Add a discovery rule. This button is only available for new discovery rules.| |![](../../../assets/en/manual/config/button_update.png)|Update the properties of a discovery rule. This button is only available for existing discovery rules.| |![](../../../assets/en/manual/config/button_clone.png)|Create another discovery rule based on the properties of the current discovery rule.| |![](../../../assets/en/manual/config/button_check_now.png)|Perform discovery based on the discovery rule immediately. The discovery rule must already exist. See [more details](/manual/config/items/check_now).<br>*Note* that when performing discovery immediately, configuration cache is not updated, thus the result will not reflect very recent changes to discovery rule configuration.| |![](../../../assets/en/manual/config/button_delete.png)|Delete the discovery rule.| |![](../../../assets/en/manual/config/button_cancel.png)|Cancel the editing of discovery rule properties.|
zh-cn	#### 表格按钮  表格底部按钮允许执行一些操作。  | · | · | |---|---| |![](../../../assets/en/manual/config/button_add.png)|添加自动发现规则。此按钮只能用于新的自动发现规则。| |![](../../../assets/en/manual/config/button_update.png)|更新自动发现规则的属性。此按钮只能用于现有的自动发现规则。| |![](../../../assets/en/manual/config/button_clone.png)|基于当前自动发现规则的属性，创建另一个自动发现规则。| |![](../../../assets/en/manual/config/button_check_now.png)|立即运行自动发现规则。该自动发现规则必须已存在。 参考 [更多信息](/manual/config/items/check_now).<br>*注意* 当立即执行自动发现时, 配置缓存并没有更新, 所以自动发现的结果可能不会显示最近的变更。| |![](../../../assets/en/manual/config/button_delete.png)|删除自动发现规则。| |![](../../../assets/en/manual/config/button_cancel.png)|取消对自动发现规则的编辑。|

en-us	##### Form buttons  Buttons at the bottom of the form allow to perform several operations.  |   |   | |---|---| |![](../../../assets/en/manual/config/button_add.png)|Add a report. This button is only available for new reports.| |![](../../../assets/en/manual/config/button_update.png)|Update the properties of a report.| |![](../../../assets/en/manual/config/button_clone.png)|Create another report based on the properties of the current report.| |![](../../../assets/en/manual/config/button_test.png)|Test if report configuration is correct by sending a report to the current user.| |![](../../../assets/en/manual/config/button_delete.png)|Delete the report.| |![](../../../assets/en/manual/config/button_cancel.png)|Cancel the editing of report properties.|
zh-cn	##### 表单按钮  表单底部的按钮允许执行多项操作。  | | | |---|---| |![](../../../assets/en/manual/config/button_add.png)|添加报告。 此按钮仅适用于新报告。| |![](../../../assets/en/manual/config/button_update.png)|更新报告的属性。| |![](../../../assets/en/manual/config/button_clone.png)|根据当前报告的属性创建另一个报告。| |![](../../../assets/en/manual/config/button_test.png)|通过向当前用户发送报告来测试报告配置是否正确。| |![](../../../assets/en/manual/config/button_delete.png)|删除报告。| |![](../../../assets/en/manual/config/button_cancel.png)|取消编辑报表属性。|

en-us	#### FreeBSD  See values supported for 'memtype' parameter on FreeBSD in the table.  |Supported value|Description|Source in kinfo\_proc structure|Tries to be compatible with| |--|------|--|--| |vsize|Virtual memory size|kp\_eproc.e\_vm.vm\_map.size or ki\_size|ps -o vsz| |pmem|Percentage of real memory|calculated from rss|ps -o pmem| |rss|Resident set size|kp\_eproc.e\_vm.vm\_rssize or ki\_rssize|ps -o rss| |size ^[1](proc_mem_notes#footnotes)^|Size of process (code + data + stack)|tsize + dsize + ssize| | |tsize|Text (code) size|kp\_eproc.e\_vm.vm\_tsize or ki\_tsize|ps -o tsiz| |dsize|Data size|kp\_eproc.e\_vm.vm\_dsize or ki\_dsize|ps -o dsiz| |ssize|Stack size|kp\_eproc.e\_vm.vm\_ssize or ki\_ssize|ps -o ssiz|
zh-cn	#### FreeBSD  请参见表中FreeBSD上的“memtype”参数支持的值。  |支持的参数值|描述|proentry64 结构中的源代码|兼容| |---------------|-----------|-------------------------------|---------------------------| |vsize|虚拟内存大小|kp\_eproc.e\_vm.vm\_map.size or ki\_size|ps -o vsz| |pmem|实际内存的百分比|calculated from rss|ps -o pmem| |rss|驻留内存大小|kp\_eproc.e\_vm.vm\_rssize or ki\_rssize|ps -o rss| |size ^[1](proc_mem_notes#footnotes)^|进程大小 (代码 + 数据 + 堆栈)|tsize + dsize + ssize|<| |tsize|文本(代码)的大小|kp\_eproc.e\_vm.vm\_tsize or ki\_tsize|ps -o tsiz| |dsize|数据大小|kp\_eproc.e\_vm.vm\_dsize or ki\_dsize|ps -o dsiz| |ssize|堆栈大小|kp\_eproc.e\_vm.vm\_ssize or ki\_ssize|ps -o ssiz|

en-us	#### From Zabbix official repository  Zabbix SIA provides official RPM and DEB packages for:  -   [Red Hat Enterprise     Linux/CentOS](/manual/installation/install_from_packages/rhel_centos) -   [Debian/Ubuntu/Raspbian](/manual/installation/install_from_packages/debian_ubuntu) -   [SUSE Linux Enterprise     Server](/manual/installation/install_from_packages/suse)  Package files for yum/dnf, apt and zypper repositories for various OS distributions are available at [repo.zabbix.com](https://repo.zabbix.com/).  Note, that though some OS distributions (in particular, Debian-based distributions) provide their own Zabbix packages, these packages are not supported by Zabbix. Zabbix packages provided by 3rd parties can be out of date and may lack the latest features and bug fixes. It is recommended to use only official packages from [repo.zabbix.com](https://repo.zabbix.com/). If you have previously used unofficial Zabbix packages, see notes about [upgrading Zabbix packages from OS repositories](/manual/installation/upgrade/packages#zabbix_packages_from_os_repositories).
zh-cn	 #### 使用ZABBIX官方存储库   Zabbix SIA 提供如下官方RPM和DEB包:  -   [Red Hat Enterprise     Linux/CentOS](/manual/installation/install_from_packages/rhel_centos) -   [Debian/Ubuntu/Raspbian](/manual/installation/install_from_packages/debian_ubuntu) -   [SUSE Linux Enterprise     Server](/manual/installation/install_from_packages/suse)  yum/dnf, apt和zypper的各种操作系统发行版的软件包文件可以在[repo.zabbix.com](https://repo.zabbix.com/)上找到。  请注意，尽管某些操作系统发行版（特别是基于Debian的发行版）提供了它们自己的Zabbix包，但Zabbix不支持这些包。第三方提供的Zabbix包可能已过时，缺乏最新的特性和bug修复。推荐只使用[repo.zabbix.com](https://repo.zabbix.com/)上的官方软件包。如果之前用过非官方的Zabbix包，请参阅 [upgrading Zabbix packages from OS repositories](/manual/installation/upgrade/packages#zabbix_packages_from_os_repositories)的说明操作。

en-us	#### - Frontend access  By default, access to the frontend is allowed from anywhere.  The frontend can be accessed at *http://<host>*.  This can be customized in **/etc/nginx/conf.d/zabbix.conf**. Nginx has to be restarted after modifying this file. To do so, log in using SSH as **root** user and execute:      systemctl restart nginx
zh-cn	#### - 访问前端  默认情况下，允许从任何位置访问前端。  前端可以从 *http://<host>* 进行访问。  可在 **/etc/nginx/conf.d/zabbix.conf** 中修改此设置。在修改此文件后必须重启 Nginx。为此，请使用 SSH 以 **root** 用户身份登录并执行：      systemctl restart nginx

en-us	##### Frontend configuration  A Zabbix proxy does not have a frontend; it communicates with Zabbix server only.
zh-cn	##### 前端配置  Zabbix proxy 没有前端；它只与 Zabbix server 通信。

en-us	##### Frontend configuration  A Zabbix proxy does not have a frontend; it communicates with Zabbix server only.
zh-cn	##### 前端配置  Zabbix proxy 没有前端；它只与Zabbix server通信。

en-us	##### Frontend configuration  A Zabbix proxy does not have a frontend; it communicates with Zabbix server only.
zh-cn	##### 前端配置  Zabbix 代理没有前端； 它只与 Zabbix 服务器通信。

en-us	#### - Frontend configuration  Loadable modules are supported by Zabbix agent, server and proxy. Therefore, item type in Zabbix frontend depends on where the module is loaded. If the module is loaded into the agent, then the item type should be "Zabbix agent" or "Zabbix agent (active)". If the module is loaded into server or proxy, then the item type should be "Simple check".  History export through Zabbix modules does not need any frontend configuration. If the module is successfully loaded by server and provides **zbx\_module\_history\_write\_cbs()** function which returns at least one non-NULL callback function then history export will be enabled automatically.
zh-cn	#### - 前端配置  ZABBIX Agent、Server和Proxy支持可加载模块。因此ZABBIX前端中的监控项类型依据模块在哪里被加载。如果模块在Agent端被加载那么监控项类型应当设置为“Agent检查”或“Agent检查（主动）”。如果在Server端或Proxy端被加载，那么响应的类型应当为“简单检查”。\  通过ZABBIX模块历史记录输出不需要进行前端配置。如果模块成功加载并提供**zbx\_module\_history\_write\_cbs()**函数且该函数应至少返回一个非NULL回调方法，则将自动启动历史记录输出。

en-us	 ### Frontend languages  Catalan and Romanian languages are now enabled in the frontend.
zh-cn	### 前端语言  现在在前端可以使用加泰罗尼亚语和罗马尼亚语。

en-us	 ### Frontend languages  German and Vietnamese languages are now enabled in the frontend.
zh-cn	### 前端语言  现在在前端可以使用德语和越南语。

en-us	 ### Frontend ##### Miscellaneous  -   Warnings about incorrect housekeeping configuration for TimescaleDB are now displayed     if history or trend tables contain compressed chunks,     but *Override item history period* or *Override item trend period* options are disabled.     For more information, see [TimescaleDB setup](/manual/appendix/install/timescaledb#configuration).
zh-cn	### 前端 ##### 各种各样的  - · 如果历史或趋势表包含压缩块，但*Override item history period* 或*Override item trend period* 选项被禁用，现在会显示有关TimescaleDB 不正确内部管理配置的警告。 有关详细信息，请参阅 [TimescaleDB 设置](/manual/appendix/install/timescaledb#configuration)。

en-us	##### Frontend  The minimum supported screen width for Zabbix frontend is 1200px.  |Software|Version|Comments| |--------|-------|--------| |*Apache*|1.3.12 or later|<| |*PHP*|7.2.5 or later|PHP 8.0 is not supported.| |PHP extensions:|<|<| |*gd*|2.0.28 or later|PHP GD extension must support PNG images (*--with-png-dir*), JPEG (*--with-jpeg-dir*) images and FreeType 2 (*--with-freetype-dir*).| |*bcmath*|<|php-bcmath (*--enable-bcmath*)| |*ctype*|<|php-ctype (*--enable-ctype*)| |*libXML*|2.6.15 or later|php-xml, if provided as a separate package by the distributor.| |*xmlreader*|<|php-xmlreader, if provided as a separate package by the distributor.| |*xmlwriter*|<|php-xmlwriter, if provided as a separate package by the distributor.| |*session*|<|php-session, if provided as a separate package by the distributor.| |*sockets*|<|php-net-socket (*--enable-sockets*). Required for user script support.| |*mbstring*|<|php-mbstring (*--enable-mbstring*)| |*gettext*|<|php-gettext (*--with-gettext*). Required for translations to work.| |*ldap*|<|php-ldap. Required only if LDAP authentication is used in the frontend.| |*openssl*|<|php-openssl. Required only if SAML authentication is used in the frontend.| |*mysqli*|<|Required if MySQL is used as Zabbix backend database.| |*oci8*|<|Required if Oracle is used as Zabbix backend database.| |*pgsql*|<|Required if PostgreSQL is used as Zabbix backend database.|  ::: noteclassic Zabbix may work on previous versions of Apache, MySQL, Oracle, and PostgreSQL as well. :::  ::: noteimportant For other fonts than the default DejaVu, PHP function [imagerotate](http://php.net/manual/en/function.imagerotate.php) might be required. If it is missing, these fonts might be rendered incorrectly when a graph is displayed. This function is only available if PHP is compiled with bundled GD, which is not the case in Debian and other distributions. :::
zh-cn	##### 前端  Zabbix 前端支持的最小屏幕宽度为 1200px。  |软件|版本|备注| |--------|--------|--------| |*Apache*|1.3.12 或更高版本|<| |*PHP*|7.2.5 或更高版本|不支持 PHP 8.0。| |PHP 扩展：|<|<| |*gd*|2.0.28 或更高版本|PHP GD 扩展必须支持 PNG (*--with-png-dir*)、JPEG (*--with-jpeg-dir*) 和 FreeType 2 (*--with-freetype-dir*)。| |*bcmath*|<|php-bcmath (*--enable-bcmath*)| |*ctype*|<|php-ctype (*--enable-ctype*)| |*libXML*|2.6.15 或更高版本|php-xml，如果由分发者作为单独的包提供。| |*xmlreader*|<|php-xmlreader，如果由分发者作为单独的包提供。| |*xmlwriter*|<|php-xmlwriter，如果由分发者作为单独的包提供。| |*session*|<|php-session，如果由分发者作为单独的包提供。| |*sockets*|<|php-net-socket (*--enable-sockets*)。需要用户脚本支持。| |*mbstring*|<|php-mbstring (*--enable-mbstring*)| |*gettext*|<|php-gettext (*--with-gettext*)。Required for translations to work.| |*ldap*|<|php-ldap.仅当在前端使用 LDAP 身份验证时才需要。| |*openssl*|<|php-openssl.仅当在前端使用 SAML 身份验证时才需要。| |*mysqli*|<|如果 MySQL 用作 Zabbix 后端数据库，则需要。| |*oci8*|<|如果使用 Oracle 作为 Zabbix 后端数据库，则需要。| |*pgsql*|<|如果使用 PostgreSQL 作为 Zabbix 后端数据库，则需要。|  ::: noteclassic Zabbix 也许可以在以前的Apache、MySQL、Oracle 和 PostgreSQL 版本上运行。 :::  ::: noteimportant 如果需要使用默认 DejaVu 以外的字体, 可能会需要 PHP 的 [imagerotate](http://php.net/manual/en/function.imagerotate.php) 函数。如果缺少，在 Zabbix 前端查看图形时可能会显示异常。该函数只有在使用捆绑的 GD 库编译 PHP 时才可用。在 Debian 和某些发行版本中，这个问题不存在。 :::

en-us	#### Frontend  To enable encryption with certificate and database host identity verification for connections between Zabbix frontend and the database:  -   Check *Database TLS encryption* and *Verify database certificate* -   Specify path to *Database TLS key file* -   Specify path to *Database TLS CA file* -   Specify path to *Database TLS certificate file* -   Check *Database host verification*  ![](../../../../../assets/en/manual/appendix/install/encrypt_db_verify_full2.png){width="600"}  Alternatively, this can be set in */etc/zabbix/web/zabbix.conf.php:*      $DB['ENCRYPTION'] = true;     $DB['KEY_FILE'] = '';     $DB['CERT_FILE'] = '';     $DB['CA_FILE'] = '/etc/ssl/pgsql/root.crt';     $DB['VERIFY_HOST'] = true;     $DB['CIPHER_LIST'] = '';     ...
zh-cn	#### 前端  要使用证书和数据库主机身份验证为 Zabbix 前端和数据库之间的连接启用加密，请执行以下操作:  -   勾选*Database TLS encryption* 和*Verify database certificate* -   指定 *Database TLS key file* 路径 -   指定  *Database TLS CA file* 路径  -   指定  *Database TLS certificate file* 路径 -   勾选 *Database host verification*  ![](../../../../../assets/en/manual/appendix/install/encrypt_db_verify_full2.png){width="600"}  或者，可以在这里配置 */etc/zabbix/web/zabbix.conf.php:*      $DB['ENCRYPTION'] = true;     $DB['KEY_FILE'] = '';     $DB['CERT_FILE'] = '';     $DB['CA_FILE'] = '/etc/ssl/pgsql/root.crt';     $DB['VERIFY_HOST'] = true;     $DB['CIPHER_LIST'] = '';     ...

en-us	#### Frontend  To enable transport-only encryption for connections between Zabbix frontend and the database:  -   Check *Database TLS encryption* -   Leave *Verify database certificate* unchecked  ![](../../../../../assets/en/manual/appendix/install/encrypt_db_transport2.png){width="600"}
zh-cn	#### 前端  请执行以下操作来启用 Zabbix 前端和数据库之间的仅传输加密连接：  -   勾选 *Database TLS encryption* -   取消勾选 *Verify database certificate*   ![](../../../../../assets/en/manual/appendix/install/encrypt_db_transport2.png){width="600"}

en-us	#### Frontend  To enable transport-only encryption for connections between Zabbix frontend and the database:  -   Check *Database TLS encryption* -   Leave *Verify database certificate* unchecked  ![](../../../../../assets/en/manual/appendix/install/encrypt_db_transport.png){width="600"}
zh-cn	#### 前端  要为 Zabbix 前端和数据库之间的连接建立传输加密，请执行以下操作：  -   勾选 *Database TLS encryption* -   取消勾选 *Verify database certificate*   ![](../../../../../assets/en/manual/appendix/install/encrypt_db_transport.png){width="600"}

en-us	##### Frontend to the database  A secure connection to the database can be configured during frontend installation:  -   Mark the *Database TLS encryption* checkbox in the [Configure DB     connection](/manual/installation/frontend#configure_db_connection)     step to enable transport encryption. -   Mark the *Verify database certificate* checkbox that appears when     *TLS encryption* field is checked to enable encryption with     certificates.  ::: noteclassic  For MySQL, the *Database TLS encryption* checkbox is disabled, if *Database host* is set to localhost, because connection that uses a socket file (on Unix) or shared memory (on Windows) cannot be encrypted.\ For PostgreSQL, the *TLS encryption* checkbox is disabled, if the value of the *Database host* field begins with a slash or the field is empty.  :::  The following parameters become available in the TLS encryption in certificates mode (if both checkboxes are marked):  |Parameter|Description| |--|--------| |*Database TLS CA file*|Specify the full path to a valid TLS certificate authority (CA) file.| |*Database TLS key file*|Specify the full path to a valid TLS key file.| |*Database TLS certificate file*|Specify the full path to a valid TLS certificate file.| |*Database host verification*|Mark this checkbox to activate host verification.<br>Disabled for MYSQL, because PHP MySQL library does not allow to skip the peer certificate validation step.| |*Database TLS cipher list*|Specify a custom list of valid ciphers. The format of the cipher list must conform to the OpenSSL standard.<br>Available for MySQL only.|  ::: noteimportant TLS parameters must point to valid files. If they point to non-existent or invalid files, it will lead to the authorization error.\ If certificate files are writable, the frontend generates a warning in the [System information](/manual/web_interface/frontend_sections/reports/status_of_zabbix) report that "TLS certificate files must be read-only." (displayed only if the PHP user is the owner of the certificate).\ \ Certificates protected by passwords are not supported.  :::
zh-cn	##### 前端连接数据库  在前端安装的过程中可以配置使用数据库的安全连接:  - · 在[配置数据库连接](/manual/installation/frontend#configure_db_connection)步骤中勾选*Database TLS encryption*复选框以启用传输加密。 - · 选中*TLS 加密*字段时出现的*验证数据库证书*复选框，以启用证书加密。  ::: noteclassic 对于MySQL，如果*Database host*设置为localhost， *Database TLS encryption* 复选框是禁用的，因为连接使用 socket 文件 (Unix) 或共享内存(Windows) 是不能加密的。 对于 PostgreSQL，如果 *Database host* 字段的值以斜线开头或字段为空，则 *TLS encryption* 复选框被禁用。 :::  以下参数在证书模式 TLS 加密时可用 (如果两个复选框都勾选):  |参数|描述| |---------|-----------| |*Database TLS CA file*|指定有效的TLS证书颁发机构(CA)文件的完整路径| |*Database TLS key file*|指定有效的TLS密钥文件的完整路径| |*Database TLS certificate file*|指定有效TLS证书文件的完整路径| |*Database host verification*|标记此复选框以激活主机验证.<br>对MYSQL禁用，因为PHP MYSQL库不允许跳过对端证书验证步骤。| |*Database TLS cipher list*|指定有效密码的自定义列表。密码列表的格式必须符合OpenSSL标准。<br>仅对MySQL可用。|  ::: noteimportant TLS参数必须指向有效的文件。如果指向的文件不存在或无效，则会导致授权错误.\ 如果证书文件权限是可写的，前端会在 [系统信息](/manual/web_interface/frontend_sections/reports/status_of_zabbix) 报告中生成警告“TLS 证书文件必须是只读的。” （仅当 PHP 用户是证书的所有者时才显示）。 不支持受密码保护的证书。  :::

en-us	#### Function parameters  Function parameters allow to specify:  -   host and item key (functions referencing the host item history only) -   function-specific parameters -   other expressions (not available for functions referencing the host     item history, see [other expressions](#other_expressions) for     examples)  The host and item key can be specified as `/host/key`. The referenced item must be in a supported state (except for **nodata()** function, which is calculated for unsupported items as well).  While other trigger expressions as function parameters are limited to non-history functions in triggers, this limitation does not apply in [calculated items](/manual/config/items/itemtypes/calculated).
zh-cn	 #### 函数参数  函数参数允许选项：  - 主机和监控项（仅引用主机项目历史的功能） - 功能特定的参数 - 其他表达式（不适用于引用主机的函数 监控项，历史数据，请参阅 [other expressions（其他表达式）](#other_expressions) 例子）  主机和监控项键可以指定为`/host/key`。被引用的监控项必须处于支持的状态（**nodata()无数据** 函数除外， 这也是为不受支持的监控项计算的）。  而作为函数参数的其他触发器表达式仅限于 触发器中的非历史函数，此限制不适用于 [calculated items（计算监控项）](/manual/config/items/itemtypes/calculated)。

en-us	##### Functions for Prometheus histograms  It has been possible to collect [Prometheus metrics](/manual/config/items/itemtypes/prometheus) in Zabbix for a while now, but some of the metrics are difficult to work with. Specifically, the metrics of histogram type can be presented in Zabbix as multiple items with the same key names, but different parameters. However, even though such items are logically related and represent the same data, it has been difficult to analyze the collected data without specialized functions. To cover this functionality gap in the new version, **rate()** and **histogram\_quantile()** functions, producing the same result as their PromQL counterparts, have been added.  Other new additions to complement this functionality are the **bucket\_rate\_foreach()** and the **bucket\_percentile()** functions. For more information see:  -   [History     functions](/manual/appendix/functions/history#history_functions1)     (see **rate()**) -   [Aggregate     functions](/manual/appendix/functions/aggregate#aggregate_functions1)     (see **histogram\_quantile()**, **bucket\_percentile()**) -   [Foreach functions](/manual/appendix/functions/aggregate/foreach)     (see **bucket\_rate\_foreach()**)
zh-cn	##### Prometheus 直方图的函数  在 Zabbix 中收集 [Prometheus指标](/manual/config/items/itemtypes/prometheus) 已经有一段时间了，但有些指标很难使用。具体来说，直方图类型的指标可以在 Zabbix 中呈现为具有相同键值名称但参数不同的多个监控项。然而，即使这些监控项在逻辑上相关并代表相同的数据，如果没有专门的功能，很难分析收集到的数据。为了弥补新版本中的这一功能空白，添加了 **rate()** 和 **histogram\_quantile()** 函数，产生与 PromQL 对应的相同结果。  补充此功能的其他新增功能是**bucket\_rate\_foreach()** 和 **bucket\_percentile()** 函数。有关更多信息，请参阅：  -   [历史函数](/manual/appendix/functions/history#history_functions1)（参见 **rate()**） -   [聚合函数](/manual/appendix/functions/aggregate#aggregate_functions1)（参见 **histogram\_quantile()**， **bucket\_percentile()**） -   Foreach 函数（参见 **bucket\_rate\_foreach()**）

en-us	#### Functions  Functions allow to calculate the collected values (average, minimum, maximum, sum), find strings, reference current time and other factors.  A complete list of [supported functions](/manual/appendix/functions) is available.  Typically functions return numeric values for comparison. When returning strings, comparison is possible with the **=** and **<>** operators (see [example](#example_14)).
zh-cn	 #### 函数  函数允许计算收集的值（average 平均值、minimum 最小值、maximum 最大值、sum 总和）、查找字符串、参考当前时间和其他因素。  [支持的函数](/manual/appendix/functions)可用的完整列表。  通常，函数会返回数值以进行比较。返回字符串时，可以使用 **=** 和 **<>** 运算符进行比较（参见[示例](#example_14)）。

en-us	#### Functions  Functions can be used at the end of JSONPath. Multiple functions can be chained if the preceding function returns value that is accepted by the following function.  Supported functions:  |Function|Description|Input|Output| |--|--------|----|----| |`avg`|Average value of numbers in input array.|Array of numbers.|Number.| |`min`|Minimum value of numbers in input array.|Array of numbers.|Number.| |`max`|Maximum value of numbers in input array.|Array of numbers.|Number.| |`sum`|Sum of numbers in input array.|Array of numbers.|Number.| |`length`|Number of elements in input array.|Array.|Number.| |`first`|The first array element.|Array.|A JSON construct (object, array, value) depending on input array contents.|  Quoted numeric values are accepted by the JSONPath aggregate functions. It means that the values are converted from string type to numeric if aggregation is required.  Incompatible input will cause the function to generate error.
zh-cn	#### 函数  函数可以用在 JSONPath 的末尾。 如果前面的函数返回后面函数接受的值，则可以链接多个函数。  支持的函数：  |函数|描述|输入|输出| |--------|-----------|-----|------| |`avg`|输入数组中数字的平均值。|数字数组。|数字。| |`min`|输入数组中数字的最小值。|数字数组。|数字。| |`max`|输入数组中数字的最大值。|数字数组。|数字。| |`sum`|输入数组中数字的总和。|数字数组。|数字。| |`length`|输入数组中的元素数量。|数组。|数字。| |`first`|第一个数组元素。|数组。|取决于输入数组内容的 JSON 构造（对象、数组、值）。|  JSONPath 聚合函数接受带引号的数值。 这意味着如果需要聚合，则将值从字符串类型转换为数字。  不兼容的输入会导致函数产生错误。

en-us	##### Function-specific parameters  Function-specific parameters are placed after the item key and are separated from the item key by a comma. See the [supported functions](/manual/appendix/functions) for a complete list of these parameters.  Most of numeric functions accept time as a parameter. You may use seconds or [time suffixes](/manual/appendix/suffixes) to indicate time. Preceded by a hashtag, the parameter has a different meaning:  |Expression|Description| |----------|-----------| |**sum**(/host/key,**10m)**|Sum of values in the last 10 minutes.| |**sum**(/host/key,**\#10)**|Sum of the last ten values.|  Parameters with a hashtag have a different meaning with the function **last** - they denote the Nth previous value, so given the values 3, 7, 2, 6, 5 (from most recent to least recent):  -   `last(/host/key,#2)` would return '7' -   `last(/host/key,#5)` would return '5'  
zh-cn	 ##### 特定函数参数  特定函数的参数放置在监控项键之后，并且是 用逗号与监控项键隔开。请参阅 [supported functions支持函数](/manual/appendix/functions) 获取这些的完整列表 参数。  大多数数值函数都接受时间作为参数。您可以使用 seconds 或 [time suffixes（时间戳后缀）](/manual/appendix/suffixes) 来表示时间。 前面有标签，参数有不同的含义：  |表达式|描述| |----------|-----------| |**sum**(/host/key,**10m)**|过去 10 分钟的数值总和。| |**sum**(/host/key,**\#10)**|最后十个值的总和。|  带有标签的参数与函数具有不同的含义 **last** - 它们表示第 N 个先前的值，因此给定值 3、7、 2、6、5（从最近到至少最近）：  -   `last(/host/key,#2)` 将返回 '7' -   `last(/host/key,#5)` 将返回 '5'  

en-us	### Further reading  You now know enough to start working with the Zabbix API, but don't stop here. For further reading we suggest you have a look at the [list of available APIs](/manual/api/reference).
zh-cn	### 进一步阅读  您现在知道了足够的知识，可以开始使用 Zabbix API，但不要停在这里。我们建议你对 [可用的 API 列表](/manual/api/reference) 做进一步阅读。

en-us	#### General
zh-cn	#### 常规

en-us	#### General advice  -   monitor required parameters only -   tune 'Update interval' for all items. Keeping a small update     interval may be good for nice graphs, however, this may overload     Zabbix -   tune parameters for default templates -   tune housekeeping parameters -   do not monitor parameters which return the same information. -   avoid the use of triggers with long period given as function     argument. For example, max(/host/key,1h) will be calculated     significantly slower than max(/host/key,1m).
zh-cn	 #### 一般建议  -   仅监控所需参数 -   调整所有监控项的“更新间隔”。保持较小的更新间隔可能获得更好的图表展示，但是，这可能会使 Zabbix 过载 -   调整默认模板的参数 -   调整管家参数 -   不要监控返回相同信息的参数 -   避免使用作为函数参数给出的长周期触发器。例如， max(/host/key,1h) 的计算速度将明显慢于max(/host/key,1m)。

en-us	#### General attributes  The *User* tab contains general user attributes:  ![](../../../../assets/en/manual/config/user.png)  All mandatory input fields are marked with a red asterisk.  |Parameter|Description| |---------|-----------| |*Username*|Unique username, used as the login name.| |*Name*|User first name (optional).<br>If not empty, visible in acknowledgment information and notification recipient information.| |*Last name*|User last name (optional).<br>If not empty, visible in acknowledgment information and notification recipient information.| |*Groups*|Select [user groups](usergroup) the user belongs to. Starting with Zabbix 3.4.3 this field is auto-complete so starting to type the name of a user group will offer a dropdown of matching groups. Scroll down to select. Alternatively, click on *Select* to add groups. Click on 'x' to remove the selected.<br>Adherence to user groups determines what host groups and hosts the user will have [access to](permissions).| |*Password*|Two fields for entering the user password.<br>With an existing password, contains a *Password* button, clicking on which opens the password fields.<br>Note that passwords longer than 72 characters will be truncated.| |*Language*|Language of the Zabbix frontend.<br>The php gettext extension is required for the translations to work.| |*Time zone*|Select the time zone to override global [time zone](/manual/web_interface/time_zone#overview) on user level or select **System default** to use global time zone settings.| |*Theme*|Defines how the frontend looks like:<br>**System default** - use default system settings<br>**Blue** - standard blue theme<br>**Dark** - alternative dark theme<br>**High-contrast light** - light theme with high contrast<br>**High-contrast dark** - dark theme with high contrast| |*Auto-login*|Mark this checkbox to make Zabbix remember the user and log the user in automatically for 30 days. Browser cookies are used for this.| |*Auto-logout*|With this checkbox marked the user will be logged out automatically, after the set amount of seconds (minimum 90 seconds, maximum 1 day).<br>[Time suffixes](/manual/appendix/suffixes) are supported, e.g. 90s, 5m, 2h, 1d.<br>Note that this option will not work:<br>\* If the "Show warning if Zabbix server is down" global configuration option is enabled and Zabbix frontend is kept open;<br>\* When Monitoring menu pages perform background information refreshes;<br>\* If logging in with the *Remember me for 30 days* option checked.| |*Refresh*|Set the refresh rate used for graphs, plain text data, etc. Can be set to 0 to disable.| |*Rows per page*|You can determine how many rows per page will be displayed in lists.| |*URL (after login)*|You can make Zabbix transfer the user to a specific URL after successful login, for example, to Problems page.|
zh-cn	#### 通用属性  *User* 选项卡包含一般用户属性：  ![](../../../../assets/en/manual/config/user.png)  所有必填字段都标有红色星号。  |参数|说明| |---------|------------| |*用户名*|唯一的用户名，用作登录名。| |*姓名*|用户名（可选）。<br>如果不为空，在确认信息和通知收件人信息中可见。| |*姓*|用户姓（可选）。<br>如果不为空，在确认信息和通知收件人信息中可见。| |*Groups*|选择用户所属的[用户组](usergroup)。从 Zabbix 3.4.3 开始，此字段是自动完成的，因此开始输入用户组的名称将提供匹配组的下拉列表。向下滚动以选择。或者，单击 *Select* 以添加组。单击“x”以删除所选内容。<br>遵守用户组决定了用户将拥有[访问]（权限）的主机组和主机。| |*Password*|用于输入用户密码的两个字段。<br>使用现有密码，包含一个 *Password* 按钮，单击该按钮可打开密码字段。<br>请注意，超过 72 个字符的密码将被截断。 | |*语言*|Zabbix 前端的语言。<br>翻译工作需要 php gettext 扩展。| |*时区*|选择时区以在用户级别覆盖全局[时区](/manual/web_interface/time_zone#overview)，或选择**系统默认**以使用全局时区设置。| |*主题*|定义前端的外观：<br>**系统默认** - 使用默认系统设置<br>**蓝色** - 标准蓝色主题<br>**深色** - 替代深色主题<br>**高对比度浅色** - 高对比度浅色主题<br>**高对比度深色** - 高对比度深色主题| |*自动登录*|勾选此复选框，让 Zabbix 记住用户并自动登录用户 30 天。浏览器 cookie 用于此目的。| |*自动注销*|选中此复选框后，用户将在设置的秒数后自动注销（最少 90 秒，最多 1 天）。<br>[时间后缀](/manual/appendix/suffixes)支持，例如90s, 5m, 2h, 1d。<br>请注意，此选项将不起作用：<br>\* 如果启用了“如果 Zabbix 服务器关闭则显示警告”全局配置选项并且 Zabbix 前端保持打开状态；<br> \* 当监控菜单页面执行背景信息刷新时；<br>\* 如果登录时勾选了*记住我 30 天*选项。| |*Refresh*|设置用于图形、纯文本数据等的刷新率。可设置为0禁用。| |*每页的行数*|您可以确定每页将显示在列表中的行数。| |*URL（登录后）*|您可以让Zabbix在用户登录成功后将用户转移到特定的URL，例如问题页面。|

en-us	#### General  Change certain global configuration options.  [Autoregistration API](/manual/api/reference/autoregistration) | [Icon map API](/manual/api/reference/iconmap) | [Image API](/manual/api/reference/image) | [User macro API](/manual/api/reference/usermacro) | [Settings API](/manual/api/reference/settings) | [Housekeeping API](/manual/api/reference/housekeeping)
zh-cn	#### 通用  用于更改某些全局配置选项。  [Autoregistration API](/manual/api/reference/autoregistration) | [Icon map API](/manual/api/reference/iconmap) | [Image API](/manual/api/reference/image) | [User macro API](/manual/api/reference/usermacro) | [Settings API](/manual/api/reference/settings) | [Housekeeping API](/manual/api/reference/housekeeping)

en-us	#### General recommendations  -   Start with understanding which component acts as a TLS client and     which one acts as a TLS server in problem case.\     Zabbix server, proxies and agents, depending on interaction between     them, all can work as TLS servers and clients.\     For example, Zabbix server connecting to agent for a passive check,     acts as a TLS client. The agent is in role of TLS server.\     Zabbix agent, requesting a list of active checks from proxy, acts as     a TLS client. The proxy is in role of TLS server.\     `zabbix_get` and `zabbix_sender` utilities always act as TLS     clients. -   Zabbix uses mutual authentication.\     Each side verifies its peer and may refuse connection.\     For example, Zabbix server connecting to agent can close connection     immediately if agent's certificate is invalid. And vice versa -     Zabbix agent accepting a connection from server can close connection     if server is not trusted by agent. -   Examine logfiles in both sides - in TLS client and TLS server.\     The side which refuses connection may log a precise reason why it     was refused. Other side often reports rather general error (e.g.     "Connection closed by peer", "connection was non-properly     terminated"). -   Sometimes misconfigured encryption results in confusing error     messages in no way pointing to real cause.\     In subsections below we try to provide a (far from exhaustive)     collection of messages and possible causes which could help in     troubleshooting.\     Please note that different crypto toolkits (OpenSSL, GnuTLS) often     produce different error messages in same problem situations.\     Sometimes error messages depend even on particular combination of     crypto toolkits on both sides.
zh-cn	 #### 一般建议  - 首先了解哪些组件充当 TLS 客户端，哪个组件在出现问题时充当 TLS 服务器。     Zabbix server、proxies和agents，取决于它们之间的交互，都可以用作 TLS 服务器和客户端。     例如，Zabbix server充当TLS客户端连接到agent进行被动检查。Agent充当 TLS 服务器的角色。\     Zabbix agent充当 TLS 客户端从proxy请求活动检查列表。Proxy充当 TLS 服务器的角色。\     "zabbix_get"和"zabbix_sender"应用程序始终充当 TLS 客户端。 - Zabbix 使用相互身份验证。\     每一方都会验证其对等方，并可能拒绝连接。\     例如，如果agent的证书无效，连接到agent的 Zabbix server可以立即关闭连接。反之亦然 - 如果server不受agent信任，则接受来自server的连接的Zabbix agent也可以关闭连接。 - 检查两端的日志文件 - 在 TLS 客户端和 TLS 服务器中。     拒绝连接的一方可以记录被拒绝的确切原因。另一方经常报告相当一般的错误（例如，"对等方关闭的连接"，"连接未正确终止"）。 - 有时，错误配置的加密会导致令人困惑的错误消息，而无法指向真正的原因。     在下面的小节中，我们尝试提供（仍有未尽之处）消息和可能原因的集合，以帮助进行故障排除。     请注意，不同的加密工具包（OpenSSL，GnuTLS）在相同的问题情况下通常会产生不同的错误消息。     有时，错误消息甚至取决于双方加密工具包的特定组合。

en-us	#### Generate multiple tokens  Generate two tokens.  Request:  ```json {     "jsonrpc": "2.0",     "method": "token.generate",     "params": [         "1",         "2"     ],     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "tokenid": "1",             "token": "bbcfce79a2d95037502f7e9a534906d3466c9a1484beb6ea0f4e7be28e8b8ce2"         },         {             "tokenid": "2",             "token": "fa1258a83d518eabd87698a96bd7f07e5a6ae8aeb8463cae33d50b91dd21bd6d"         }     ],     "id": 0 } ```
zh-cn	#### 生成多个令牌  生成两个令牌。  请求：  ```json {     "jsonrpc": "2.0",     "method": "token.generate",     "params": [         "1",         "2"     ],     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  响应：  ```json {     "jsonrpc": "2.0",     "result": [         {             "tokenid": "1",             "token": "bbcfce79a2d95037502f7e9a534906d3466c9a1484beb6ea0f4e7be28e8b8ce2"         },         {             "tokenid": "2",             "token": "fa1258a83d518eabd87698a96bd7f07e5a6ae8aeb8463cae33d50b91dd21bd6d"         }     ],     "id": 0 } ```

en-us	##### Generating from history/trends  Graphs can be drawn based on either item [history or trends](/manual/config/items/history_and_trends).  For the users who have frontend [debug mode](/manual/web_interface/debug_mode) activated, a gray, vertical caption is displayed at the bottom right of a graph indicating where the data come from.  Several factors influence whether history of trends is used:  -   longevity of item history. For example, item history can be kept for     14 days. In that case, any data older than the fourteen days will be     coming from trends.  ```{=html} <!-- --> ``` -   data congestion in the graph. If the amount of seconds to display in     a horizontal graph pixel exceeds 3600/16, trend data are displayed     (even if item history is still available for the same period).  ```{=html} <!-- --> ``` -   if trends are disabled, item history is used for graph building - if     available for that period. This is supported starting with Zabbix     2.2.1 (before, disabled trends would mean an empty graph for the     period even if item history was available).
zh-cn	##### 从历史/趋势生成  可以根据监控项[历史或趋势](/manual/config/items/history_and_trends)生成图表。  对于前端[调试模式](/manual/web_interface/debug_mode) 已激活的用户，在图表的右下角显示一个灰色的垂直标题，指示数据来源。  影响趋势历史使用的几个因素：  - 监控项历史的寿命。例如，项目历史可以保留14 天。在这种情况下，任何超过十四天的数据都将不被保存。  ```{=html} <!-- --> ``` - 图表中的数据拥塞。如果要显示的秒数水平图形像素超过 3600/16，显示趋势数据（即使监控项历史在同一时期仍然可用）。  ```{=html} <!-- --> ``` - 如果趋势被禁用，监控项历史将用于图表构建（如果可用于该时期）。从 Zabbix 2.2.1开始支持此功能（之前，禁用趋势意味着期间的图表是空的，即使监控项历史可用）。

en-us	#### Generating PSK  For example, a 256-bit (32 bytes) PSK can be generated using the following commands:  -   with *OpenSSL*:  ```{=html} <!-- --> ```       $ openssl rand -hex 32       af8ced32dfe8714e548694e2d29e1a14ba6fa13f216cb35c19d0feb1084b0429  -   with *GnuTLS*:  ```{=html} <!-- --> ```       $ psktool -u psk_identity -p database.psk -s 32       Generating a random key for user 'psk_identity'       Key stored to database.psk              $ cat database.psk        psk_identity:9b8eafedfaae00cece62e85d5f4792c7d9c9bcc851b23216a1d300311cc4f7cb  Note that "psktool" above generates a database file with a PSK identity and its associated PSK. Zabbix expects just a PSK in the PSK file, so the identity string and colon (':') should be removed from the file.
zh-cn	   #### 生成 PSK  例如，可以使用以下命令生成 256 位 （32 字节）PSK:  -  对于*OpenSSL*: ```{=html}   <!-- --> ```       $ openssl rand -hex 32       af8ced32dfe8714e548694e2d29e1a14ba6fa13f216cb35c19d0feb1084b0429   -  对于 *GnuTLS*: ```{=html}   <!-- -->    $ psktool -u psk_identity -p database.psk -s 32   为用户 'psk_identity'生成随机密钥   密钥存储到 database.psk      $ cat database.psk    psk_identity:9b8eafedfaae00cece62e85d5f4792c7d9c9bcc851b23216a1d300311cc4f7cb ``` 请注意，上面的"psktool"会生成一个具有 PSK 标识及其关联 PSK 的数据库文件。 Zabbix 期望 PSK 文件中只有一个 PSK，因此应从文件中删除标识字符串和冒号 （':'）。

en-us	#### - Geographical maps  This section allows selecting geographical map tile service provider and configuring service provider settings for the Geomap [dashboard widget](/manual/web_interface/frontend_sections/monitoring/dashboard/widgets#geomap). To provide visualization using the geographical maps, Zabbix uses open-source JavaScript interactive maps library Leaflet. Please note that Zabbix has no control over the quality of images provided by third-party tile providers, including the predefined tile providers.  ![](../../../../../assets/en/manual/web_interface/frontend_sections/administration/geo_maps.png)  |Parameter|Description| |---------|-----------| |Tile provider|Select one of the available tile service providers or select *Other* to add another tile provider or self-hosted tiles (see [Using a custom tile service provider](#using_a_custom_tile_service_provider)).| |Tile URL|The URL template for loading and displaying the tile layer on geographical maps. This field is editable only if *Tile provider* is set to *Other*.<br><br>The following placeholders are supported:<br>*{s}* represents one of the available subdomains;<br>*{z}* represents zoom level parameter in the URL;<br>*{x}* and *{y}* represent tile coordinates;<br>*{r}* can be used to add "\@2x" to the URL to load retina tiles.<br><br>Example: `https://{s}.example.com/{z}/{x}/{y}{r}.png`| |Attribution|Tile provider attribution data to be displayed in a small text box on the map. This field is editable only if *Tile provider* is set to *Other*.| |Max zoom level|Maximum zoom level of the map. This field is editable only if *Tile provider* is set to *Other*.|
zh-cn	#### - 地理地图  此部分允许为 Geomap [仪表板部件](/manual/web_interface/frontend_sections/monitoring/dashboard/widgets#geomap) 选择地理地图切片服务提供者和配置服务提供者设置。 为了使用地理地图提供可视化，Zabbix 使用开源 JavaScript 交互式地图库 Leaflet。请注意，Zabbix 无法控制第三方提供商提供的瓦片图像质量，包括预定义的瓦片提供商。  ![](../../../../../assets/en/manual/web_interface/frontend_sections/administration/geo_maps.png)  |参数|说明| |---------|------------| |磁贴提供者|选择可用磁贴服务提供者之一或选择*其他*以添加另一个磁贴提供者或自托管磁贴（请参阅[使用自定义磁贴服务提供者](#using_a_custom_tile_service_provider)）。| |Tile URL|用于在地图上加载和显示切片图层的 URL 模板。仅当 *Tile provider* 设置为 *Other* 时，此字段才可编辑。<br><br>支持以下占位符：<br>*{s}* 表示可用子域之一；<br>*{z }* 表示 URL 中的缩放级别参数；<br>*{x}* 和 *{y}* 表示图块坐标；<br>*{r}* 可用于在 URL 中添加“\@2x”加载视网膜图块。<br><br>示例：`https://{s}.example.com/{z}/{x}/{y}{r}.png`| |属性|要在地图上的小文本框中显示的图块提供商属性数据。仅当 *Tile provider* 设置为 *Other* 时，此字段才可编辑。| |最大缩放级别|地图的最大缩放级别。仅当 *Tile provider* 设置为 *Other* 时，此字段才可编辑。|

en-us	##### Geomap  A new geomap widget for the dashboards has been introduced providing a way to display hosts on geographical maps. For more information see the *Geomap* [dashboard widget](/manual/web_interface/frontend_sections/monitoring/dashboard/widgets/geomap) and [geographical maps](/manual/web_interface/frontend_sections/administration/general#geographical_maps).  ![](../../../assets/en/manual/introduction/geomap_new.png)
zh-cn	##### 地理地图  为仪表板引入了一个新的地理地图小部件，提供了一种在地理地图上显示主机的方法。有关详细信息，请参阅 *Geomap*  [仪表板小部件](/manual/web_interface/frontend_sections/monitoring/dashboard/widgets/geomap)和[地理地图](/manual/web_interface/frontend_sections/administration/general#geographical_maps)。  ![](../../../assets/en/manual/introduction/geomap_new.png)

en-us	##### Geomap widget  A new geomap widget for the dashboards has been introduced providing a way to display hosts on geographical maps. For more information see the *Geomap* [dashboard widget](/manual/web_interface/frontend_sections/monitoring/dashboard/widgets/geomap) and [geographical maps](/manual/web_interface/frontend_sections/administration/general#geographical_maps).  ![](../../../assets/en/manual/introduction/geomap_new.png)  
zh-cn	#### Host editing as popup  The form for host creation and editing is now opened in a modal (popup) window, in *Configuration* → *Hosts*, *Monitoring* → *Hosts* and in any page, where there is a host menu or other direct link to the host configuration.  Direct links to the host edit page still work and are opening the host edit page in full page.  

en-us	#### Geomap widget error   The maps in the Geomap widget may not load correctly, if you have upgraded from an older Zabbix version with NGINX and didn't switch to the new NGINX configuration file during the upgrade.   To fix the issue, you can  discard the old configuration file, use the configuration file from 6.0 package and reconfigure it as described in the [download instructions](https://www.zabbix.com/download?zabbix=6.0&os_distribution=red_hat_enterprise_linux&os_version=8&db=mysql&ws=nginx) in section *e. Configure PHP for Zabbix frontend*.  Alternatively, you can manually edit an existing NGINX configuration file (typically, */etc/zabbix/nginx.conf*). To do so, open the file and locate the following block:       location ~ /(api\/|conf[^\.]|include|locale|vendor) {             deny            all;             return          404;     }  Then, replace this block with:       location ~ /(api\/|conf[^\.]|include|locale) {             deny            all;             return          404;     }      location /vendor {             deny            all;             return          404;     }
zh-cn	#### 地图小部件错误  如果你使用较老的 Zabbix 版本（LNMP结构）升级并且在升级期间未切换到新的 NGINX 配置文件，则 Geomap 小部件中的地图可能会出现无法正确加载的情况。  要解决此问题，可以  丢弃旧的配置文件，使用  6.0 包中的配置文件并参照 [下载说明](https://www.zabbix.com/download?zabbix=6.0&os_distribution=red_hat_enterprise_linux&os_version=8&db=mysql&ws=nginx)  中的 *e. 部分为 Zabbix 前端配置 PHP* 的描述重新配置它。  或者，你可以手动编辑现有的 NGINX 配置文件（ 通常是 */etc/zabbix/nginx.conf*）。打开文件并找到以下配置模块：      location ~ /(api\/|conf[^\.]|include|locale|vendor) {             deny            all;             return          404;     }  然后，将此块替换为：      location ~ /(api\/|conf[^\.]|include|locale) {             deny            all;             return          404;     }      location /vendor {             deny            all;             return          404;     }              

en-us	#### Get a count of standby nodes  Request:  ```json {     "jsonrpc": "2.0",     "method": "hanode.get",     "params": {         "countOutput": true,         "filter": {             "status": 0         }     },     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": "3",     "id": 1 } ```
zh-cn	#### 获取备用节点的数量  请求： ```json {     "jsonrpc": "2.0",     "method": "hanode.get",     "params": {         "countOutput": true,         "filter": {             "status": 0         }     },     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  响应： ```json {     "jsonrpc": "2.0",     "result": "3",     "id": 1 } ```

en-us	#### Get a list of nodes ordered by status  Request:  ```json {     "jsonrpc": "2.0",     "method": "hanode.get",     "params": {         "preservekeys": true,         "sortfield": "status",         "sortorder": "DESC"     },     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  Response:  ```json {   "jsonrpc": "2.0",   "result": {     "ckuo7i1nw000h0sajj3l3hh8u": {       "ha_nodeid": "ckuo7i1nw000h0sajj3l3hh8u",       "name": "node-active",       "address": "192.168.1.13",       "port": "10051",       "lastaccess": "1635335704",       "status": "3"     },     "ckuo7i1nw000e0sajwfttc1mp": {       "ha_nodeid": "ckuo7i1nw000e0sajwfttc1mp",       "name": "node6",       "address": "192.168.1.10",       "port": "10053",       "lastaccess": "1635332902",       "status": "2"     },     "ckuo7i1nv000c0sajz85xcrtt": {       "ha_nodeid": "ckuo7i1nv000c0sajz85xcrtt",       "name": "node4",       "address": "192.168.1.8",       "port": "10052",       "lastaccess": "1635334214",       "status": "1"     },     "ckuo7i1nv000a0saj1fcdkeu4": {       "ha_nodeid": "ckuo7i1nv000a0saj1fcdkeu4",       "name": "node2",       "address": "192.168.1.6",       "port": "10051",       "lastaccess": "1635335705",       "status": "0"     }   },   "id": 1 } ```
zh-cn	#### 获取一个按状态排序的节点列表  请求： ```json {     "jsonrpc": "2.0",     "method": "hanode.get",     "params": {         "preservekeys": true,         "sortfield": "status",         "sortorder": "DESC"     },     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  响应： ```json {   "jsonrpc": "2.0",   "result": {     "ckuo7i1nw000h0sajj3l3hh8u": {       "ha_nodeid": "ckuo7i1nw000h0sajj3l3hh8u",       "name": "node-active",       "address": "192.168.1.13",       "port": "10051",       "lastaccess": "1635335704",       "status": "3"     },     "ckuo7i1nw000e0sajwfttc1mp": {       "ha_nodeid": "ckuo7i1nw000e0sajwfttc1mp",       "name": "node6",       "address": "192.168.1.10",       "port": "10053",       "lastaccess": "1635332902",       "status": "2"     },     "ckuo7i1nv000c0sajz85xcrtt": {       "ha_nodeid": "ckuo7i1nv000c0sajz85xcrtt",       "name": "node4",       "address": "192.168.1.8",       "port": "10052",       "lastaccess": "1635334214",       "status": "1"     },     "ckuo7i1nv000a0saj1fcdkeu4": {       "ha_nodeid": "ckuo7i1nv000a0saj1fcdkeu4",       "name": "node2",       "address": "192.168.1.6",       "port": "10051",       "lastaccess": "1635335705",       "status": "0"     }   },   "id": 1 } ```

en-us	#### Get a list of specific nodes by their IDs  Request:  ```json {     "jsonrpc": "2.0",     "method": "hanode.get",     "params": {         "ha_nodeids": ["ckuo7i1nw000e0sajwfttc1mp", "ckuo7i1nv000c0sajz85xcrtt"]     },     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "ha_nodeid": "ckuo7i1nv000c0sajz85xcrtt",             "name": "node4",             "address": "192.168.1.8",             "port": "10052",             "lastaccess": "1635334214",             "status": "1"         },         {             "ha_nodeid": "ckuo7i1nw000e0sajwfttc1mp",             "name": "node6",             "address": "192.168.1.10",             "port": "10053",             "lastaccess": "1635332902",             "status": "2"         }     ],     "id": 1 } ```
zh-cn	#### 通过节点ID获取特定节点的列表  请求： ```json {     "jsonrpc": "2.0",     "method": "hanode.get",     "params": {         "ha_nodeids": ["ckuo7i1nw000e0sajwfttc1mp", "ckuo7i1nv000c0sajz85xcrtt"]     },     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  响应： ```json {     "jsonrpc": "2.0",     "result": [         {             "ha_nodeid": "ckuo7i1nv000c0sajz85xcrtt",             "name": "node4",             "address": "192.168.1.8",             "port": "10052",             "lastaccess": "1635334214",             "status": "1"         },         {             "ha_nodeid": "ckuo7i1nw000e0sajwfttc1mp",             "name": "node6",             "address": "192.168.1.10",             "port": "10053",             "lastaccess": "1635332902",             "status": "2"         }     ],     "id": 1 } ```

en-us	#### Get a list of stopped nodes  Request:  ```json {     "jsonrpc": "2.0",     "method": "hanode.get",     "params": {         "output": ["ha_nodeid", "address", "port"],         "filter": {             "status": 1         }     },     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  Response:  ```json {     "jsonrpc": "2.0",     "result": [         {             "ha_nodeid": "ckuo7i1nw000g0sajjsjre7e3",             "address": "192.168.1.12",             "port": "10051"         },         {             "ha_nodeid": "ckuo7i1nv000c0sajz85xcrtt",             "address": "192.168.1.8",             "port": "10052"         },         {             "ha_nodeid": "ckuo7i1nv000d0sajd95y1b6x",             "address": "192.168.1.9",             "port": "10053"         }     ],     "id": 1 } ```
zh-cn	#### 获得一个停用的节点列表  请求： ```json {     "jsonrpc": "2.0",     "method": "hanode.get",     "params": {         "output": ["ha_nodeid", "address", "port"],         "filter": {             "status": 1         }     },     "auth": "3a57200802b24cda67c4e4010b50c065",     "id": 1 } ```  响应： ```json {     "jsonrpc": "2.0",     "result": [         {             "ha_nodeid": "ckuo7i1nw000g0sajjsjre7e3",             "address": "192.168.1.12",             "port": "10051"         },         {             "ha_nodeid": "ckuo7i1nv000c0sajz85xcrtt",             "address": "192.168.1.8",             "port": "10052"         },         {             "ha_nodeid": "ckuo7i1nv000d0sajd95y1b6x",             "address": "192.168.1.9",             "port": "10053"         }     ],     "id": 1 } ```

en-us	#### Getting Java gateway  You can install Java gateway either from the sources or packages downloaded from [Zabbix website](http://www.zabbix.com/download.php).  Using the links below you can access information how to get and run Zabbix Java gateway, how to configure Zabbix server (or Zabbix proxy) to use Zabbix Java gateway for JMX monitoring, and how to configure Zabbix items in Zabbix frontend that correspond to particular JMX counters.  |Installation from|Instructions|Instructions| |-----------------|------------|------------| |*Sources*|[Installation](/manual/installation/install#installing_java_gateway)|[Setup](/manual/concepts/java/from_sources)| |*RHEL packages*|[Installation](/manual/installation/install_from_packages/rhel#java_gateway_installation)|[Setup](/manual/concepts/java/from_rhel)| |*Debian/Ubuntu packages*|[Installation](/manual/installation/install_from_packages/debian_ubuntu#java_gateway_installation)|[Setup](/manual/concepts/java/from_debian_ubuntu)|
zh-cn	#### 获取java网关  您可以从源代码或从下载的包中安装Java网关 [Zabbix website](http://www.zabbix.com/download.php).  使用下面的链接，您可以访问以下信息：如何获取和运行Zabbix java网关，如何配置Zabbix server（或Zabbix proxy）以使用Zabbix Java 网关进行JMX监控，以及如何在Zabbix前端配置对应于特定JMX计数器的Zabbix监控项。  |安装途径|安装说明|配置步骤说明| |-----------------|------------|------------| |*Sources*|[安装](/manual/installation/install#installing_java_gateway)|[配置](/manual/concepts/java/from_sources)| |*RHEL packages*|[安装](/manual/installation/install_from_packages/rhel#java_gateway_installation)|[配置](/manual/concepts/java/from_rhel)| |*Debian/Ubuntu packages*|[安装](/manual/installation/install_from_packages/debian_ubuntu#java_gateway_installation)|[配置](/manual/concepts/java/from_debian_ubuntu)|

en-us	#### Getting Zabbix source code  There are several ways of getting Zabbix source code:  -   You can [download](https://www.zabbix.com/download_sources) the     released stable versions from the official Zabbix website -   You can [download](https://www.zabbix.com/developers) nightly builds     from the official Zabbix website developer page -   You can get the latest development version from the Git source code     repository system:     -   The primary location of the full repository is at         <https://git.zabbix.com/scm/zbx/zabbix.git>     -   Master and supported releases are also mirrored to Github at         <https://github.com/zabbix/zabbix>  A Git client must be installed to clone the repository. The official commandline Git client package is commonly called **git** in distributions. To install, for example, on Debian/Ubuntu, run:      sudo apt-get update     sudo apt-get install git  To grab all Zabbix source, change to the directory you want to place the code in and execute:      git clone https://git.zabbix.com/scm/zbx/zabbix.git
zh-cn	#### 获取Zabbix源码  如何获取Zabbix源码有如下几种方式：   -   可从 Zabbix 官方网站获取发布的稳定版本 [下载](https://www.zabbix.com/download_sources)     -   可从 Zabbix官方开发网站页面获取源架构 [下载](https://www.zabbix.com/developers)  -   可以从 Git 源代码中获取最新的开发版本存储系统：        -   完整存储Zabbix源码的主要位置是         <https://git.zabbix.com/scm/zbx/zabbix.git>        -   主版本和支持版本也镜像到 Github，网址为         <https://github.com/zabbix/zabbix>  必须安装 Git 客户端才能克隆存储源。 官方命令行 Git 客户端包在发布版本中通常称为 **git**。 示例：在 Debian/Ubuntu 上安装，请运行如下命令：      sudo apt-get update     sudo apt-get install git  若需获取所有 Zabbix 源代码，请更改相应文件来替换源码并执行如下命令：      git clone https://git.zabbix.com/scm/zbx/zabbix.git

en-us	#### Global event correlation  Events may not get correlated correctly if the time interval between the first and second event is very small, i.e. half a second and less.
zh-cn	#### 全局事件关联  如果第一个事件和第二个事件之间的时间间隔非常小，即半秒或更短，事件可能无法正确关联。

en-us	#### Global event correlation  Events may not get correlated correctly if the time interval between the first and second event is very small, i.e. half a second and less.  
zh-cn	#### 全局事件关联  如果第一个事件和第二个事件之间的时间间隔非常小，即半秒或更短，事件可能无法正确关联。

en-us	### Global JavaScript functions  Additional global JavaScript functions have been implemented with Duktape:  -   btoa(string) - encodes string to base64 string -   atob(base64\_string) - decodes base64 string  ``` {.java} try {     b64 = btoa("utf8 string");     utf8 = atob(b64); }  catch (error) {     return {'error.name' : error.name, 'error.message' : error.message} } ```  -   md5(string) - calculates the MD5 hash of a string -   sha256(string) - calculates the SHA256 hash of a string -   hmac('\<hash type\>',key,string) - returns HMAC hash as hex formatted string. MD5 and SHA256 hash types are supported. Key and string parameters support binary data. E. g.:      -    `hmac('md5',key,string)`     -    `hmac('sha256',key,string)`
zh-cn	### 全局 JavaScript 函数  使用 Duktape 实现了额外的全局 JavaScript 函数：  -   btoa(string) - 将字符串编码为 base64 字符串 -   atob(base64\_string) -  对 base64 字符串进行解码  ``` {.java} try {     b64 = btoa("utf8 string");     utf8 = atob(b64); }  catch (error) {     return {'error.name' : error.name, 'error.message' : error.message} } ```  -   md5(string) - 计算字符串的 MD5 哈希 -   sha256(string) - 计算字符串的 SHA256 哈希 -   hmac('\<hash type\>',key,string) - 返回 HMAC 哈希作为十六进制格式的字符串。 支持 MD5 和 SHA256 哈希类型。 键和字符串参数支持二进制数据。 例如：     -   `hmac('md5',key,string)`    -   `hmac('sha256',key,string)`

en-us	### Global macro  The global macro object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |globalmacroid|string|*(readonly)* ID of the global macro.| |**macro**<br>(required)|string|Macro string.| |**value**<br>(required)|string|Value of the macro.| |type|integer|Type of macro.<br><br>Possible values:<br>0 - *(default)* Text macro;<br>1 - Secret macro;<br>2 - Vault secret.| |description|string|Description of the macro.|  Note that for some methods (update, delete) the required/optional parameter combination is different.
zh-cn	### 全局宏  全局宏对象具有以下属性.  |属性|[类型](/manual/api/reference_commentary#data_types)|描述| |--------|---------------------------------------------------|-----------| |globalmacroid|string|*(只读)* 全局宏的ID.| |**macro**<br>(必需)|string|宏字符串.| |**value**<br>(必需)|string|宏的值.| |type|integer|宏的类型.<br><br>可接受的值:<br>0 - *(default)* 文本宏;<br>1 - 密文宏;<br>2 - 密钥宏.| |description|string|宏描述信息.|  注意，对于某些方法（更新、删除），必需/可选参数组合是不同的。

en-us	##### Global messages displayed  As the messages arrive, they are displayed in a floating section on the right hand side. This section can be repositioned freely by dragging the section header.  ![global\_messages.png](../../../../assets/en/manual/web_interface/global_messages.png)  For this section, several controls are available:  -   ![](../../../../assets/en/manual/about/message_button_snooze.png)     **Snooze** button silences the currently active alarm sound; -   ![](../../../../assets/en/manual/about/message_button_mute.png)     **Mute/Unmute** button switches between playing and not playing the     alarm sounds at all.
zh-cn	##### 显示全局消息  当消息到达时，它们会显示在右侧的浮动部分中。 该部分可以通过拖动部分标题自由重新定位。  ![global\_messages.png](../../../../assets/en/manual/web_interface/global_messages.png)  对于本节，有几个控件可用：  - · ![](../../../../assets/en/manual/about/message_button_snooze.png) **延后警报** 按钮使当前活动的警报声音静音； - · ![](../../../../assets/en/manual/about/message_button_mute.png) **静音/取消静音**按钮在播放和不播放警报声之间切换。

en-us	#### Global regular expressions  There is an advanced editor for creating and testing complex regular expressions in Zabbix frontend.  Once a regular expression has been created this way, it can be used in several places in the frontend by referring to its name, prefixed with @, for example, *\@mycustomregexp*.  To create a global regular expression:  -   Go to: *Administration → General* -   Select *Regular expressions* from the dropdown -   Click on *New regular expression*  The **Expressions** tab allows to set the regular expression name and add subexpressions.  ![](../../assets/en/manual/regular_expressions/global_regexp.png)  All mandatory input fields are marked with a red asterisk.  |Parameter|<|Description| |---------|-|-----------| |*Name*|<|Set the regular expression name. Any Unicode characters are allowed.| |*Expressions*|<|Click on *Add* in the Expressions block to add a new subexpression.| |<|*Expression type*|Select expression type:<br>**Character string included** - match the substring<br>**Any character string included** - match any substring from a delimited list. The delimited list includes a comma (,), a dot (.) or a forward slash (/).<br>**Character string not included** - match any string except the substring<br>**Result is TRUE** - match the regular expression<br>**Result is FALSE** - do not match the regular expression| |^|*Expression*|Enter substring/regular expression.| |*Delimiter*|<|A comma (,), a dot (.) or a forward slash (/) to separate text strings in a regular expression. This parameter is active only when "*Any character string included*" expression type is selected.| |*Case sensitive*|<|A checkbox to specify whether a regular expression is sensitive to capitalization of letters.|  A forward slash (/) in the expression is treated literally, rather than a delimiter. This way it is possible to save expressions containing a slash, without errors.  ::: noteimportant A custom regular expression name in Zabbix may contain commas, spaces, etc. In those cases where that may lead to misinterpretation when referencing (for example, a comma in the parameter of an item key) the whole reference may be put in quotes like this: *"\@My custom regexp for purpose1, purpose2"*.\ Regular expression names must not be quoted in other locations (for example, in LLD rule properties). :::  In the **Test** tab the regular expression and its subexpressions can be tested by providing a test string.  ![](../../assets/en/manual/regular_expressions/global_regexp_b.png)  Results show the status of each subexpression and total custom expression status.  Total custom expression status is defined as *Combined result*. If several sub expressions are defined Zabbix uses AND logical operator to calculate *Combined result*. It means that if at least one Result is False *Combined result* has also False status.
zh-cn	#### 全局正则表达式  Zabbix 前端有一个用于创建和测试复杂正则表达式的高级编辑器。  一旦以这种方式创建了正则表达式，就可以在前端的多个位置通过引用其名称（以 @ 为前缀）使用它，例如  *\@mycustomregexp*。  创建全局正则表达式：  -   点击 *Administration（管理） → General（一般）* -   从下拉列表中选择 *Regular expressions（正则表达式）*  -   点击 *New regular expression（新建正则表达式）*  **表达式** 选项卡允许设置正则表达式名称并添加子表达式。  ![](../../assets/en/manual/regular_expressions/global_regexp.png)  所有必填字段都标有红色星号。  |参数|<|描述| |---------|-|-----------| |*Name（名字）*|<|设置正则表达式名称。允许使用任何 Unicode 字符。| |*Expressions（表达式）*|<|单击表达式块中的 *Add（添加）* 以添加新的子表达式。| |<|*Expression type（表达式类型）*|选择表达式类型：<br>**Character string included（包含字符串）** - 匹配子字符串<br>**Any character string included（包含任何字符串）** - 匹配分隔列表中的任何子字符串。分隔列表包括逗号 （,）、点 （.）或正斜杠（/）。<br>**Character string not included（不包含字符串）** - 匹配除子字符串以外的任何字符串<br>**Result is TRUE（结果为 TRUE）** - 匹配正则表达式<br>**Result is FALSE（结果为 FALSE）** - 不匹配正则表达式| |^|*Expression（表达式）*|输入子字符串/正则表达式。| |*Delimiter（分隔符）*|<|逗号 (,)、点 (.) 或正斜杠 (/) 用于分隔正则表达式中的文本字符串。当选择“*包含任意字符串*”的表达式类型时，此参数才有效 。| |*Case sensitive（区分大小写）*|<|一个复选框，用于指定正则表达式对大小写字母的敏感性。|  表达式中的正斜杠 (/) 按字面意思处理，而不是分隔符。这样就可以保存包含斜杠的表达式而不会出错。  ::: noteimportant Zabbix 中的自定义正则表达式名称可能包含逗号、空格等。在那些可能导致引用时误解的情况下（例如，监控项键值参数中的逗号）整个引用可能会像这样放在引号中：*"\@My custom regexp for purpose1, purpose2"*。 正则表达式名称不得在其他位置引用（例如，在 LLD 规则属性中）。 :::  在 **测试** 选项卡中，可以通过提供测试字符串来测试正则表达式及其子表达式。  ![](../../assets/en/manual/regular_expressions/global_regexp_b.png)  结果显示每个子表达式的状态和总的自定义表达式状态。  总自定义表达式状态定义为*组合结果*。如果定义了多个子表达式，Zabbix 使用 AND 逻辑运算符计算 *组合结果* 。这意味着如果至少一个 Result 为 False，*组合结果* 也为 False 状态。

en-us	 ### GLPi integration  A new [GLPi integration](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/media/glpi/) is available allowing to use the [webhook](/manual/config/notifications/media/webhook) media type to create problems in GLPi Assistance section based on Zabbix problem notifications.
zh-cn	 ### GLPi 集成  一个新的 [GLPi 集成](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/media/glpi/) 允许使用 [webhook](/manual/config/notifications/media/webhook) 媒体类型，用于根据 Zabbix 问题通知在 GLPi 协助部分创建问题。

en-us	 #### Golang libraries  |Requirement|Mandatory status|Minimum version|Description| |--|-|-|-------| |[git.zabbix.com/ap/plugin-support](https://git.zabbix.com/projects/AP/repos/plugin-support)|Yes|1.X.X|Zabbix own support library. Mostly for plugins. | |[github.com/jackc/pgx/v4](https://github.com/jackc/pgx)|^|4.17.2|PostgreSQL driver. | |[github.com/omeid/go-yarn](https://github.com/omeid/go-yarn)|^|0.0.1|Embeddable filesystem mapped key-string store. | |[github.com/jackc/chunkreader/v2](https://github.com/jackc/chunkreader/v2)|Indirect^**1**^|2.0.1| | |[github.com/jackc/pgconn](https://github.com/jackc/pgconn)|^|1.13.0| | |[github.com/jackc/pgio](https://github.com/jackc/pgio)|^|1.0.0| | |[github.com/jackc/pgpassfile](https://github.com/jackc/pgpassfile)|^|1.0.0| | |[github.com/jackc/pgproto3/v2](https://github.com/jackc/pgproto3/v2)|^|2.3.1| | |[github.com/jackc/pgservicefile](https://github.com/jackc/pgservicefile)|^|0.0.0| | |[github.com/jackc/pgtype](https://github.com/jackc/pgtype)|^|1.12.0| | |[github.com/jackc/puddle](https://github.com/jackc/puddle)|^|1.3.0| | |[github.com/natefinch/npipe](https://github.com/natefinch/npipe)|^|0.0.0| | |[golang.org/x/crypto](https://golang.org/x/crypto)|^|0.0.0| | |[golang.org/x/sys](https://golang.org/x/sys)|^|0.0.0| | |[golang.org/x/text](https://golang.org/x/text)|^|0.3.7| |  ^**1**^ "Indirect" means that it is used in one of the libraries that the agent uses. It's required since Zabbix uses the library that uses the package.
zh-cn	#### Golang 库  |要求|强制状态|最低版本|说明| |--|-|-|--------| |[git.zabbix.com/ap/plugin-support](https://git.zabbix.com/projects/AP/repos/plugin-support)|是|1.X.X|Zabbix 自己的支持库。 主要用于插件。 | |[github.com/jackc/pgx/v4](https://github.com/jackc/pgx)|^|4.17.2|PostgreSQL 驱动程序。 | |[github.com/omeid/go-yarn](https://github.com/omeid/go-yarn)|^|0.0.1|可嵌入文件系统映射键字符串存储。 | |[github.com/jackc/chunkreader/v2](https://github.com/jackc/chunkreader/v2)|间接^**1**^|2.0.1| | |[github.com/jackc/pgconn](https://github.com/jackc/pgconn)|^|1.13.0| | |[github.com/jackc/pgio](https://github.com/jackc/pgio)|^|1.0.0| | |[github.com/jackc/pgpassfile](https://github.com/jackc/pgpassfile)|^|1.0.0| | |[github.com/jackc/pgproto3/v2](https://github.com/jackc/pgproto3/v2)|^|2.3.1| | |[github.com/jackc/pgservicefile](https://github.com/jackc/pgservicefile)|^|0.0.0| | |[github.com/jackc/pgtype](https://github.com/jackc/pgtype)|^|1.12.0| | |[github.com/jackc/puddle](https://github.com/jackc/puddle)|^|1.3.0| | |[github.com/natefinch/npipe](https://github.com/natefinch/npipe)|^|0.0.0| | |[golang.org/x/crypto](https://golang.org/x/crypto)|^|0.0.0| | |[golang.org/x/sys](https://golang.org/x/sys)|^|0.0.0| | |[golang.org/x/text](https://golang.org/x/text)|^|0.3.7| |  ^**1**^ “间接”表示它用于agent使用的库之一。 这是必需的，因为 Zabbix 使用使用该包的库。

en-us	 #### Golang libraries  |Requirement|Mandatory status|Minimum version|Description| |--|-|-|-------| |[git.zabbix.com/ap/plugin-support](https://git.zabbix.com/projects/AP/repos/plugin-support)|Yes|1.X.X|Zabbix own support library. Mostly for plugins. | |[go.mongodb.org/mongo-driver](https://go.mongodb.org/mongo-driver)|^|1.7.6|Named read/write locks, access sync. | |[github.com/go-stack/stack](https://github.com/go-stack/stack)|Indirect^**1**^|1.8.0|Required package for MongoDB plugin mongo-driver lib. | |[github.com/golang/snappy](https://github.com/golang/snappy)|^|0.0.1|Required package for MongoDB plugin mongo-driver lib. | |[github.com/klauspost/compress](https://github.com/klauspost/compress)|^|1.13.6|Required package for MongoDB plugin mongo-driver lib. | |[github.com/natefinch/npipe](https://github.com/natefinch/npipe)|^|0.0.0|Required package for MongoDB plugin mongo-driver lib. | |[github.com/pkg/errors](https://github.com/pkg/errors)|^|0.9.1|Required package for MongoDB plugin mongo-driver lib. | |[github.com/xdg-go/pbkdf2](https://github.com/xdg-go/pbkdf2)|^|1.0.0|Required package for MongoDB plugin mongo-driver lib. | |[github.com/xdg-go/scram](https://github.com/xdg-go/scram)|^|1.0.2|Required package for MongoDB plugin mongo-driver lib. | |[github.com/xdg-go/stringprep](https://github.com/xdg-go/stringprep)|^|1.0.2|Required package for MongoDB plugin mongo-driver lib. | |[github.com/youmark/pkcs8](https://github.com/youmark/pkcs8)|^|0.0.0|Required package for MongoDB plugin mongo-driver lib. | |[golang.org/x/crypto](https://golang.org/x/crypto)|^|0.0.0|Required package for MongoDB plugin mongo-driver lib. | |[golang.org/x/sync](https://golang.org/x/sync)|^|0.0.0|Required package for MongoDB plugin mongo-driver lib. | |[golang.org/x/sys](https://golang.org/x/sys)|^|0.0.0|Required package for MongoDB plugin mongo-driver lib. | |[golang.org/x/text](https://golang.org/x/text)|^|0.3.7|Required package for MongoDB plugin mongo-driver lib. |  ^**1**^ "Indirect" means that it is used in one of the libraries that the agent uses. It's required since Zabbix uses the library that uses the package.
zh-cn	#### Golang 库  |要求|强制状态|最低版本|说明| |--|-|-|--------| |[git.zabbix.com/ap/plugin-support](https://git.zabbix.com/projects/AP/repos/plugin-support)|是|1.X.X|Zabbix 自己的支持库。 主要用于插件。 | |[go.mongodb.org/mongo-driver](https://go.mongodb.org/mongo-driver)|^|1.7.6|命名读/写锁，访问同步。 | |[github.com/go-stack/stack](https://github.com/go-stack/stack)|Indirect^**1**^|1.8.0|MongoDB插件mongo-driver lib所需包 . | |[github.com/golang/snappy](https://github.com/golang/snappy)|^|0.0.1|MongoDB 插件 mongo-driver lib 所需的包。 | |[github.com/klauspost/compress](https://github.com/klauspost/compress)|^|1.13.6|MongoDB 插件 mongo-driver lib 所需的软件包。 | |[github.com/natefinch/npipe](https://github.com/natefinch/npipe)|^|0.0.0|MongoDB 插件 mongo-driver lib 所需的包。 | |[github.com/pkg/errors](https://github.com/pkg/errors)|^|0.9.1|MongoDB 插件 mongo-driver lib 所需的软件包。 | |[github.com/xdg-go/pbkdf2](https://github.com/xdg-go/pbkdf2)|^|1.0.0|MongoDB 插件 mongo-driver lib 所需的包。 | |[github.com/xdg-go/scram](https://github.com/xdg-go/scram)|^|1.0.2|MongoDB 插件 mongo-driver lib 所需的包。 | |[github.com/xdg-go/stringprep](https://github.com/xdg-go/stringprep)|^|1.0.2|MongoDB 插件 mongo-driver lib 所需的包。 | |[github.com/youmark/pkcs8](https://github.com/youmark/pkcs8)|^|0.0.0|MongoDB 插件 mongo-driver lib 所需的包。 | |[golang.org/x/crypto](https://golang.org/x/crypto)|^|0.0.0|MongoDB 插件 mongo-driver lib 所需的包。 | |[golang.org/x/sync](https://golang.org/x/sync)|^|0.0.0|MongoDB 插件 mongo-driver lib 所需的包。 | |[golang.org/x/sys](https://golang.org/x/sys)|^|0.0.0|MongoDB 插件 mongo-driver lib 所需的包。 | |[golang.org/x/text](https://golang.org/x/text)|^|0.3.7|MongoDB 插件 mongo-driver lib 所需的包。 |  ^**1**^ “间接”表示它用于agent使用的库之一。 这是必需的，因为 Zabbix 使用使用该包的库。

en-us	#### graph  Changes:\ [ZBX-7706](https://support.zabbix.com/browse/ZBX-7706) `graph.get`: Graph availability doesn't depend on permissions to items specified in graph "ymin_itemid" and "ymax_itemid" fields.\ Graph having MIN or MAX Y axis linked to inaccessible items will still be accessible but MIN/MAX Y axis works the same way as if specified calculation method is "Calculated".\
zh-cn	#### 图形  变化：\ [ZBX-7706](https://support.zabbix.com/browse/ZBX-7706)`graph.get`：图形可用性不依赖于图形“ymin_itemid”和“ymax_itemid”字段中指定监控项的权限。 \ 具有链接到不可访问监控项的 MIN 或 MAX Y 轴的图表仍然可以访问，但 MIN/MAX Y 轴的工作方式与指定的计算方法为“已计算”时的工作方式相同。\

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

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

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

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

en-us	### Graph item  ::: noteclassic Graph items can only be modified via the `graph` API. :::  The graph item object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |gitemid|string|*(readonly)* ID of the graph item.| |**color**<br>(required)|string|Graph item's draw color as a hexadecimal color code.| |**itemid**<br>(required)|string|ID of the item.| |calc\_fnc|integer|Value of the item that will be displayed.<br><br>Possible values:<br>1 - minimum value;<br>2 - *(default)* average value;<br>4 - maximum value;<br>7 - all values;<br>9 - last value, used only by pie and exploded graphs.| |drawtype|integer|Draw style of the graph item.<br><br>Possible values:<br>0 - *(default)* line;<br>1 - filled region;<br>2 - bold line;<br>3 - dot;<br>4 - dashed line;<br>5 - gradient line.| |graphid|string|ID of the graph that the graph item belongs to.| |sortorder|integer|Position of the item in the graph.<br><br>Default: starts with 0 and increases by one with each entry.| |type|integer|Type of graph item.<br><br>Possible values:<br>0 - *(default)* simple;<br>2 - graph sum, used only by pie and exploded graphs.| |yaxisside|integer|Side of the graph where the graph item's Y scale will be drawn.<br><br>Possible values:<br>0 - *(default)* left side;<br>1 - right side.|
zh-cn	 ### 图表监控项  ::: noteclassic 图表监控项只能通过 `graph`API 进行修改。 :::  图表监控项对象有以下属性。  |属性|[类型](/manual/api/reference_commentary#数据类型)|描述| |--------|---------------------------------------------------|-----------| |gitemid|string|*（只读）* 图表监控项ID。| |**color**<br>（必选）|string|图表监控项的绘制颜色是十六进制的颜色代码。| |**itemid**<br>（必选）|string|项目ID。| |calc\_fnc|integer|监控项的值将被展示。<br><br>可用值：<br>1 - 最小值；<br>2 - *（默认）* 平均值；<br>4 - 最大值；<br>7 - 所有值；<br>9 - 最后一个值，仅用于饼图和分散饼图。| |drawtype|integer|图表监控项的绘制样式。<br><br>可用值：<br>0 - *（默认）* 折线图；<br>1 - 填充图；<br>2 - 加粗折线图；<br>3 - 散点图；<br>4 - 虚线折线图；<br>5 - 梯度直方图。| |graphid|string|图表监控项所属图表的ID。| |sortorder|integer|该监控项在图表中的位置。<br><br>默认值：从0开始，每增加一个条目就增加一。| |type|integer|图表监控项类型。<br><br>可用值：<br>0 - *（默认）* 简单；<br>2 - 图表的总和，仅用于饼图和离散图。| |yaxisside|integer|该图表项目的Y轴将被绘制在图表的一侧。<br><br>可用值：<br>0 - *（默认）* 左侧；<br>1 - 右侧。|

en-us	### Graph item  ::: noteclassic Graph items can only be modified via the `graph` API. :::  The graph item object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--------|---------------------------------------------------|-----------| |gitemid|string|*(readonly)* ID of the graph item.| |**color**<br>(required)|string|Graph item's draw color as a hexadecimal color code.| |**itemid**<br>(required)|string|ID of the item.| |calc\_fnc|integer|Value of the item that will be displayed.<br><br>Possible values:<br>1 - minimum value;<br>2 - *(default)* average value;<br>4 - maximum value;<br>7 - all values;<br>9 - last value, used only by pie and exploded graphs.| |drawtype|integer|Draw style of the graph item.<br><br>Possible values:<br>0 - *(default)* line;<br>1 - filled region;<br>2 - bold line;<br>3 - dot;<br>4 - dashed line;<br>5 - gradient line.| |graphid|string|ID of the graph that the graph item belongs to.| |sortorder|integer|Position of the item in the graph.<br><br>Default: starts with 0 and increases by one with each entry.| |type|integer|Type of graph item.<br><br>Possible values:<br>0 - *(default)* simple;<br>2 - graph sum, used only by pie and exploded graphs.| |yaxisside|integer|Side of the graph where the graph item's Y scale will be drawn.<br><br>Possible values:<br>0 - *(default)* left side;<br>1 - right side.|
zh-cn	 ### 图表监控项  ::: noteclassic 图表监控项只能通过 `graph`API 进行修改。 :::  图表监控项对象有以下属性。  |属性|[类型](/manual/api/reference_commentary#数据类型)|描述| |--------|---------------------------------------------------|-----------| |gitemid|string|*（只读）* 图表监控项ID。| |**color**<br>（必选）|string|图表监控项的绘制颜色是十六进制的颜色代码。| |**itemid**<br>（必选）|string|项目ID。| |calc\_fnc|integer|监控项的值将被展示。<br><br>可用值：<br>1 - 最小值；<br>2 - *（默认）* 平均值；<br>4 - 最大值；<br>7 - 所有值；<br>9 - 最后一个值，仅用于饼图和分散饼图。| |drawtype|integer|图表监控项的绘制样式。<br><br>可用值：<br>0 - *（默认）* 折线图；<br>1 - 填充图；<br>2 - 加粗折线图；<br>3 - 散点图；<br>4 - 虚线折线图；<br>5 - 梯度直方图。| |graphid|string|图表监控项所属图表的ID。| |sortorder|integer|该监控项在图表中的位置。<br><br>默认值：从0开始，每增加一个条目就增加一。| |type|integer|图表监控项类型。<br><br>可用值：<br>0 - *（默认）* 简单；<br>2 - 图表的总和，仅用于饼图和离散图。| |yaxisside|integer|该图表项目的Y轴将被绘制在图表的一侧。<br><br>可用值：<br>0 - *（默认）* 左侧；<br>1 - 右侧。|

en-us	# > Graph item object  The following objects are directly related to the `graphitem` API.
zh-cn	 # > 图表监控项对象  以下对象与 `图表监控项` API直接相关。

en-us	# Graph item  This class is designed to work with graph items.  Object references:\  -   [Graph item](/manual/api/reference/graphitem/object#graph_item)  Available methods:\  -   [graphitem.get](/manual/api/reference/graphitem/get) - retrieving     graph items
zh-cn	# 图表监控项  这个类别旨在为主机使用。  对象引用：\  -   [图表监控项](/manual/api/reference/graphitem/object#图表监控项)  可用方法：\  -   [graphitem.get](/manual/api/reference/graphitem/get) - 获取图表监控项

en-us	# > Graph object  The following objects are directly related to the `graph` API.
zh-cn	 # > 图表对象  以下这些对象与 `graph` API 直接相关。

en-us	##### Graph preview  In the *Preview* tab, a preview of the graph is displayed so you can immediately see what you are creating.  ![](../../../../../assets/en/manual/config/visualization/graph_preview.png){width="600"}  Note that the preview will not show any data for template items.  ![](../../../../../assets/en/manual/config/visualization/graph_preview2.png){width="600"}  In this example, pay attention to the dashed bold line displaying the trigger level and the trigger information displayed in the legend.  ::: noteclassic No more than 3 trigger lines can be displayed. If there are more triggers then the triggers with lower severity are prioritized for display.\ \ If graph height is set as less than 120 pixels, no trigger will be displayed in the legend. :::
zh-cn	##### 图表预览  在 *预览* 选项卡中，将显示图形的预览，以便您可以立即查看您正在创建的内容。  ![](../../../../../assets/en/manual/config/visualization/graph_preview.png){width="600"}  请注意，预览不会显示模板项的任何数据。  ![](../../../../../assets/en/manual/config/visualization/graph_preview2.png){width="600"}  在此示例中，请注意显示触发级别的粗虚线和图例中显示的触发信息。  ::: noteclassic 最多可显示 3 条触发线。如果有更多的触发器，然后具有较低严重性的触发器被优先用于展示。\ \ 如果图形高度设置为小于 120 像素，则不会触发显示在图例中。 :::

en-us	#### graphprototype  Changes:\ [ZBX-7706](https://support.zabbix.com/browse/ZBX-7706) `graphprototype.get`: Graph prototype availability doesn't depend on permissions to items specified in graph prototype "ymin_itemid" and "ymax_itemid" fields.\
zh-cn	####图形原型  变化：\ [ZBX-7706](https://support.zabbix.com/browse/ZBX-7706)`graphprototype.get`：图形原型可用性不依赖于图形原型“ymin_itemid”和“ymax_itemid”中指定监控项的权限字段。\

en-us	# graphprototype.create
zh-cn	# 创建图表原型

en-us	# graphprototype.delete
zh-cn	# 删除图表原型

en-us	# graphprototype.get
zh-cn	# 查询图表原型

en-us	# > Graph prototype object  The following objects are directly related to the `graphprototype` API.
zh-cn	# > 图表原型对象  以下对象与 `图表原型` API直接相关。

en-us	#### Graph prototypes  The following screenshot illustrates how we can use these macros in graph prototypes:  ![](../../../../../assets/en/manual/discovery/low_level_discovery/graph_prototype_snmp.png)  ![](../../../../../assets/en/manual/discovery/low_level_discovery/graph_prototypes_snmp.png)  A summary of our discovery rule:  ![](../../../../../assets/en/manual/discovery/low_level_discovery/lld_rules_snmp.png)
zh-cn	#### 图形原型  下面的截图演示了如何在图形原型中使用宏:  ![](../../../../../assets/en/manual/discovery/low_level_discovery/graph_prototype_snmp.png)  ![](../../../../../assets/en/manual/discovery/low_level_discovery/graph_prototypes_snmp.png)  刚才创建的自动发现规则整体展示:  ![](../../../../../assets/en/manual/discovery/low_level_discovery/lld_rules_snmp.png)

en-us	### Graph prototype  The graph prototype object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |graphid|string|*(readonly)* ID of the graph prototype.| |**height**<br>(required)|integer|Height of the graph prototype in pixels.| |**name**<br>(required)|string|Name of the graph prototype.| |**width**<br>(required)|integer|Width of the graph prototype in pixels.| |graphtype|integer|Graph prototypes's layout type.<br><br>Possible values:<br>0 - *(default)* normal;<br>1 - stacked;<br>2 - pie;<br>3 - exploded.| |percent\_left|float|Left percentile.<br><br>Default: 0.| |percent\_right|float|Right percentile.<br><br>Default: 0.| |show\_3d|integer|Whether to show discovered pie and exploded graphs in 3D.<br><br>Possible values:<br>0 - *(default)* show in 2D;<br>1 - show in 3D.| |show\_legend|integer|Whether to show the legend on the discovered graph.<br><br>Possible values:<br>0 - hide;<br>1 - *(default)* show.| |show\_work\_period|integer|Whether to show the working time on the discovered graph.<br><br>Possible values:<br>0 - hide;<br>1 - *(default)* show.| |templateid|string|*(readonly)* ID of the parent template graph prototype.| |yaxismax|float|The fixed maximum value for the Y axis.| |yaxismin|float|The fixed minimum value for the Y axis.| |ymax\_itemid|string|ID of the item that is used as the maximum value for the Y axis.<br><br>Starting with Zabbix 6.0.7, if user have no access to specified item, the graph is rendered like ymax\_type would be set to '0' (calculated).| |ymax\_type|integer|Maximum value calculation method for the Y axis.<br><br>Possible values:<br>0 - *(default)* calculated;<br>1 - fixed;<br>2 - item.| |ymin\_itemid|string|ID of the item that is used as the minimum value for the Y axis.<br><br>Starting with Zabbix 6.0.7, if user have no access to specified item, the graph is rendered like ymin\_type would be set to '0' (calculated).| |ymin\_type|integer|Minimum value calculation method for the Y axis.<br><br>Possible values:<br>0 - *(default)* calculated;<br>1 - fixed;<br>2 - item.| |discover|integer|Graph prototype discovery status.<br><br>Possible values:<br>0 - *(default)* new graphs will be discovered;<br>1 - new graphs will not be discovered and existing graphs will be marked as lost.| |uuid|string|Universal unique identifier, used for linking imported graph prototypes to already existing ones. Used only for graph prototypes on templates. Auto-generated, if not given.<br><br>For update operations this field is *readonly*.|  Note that for some methods (update, delete) the required/optional parameter combination is different.
zh-cn	### 图表原型  图表原型对象具有以下属性。  |属性|[类型](/manual/api/reference_commentary#data_types)|描述| |--------|---------------------------------------------------|-----------| |graphid|字符|*（只读）* 图表原型的 ID。| |**height**<br>（必需）|整数|图表原型的高度，以像素为单位。| |**name**<br>（必需）|字符|图表原型的名称。| |**width**<br>（必需）|整数|图表原型的宽度，以像素为单位。| |graphtype|整数|图表原型的布局类型。<br><br>可能的取值：<br>0 - *（默认）* 普通；<br>1 - 堆积图；<br>2 - 饼图；<br>3 - 分散饼图。| |percent\_left|浮点数|左百分比。<br><br>默认：0.| |percent\_right|浮点数|右百分比。<br><br>默认：0.| |show\_3d|整数|是否以3D形式展示饼图和分散饼图。<br><br>可能的取值：<br>0 - *（默认）* 以2D展示；<br>1 - 以3D展示。| |show\_legend|整数|是否在已发现的图表上显示图例。<br><br>可能的取值：<br>0 - 隐藏；<br>1 - *（默认）* 显示。| |show\_work\_period|整数|是否在已发现的图表上显示工作时间。<br><br>可能的取值：<br>0 - 隐藏；<br>1 - *（默认）* 显示。| |templateid|字符|*（只读）* 父模板图表原型的ID。| |yaxismax|浮点数|Y轴的固定最大值。| |yaxismin|浮点数|Y轴的固定最小值。| |ymax\_itemid|字符|用于作为Y轴最大值的监控项的ID。<br><br>从 Zabbix 6.0.7 开始，如果用户无权访问指定监控项，则图形呈现为 ymax\_type 将设置为“0”（计算）。| |ymax\_type|整数|Y轴最大值的计算方式。<br><br>可能的取值：<br>0 - *（默认）* 可计算的；<br>1 - 固定的；<br>2 - 监控项。| |ymin\_itemid|字符|用于作为Y轴最小值的监控项的ID。<br><br>从 Zabbix 6.0.7 开始，如果用户无权访问指定监控项，则图形呈现为 ymax\_type 将设置为“0”（计算）。| |ymin\_type|整数|Y轴最小值的计算方式。<br><br>可能的取值：<br>0 - *（默认）* 可计算的；<br>1 - 固定的；<br>2 - 监控项。| |discover|整数|图表原型的发现状态。<br><br>可能的取值：<br>0 - *（默认）* 将会发现新的图表。<br>1 - 将不会发现新的图表，现有的图表将被标记为丢失。| |uuid|字符|唯一通用标识符，用于将导入的图表原型与已有的图表原型联系起来。只用于模板上的图表原型。如果没有给出，则自动生成。 <br><br>对于更新操作，这个字段是*只读*的。 | 注意，对于某些方法（更新、删除），必需/可选参数组合是不同的。

en-us	# Graph prototype  This class is designed to work with graph prototypes.  Object references:\  -   [Graph     prototype](/manual/api/reference/graphprototype/object#graph_prototype)  Available methods:\  -   [graphprototype.create](/manual/api/reference/graphprototype/create) -     creating new graph prototypes -   [graphprototype.delete](/manual/api/reference/graphprototype/delete) -     deleting graph prototypes -   [graphprototype.get](/manual/api/reference/graphprototype/get) -     retrieving graph prototypes -   [graphprototype.update](/manual/api/reference/graphprototype/update) -     updating graph prototypes
zh-cn	 # 图表原型  这个类旨在为图表原型使用。  对象引用:\  -   [图表原型](/manual/api/reference/graphprototype/object#graph_prototype)  可用的方法:\  -   [graphprototype.create](/manual/api/reference/graphprototype/create) - 创建图表原型 -   [graphprototype.delete](/manual/api/reference/graphprototype/delete) - 删除图表原型 -   [graphprototype.get](/manual/api/reference/graphprototype/get) - 检索图表原型 -   [graphprototype.update](/manual/api/reference/graphprototype/update) - 升级图表原型

en-us	# graphprototype.update
zh-cn	# 更新图表原型

en-us	#### Graphs  Changes to Daylight Saving Time (DST) result in irregularities when displaying X axis labels (date duplication, date missing, etc).
zh-cn	#### Graphs 图形  更改为夏令时 (DST) 会导致显示 X 轴标签时出现异常（例如日期重复、日期缺失等）。

en-us	#### Graphs  Changes to Daylight Saving Time (DST) result in irregularities when displaying X axis labels (date duplication, date missing, etc).  
zh-cn	#### Graphs 图形  更改为夏令时 (DST) 会导致显示 X 轴标签时出现异常（例如日期重复、日期缺失等）。

en-us	#### Graphs  Edit graphs or separate graph items for better presentation of the gathered data.  [Graph API](/manual/api/reference/graph) | [Graph item API](/manual/api/reference/graphitem)
zh-cn	#### 图形  编辑图形或单独的图形项，以便更好地呈现收集的数据。  [Graph API](/manual/api/reference/graph) | [Graph item API](/manual/api/reference/graphitem)

en-us	##### Graphs  With the item working for a while, it might be time to see something visual. [Simple graphs](/manual/config/visualization/graphs/simple) are available for any monitored numeric item without any additional configuration. These graphs are generated on runtime.  To view the graph, go to *Monitoring → Latest data* and click on the 'Graph' link next to the item.  ![](../../../assets/en/manual/quickstart/simple_graph.png){width="600"}
zh-cn	##### 图表  当监控项运行了一段时间后，可以查看可视化图表。 [简单图表](/manual/config/visualization/graphs/simple) 适用于任何信息类型为数值型的监控项，且不需要额外的配置。这些图表会在运行时生成。  前往*Monitoring → Latest data*，然后点击监控项后的”图表“'链接来查看。  ![](../../../assets/en/manual/quickstart/simple_graph.png){width="600"}

en-us	### Graph  The graph object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |graphid|string|*(readonly)* ID of the graph.| |**height**<br>(required)|integer|Height of the graph in pixels.| |**name**<br>(required)|string|Name of the graph| |**width**<br>(required)|integer|Width of the graph in pixels.| |flags|integer|*(readonly)* Origin of the graph.<br><br>Possible values are:<br>0 - *(default)* a plain graph;<br>4 - a discovered graph.| |graphtype|integer|Graph's layout type.<br><br>Possible values:<br>0 - *(default)* normal;<br>1 - stacked;<br>2 - pie;<br>3 - exploded.| |percent\_left|float|Left percentile.<br><br>Default: 0.| |percent\_right|float|Right percentile.<br><br>Default: 0.| |show\_3d|integer|Whether to show pie and exploded graphs in 3D.<br><br>Possible values:<br>0 - *(default)* show in 2D;<br>1 - show in 3D.| |show\_legend|integer|Whether to show the legend on the graph.<br><br>Possible values:<br>0 - hide;<br>1 - *(default)* show.| |show\_work\_period|integer|Whether to show the working time on the graph.<br><br>Possible values:<br>0 - hide;<br>1 - *(default)* show.| |show\_triggers|integer|Whether to show the trigger line on the graph.<br><br>Possible values:<br>0 - hide;<br>1 - *(default)* show.| |templateid|string|*(readonly)* ID of the parent template graph.| |yaxismax|float|The fixed maximum value for the Y axis.<br><br>Default: 100.| |yaxismin|float|The fixed minimum value for the Y axis.<br><br>Default: 0.| |ymax\_itemid|string|ID of the item that is used as the maximum value for the Y axis.<br><br>Starting with Zabbix 6.0.7, if user have no access to specified item, the graph is rendered like ymax\_type would be set to '0' (calculated).| |ymax\_type|integer|Maximum value calculation method for the Y axis.<br><br>Possible values:<br>0 - *(default)* calculated;<br>1 - fixed;<br>2 - item.| |ymin\_itemid|string|ID of the item that is used as the minimum value for the Y axis.<br><br>Starting with Zabbix 6.0.7, if user have no access to specified item, the graph is rendered like ymax\_type would be set to '0' (calculated).| |ymin\_type|integer|Minimum value calculation method for the Y axis.<br><br>Possible values:<br>0 - *(default)* calculated;<br>1 - fixed;<br>2 - item.| |uuid|string|Universal unique identifier, used for linking imported graphs to already existing ones. Used only for graphs on templates. Auto-generated, if not given.<br><br>For update operations this field is *readonly*.|  Note that for some methods (update, delete) the required/optional parameter combination is different.
zh-cn	### 图表  图表对象具有以下属性。  |特性|[类型](/manual/api/reference_commentary#数据类型)|描述| |--------|---------------------------------------------------|-----------| |graphid|字符|*（只读）* 图表的 ID。| |**height**<br>(必选)|整数|图表的高度，以像素为单位。| |**name**<br>(必选)|字符|图表的名称。| |**width**<br>(必选)|整数|图表的宽度，以像素为单位。| |flags|整数|*(只读)* 图表的来源。<br><br>可用值：<br>0 - *（默认）* 普通图表；<br>4 - 发现的图表。| |graphtype|整数|图表的布局类型。<br><br>可用值：<br>0 - *（默认）* 常规；<br>1 - 堆积图；<br>2 - 饼图；<br>3 - 分散饼图。| |percent\_left|浮点数|左百分比。<br><br>默认：0。| |percent\_right|浮点数|右百分比。<br><br>默认：0。| |show\_3d|整数|是否以3D形式展示饼图和分散饼图。<br><br>可用值：<br>0 - *（默认）* 以2D展示；<br>1 - 以3D展示。| |show\_legend|整数|是否在图表上显示图例。<br><br>可用值：<br>0 - 隐藏；<br>1 - *（默认）* 显示。| |show\_work\_period|整数|是否在图表上显示工作时间。<br><br>可用值：<br>0 - 隐藏；<br>1 - *（默认）* 显示。| |show\_triggers|整数|是否在图表上显示触发线。<br><br>可用值：<br>0 - 隐藏；<br>1 - *（默认）* 显示。| |templateid|字符|*（只读）* 父模板图表的ID。| |yaxismax|浮点数|Y轴的固定最大值。<br><br>默认：100。| |yaxismin|浮点数|Y轴的固定最小值。<br><br>默认：0。| |ymax\_itemid|字符|用于作为Y轴最大值的监控项的ID。<br><br>从 Zabbix 6.0.7 开始，如果用户无权访问指定监控项，则图形呈现为 ymax\_type 将设置为“0”（计算）。| |ymax\_type|整数|Y轴最大值的计算方式。<br><br>可用值：<br>0 - *（默认）* 可计算的；<br>1 - 固定的；<br>2 - 监控项。| |ymin\_itemid|字符|用于作为Y轴最小值的监控项的ID。<br><br>从 Zabbix 6.0.7 开始，如果用户无权访问指定监控项，则图形呈现为 ymax\_type 将设置为“0”（计算）。| |ymin\_type|整数|Y轴最小值的计算方式。<br><br>可用值：<br>0 - *（默认）* 可计算的；<br>1 - 固定的；<br>2 - 监控项。| |uuid|字符|唯一通用标识符，用于将导入的图表与已有的图表联系起来。只用于模板上的图形。如果没有给出，则自动生成。 <br><br>对于更新操作，这个字段是*只读*的。| 注意，对于某些方法（更新、删除），必需/可选参数组合是不同的。

en-us	# Graph  This class is designed to work with graphs.  Object references:\  -   [Graph](/manual/api/reference/graph/object#graph)  Available methods:\  -   [graph.create](/manual/api/reference/graph/create) - creating new     graphs -   [graph.delete](/manual/api/reference/graph/delete) - deleting graphs -   [graph.get](/manual/api/reference/graph/get) - retrieving graphs -   [graph.update](/manual/api/reference/graph/update) - updating graphs
zh-cn	# 图表  这个类旨在为监控项使用。  对象参考：\  -   [图表](/manual/api/reference/graph/object#graph)  可用方法：\  -   [graph.create](/manual/api/reference/graph/create) - 创建图表 -   [graph.delete](/manual/api/reference/graph/delete) - 删除图表 -   [graph.get](/manual/api/reference/graph/get) - 获取图表 -   [graph.update](/manual/api/reference/graph/update) - 更新图表

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

en-us	### Group link  The group link object links a host prototype with a host group and has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |group\_prototypeid|string|*(readonly)* ID of the group link.| |**groupid**<br>(required)|string|ID of the host group.| |hostid|string|*(readonly)* ID of the host prototype| |templateid|string|*(readonly)* ID of the parent template group link.|
zh-cn	### 组链接  组链接对象将主机原型与主机组链接，并具有以下属性:  |属性|[类型](/manual/api/reference_commentary#data_types)|描述| |--------|---------------------------------------------------|-----------| |group\_prototypeid|字符串|*(只读)* 组链接ID.| |**groupid**<br>(必选)|字符串|主机组ID。| |hostid|字符串|*(只读)* 主机原型ID。| |templateid|字符串|*(只读)* 父模板组链接ID。|

en-us	### Group link  The group link object links a host prototype with a host group and has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--------|---------------------------------------------------|-----------| |group\_prototypeid|string|*(readonly)* ID of the group link.| |**groupid**<br>(required)|string|ID of the host group.| |hostid|string|*(readonly)* ID of the host prototype| |templateid|string|*(readonly)* ID of the parent template group link.|
zh-cn	### 组链接  组链接对象将主机原型与主机组链接，并具有以下属性:  |属性|[类型](/manual/api/reference_commentary#data_types)|描述| |--------|---------------------------------------------------|-----------| |group\_prototypeid|字符串|*(只读)* 组链接ID.| |**groupid**<br>(必选)|字符串|主机组ID。| |hostid|字符串|*(只读)* 主机原型ID。| |templateid|字符串|*(只读)* 父模板组链接ID。|

en-us	### Group prototype  The group prototype object defines a group that will be created for a discovered host and has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |group\_prototypeid|string|*(readonly)* ID of the group prototype.| |**name**<br>(required)|string|Name of the group prototype.| |hostid|string|*(readonly)* ID of the host prototype| |templateid|string|*(readonly)* ID of the parent template group prototype.|
zh-cn	### 组原型  组原型对象定义将为已发现的主机创建的组，并具有以下属性:  |属性|[类型](/manual/api/reference_commentary#data_types)|描述| |--------|---------------------------------------------------|-----------| |group\_prototypeid|字符串|*(只读)* 组原型的ID。| |**name**<br>(必选)|字符串|组原型的名称。| |hostid|字符串|*(只读)*主机原型的ID。| |templateid|字符串|*(只读)* 父模板组原型的ID。|

en-us	### Group prototype  The group prototype object defines a group that will be created for a discovered host and has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--------|---------------------------------------------------|-----------| |group\_prototypeid|string|*(readonly)* ID of the group prototype.| |**name**<br>(required)|string|Name of the group prototype.| |hostid|string|*(readonly)* ID of the host prototype| |templateid|string|*(readonly)* ID of the parent template group prototype.|
zh-cn	### 组原型  组原型对象定义将为已发现的主机创建的组，并具有以下属性:  |属性|[类型](/manual/api/reference_commentary#data_types)|描述| |--------|---------------------------------------------------|-----------| |group\_prototypeid|字符串|*(只读)* 组原型的ID。| |**name**<br>(必选)|字符串|组原型的名称。| |hostid|字符串|*(只读)*主机原型的ID。| |templateid|字符串|*(只读)* 父模板组原型的ID。|

en-us	#### groups/group  |Parameter|Type|Description|Details| |---------|----|-----------|-------| |name|*string*|Group name.| |
zh-cn	#### 多个群组/单个群组  |参数|类型|描述|详细| |---------|----|-----------|-------| |name|*string*|群组名称。| |

en-us	#### GUI debugging  Problems related to the frontend performance may be diagnosed using the frontend [debug mode](/manual/web_interface/debug_mode).
zh-cn	#### 图形用户界面调试  与前端性能相关的问题可以使用前端[ [调试模式](/manual/web_interface/debug_mode)。

en-us	#### - GUI  This section provides customization of several frontend-related defaults.  ![](../../../../../assets/en/manual/web_interface/frontend_sections/administration/general_gui.png)  Configuration parameters:  |Parameter|Description| |---------|-----------| |*Default language*|Default language for users who have not specified a language in their profiles and guest users.<br>For more information, see [Installation of additional frontend languages](/manual/appendix/install/locales).| |*Default time zone*|Default [time zone](/manual/web_interface/time_zone#overview) for users who have not specified a time zone in their profiles and guest users.| |*Default theme*|Default theme for users who have not specified a theme in their profiles and guest users.| |*Limit for search and filter results*|Maximum amount of elements (rows) that will be displayed in a web-interface list, for example, in *Configuration → Hosts*.<br>*Note*: If set to, for example, '50', only the first 50 elements will be displayed in all affected frontend lists. If some list contains more than fifty elements, the indication of that will be the '+' sign in *"Displaying 1 to 50 of **50+** found"*. Also, if filtering is used and still there are more than 50 matches, only the first 50 will be displayed.| |*Max number of columns<br>and rows in overview tables*|Maximum number of columns and rows to display in Data overview and Trigger overview dashboard widgets. The same limit applies to both columns and rows. If more rows and/or columns than shown exist, the system will display a warning at the bottom of the table: "Not all results are displayed. Please provide more specific search criteria."| |*Max count of elements<br>to show inside table cell*|For entries that are displayed in a single table cell, no more than configured here will be shown.| |*Show warning if Zabbix server is down*|This parameter enables a warning message to be displayed in a browser window if the Zabbix server cannot be reached (possibly down). The message remains visible even if the user scrolls down the page. When hovered over, the message is temporarily hidden to reveal the contents underneath it.<br>This parameter is supported since Zabbix 2.0.1.| |*Working time*|This system-wide parameter defines working hours. In graphs, working time is displayed as a white background and non-working time is displayed as gray.<br>See [Time period specification](/manual/appendix/time_period) page for description of the time format.<br>[User macros](/manual/config/macros/user_macros) are supported (since Zabbix 3.4.0).| |*Show technical errors*|If checked, all registered users will be able to see technical errors (PHP/SQL). If unchecked, the information is only available to [Zabbix Super Admins](/manual/web_interface/frontend_sections/administration/users#users1) and users belonging to the user groups with enabled [debug mode](/manual/web_interface/debug_mode).| |*Max history display period*|Maximum time period for which to display historical data in *Monitoring* subsections: *Latest data*, *Web*, and in the *Data overview* dashboard widget.<br>Allowed range: 24 hours (default) - 1 week. [Time suffixes](/manual/appendix/suffixes), e.g. 1w (one week), 36h (36 hours), are supported.| |*Time filter default period*|Time period to be used in graphs and dashboards by default. Allowed range: 1 minute - 10 years (default: 1 hour).<br>[Time suffixes](/manual/appendix/suffixes), e.g. 10m (ten minutes), 5w (five weeks), are supported.<br>Note: when a user changes the time period while viewing a graph, this time period is stored as user preference, replacing the global default or a previous user selection.| |*Max period for time selector*|Maximum available time period for graphs and dashboards. Users will not be able to visualize older data. Allowed range: 1 year - 10 years (default: 2 years).<br>[Time suffixes](/manual/appendix/suffixes), e.g. 1y (one year), 365w (365 weeks), are supported.|
zh-cn	#### - 图形用户界面  本节提供了几个前端相关的定制 默认值。  ![](../../../../../assets/en/manual/web_interface/frontend_sections/administration/general_gui.png)  配置参数：  |参数|说明| |---------|------------| |*默认语言*|未在其个人资料中指定语言的用户和来宾用户的默认语言。<br>有关详细信息，请参阅[安装其他前端语言](/manual/appendix/install/locales)。| |*默认时区*|未在其个人资料中指定时区的用户和来宾用户的默认 [时区](/manual/web_interface/time_zone#overview)。| |*默认主题*|未在个人资料中指定主题的用户和来宾用户的默认主题。| |*搜索和过滤结果的限制*|将在 Web 界面列表中显示的元素（行）的最大数量，例如，在*配置 → 主机*中。<br>*注意*：如果设置为，则为例如: '50'，只有​​前 50 个元素将显示在所有受影响的前端列表中。如果某个列表包含超过 50 个元素，则显示为 *"Displaying 1 to 50 of **50+** found"* 中的 '+' 号。此外，如果使用过滤但仍然有超过 50 个匹配项，则只会显示前 50 个。| |*概览表中的最大列数和行数*|要在数据概览和触发器概览仪表板小部件中显示的最大列数和行数。相同的限制适用于列和行。如果存在多于显示的行和/或列，系统将在表格底部显示警告：“未显示所有结果。请提供更具体的搜索条件。”| |*最大元素计数<br>显示在表格单元格内*|对于在单个表格单元格中显示的条目，不会显示超出此处配置的数量。| |*如果 Zabbix 服务器关闭时显示警告*|如果无法访问 Zabbix 服务器（可能已关闭），此参数可以在浏览器窗口中显示警告消息。即使用户向下滚动页面，该消息仍然可见。将鼠标悬停在上方时，消息会暂时隐藏以显示其下方的内容。<br>自 Zabbix 2.0.1 起支持此参数。| |*工作时间*|这个系统范围的参数定义工作时间。在图表中，工作时间显示为白色背景，非工作时间显示为灰色。<br>有关时间格式的说明，请参见[时间段规范](/manual/appendix/time_period)页面。<br>[支持用户宏](/manual/config/macros/user_macros)（自 Zabbix 3.4.0 起）。| |*显示技术错误*|如果选中，所有注册用户都可以看到技术错误 (PHP/SQL)。如果未选中，则该信息仅对 [Zabbix Super Admins](/manual/web_interface/frontend_sections/administration/users#users1) 和属于启用了 [debug mode](/manual/web_interface/debug_mode) 的用户组的用户可用。 | |*最大历史显示周期*|在 *Monitoring* 小节中显示历史数据的最大时间周期：*最新数据*、*Web* 和 *数据概览* 仪表板小部件。<br>允许范围：24 小时（默认） - 1 周。 [时间后缀](/manual/appendix/suffixes)，例如支持1w（一周）、36h（36小时）。 |*时间过滤器默认时间段*|默认情况下用于图表和仪表板的时间段。允许的范围：1 分钟 - 10 年（默认值：1 小时）。<br>[时间后缀](/manual/appendix/suffixes)，例如支持 10m（十分钟）、5w（五周）。<br>注意：当用户在查看图表时更改时间段时，此时间段将存储为用户偏好，替换全局默认值或之前的用户选择.| |*时间选择器的最大时间段*|图表和仪表板的最大可用时间段。用户将无法可视化旧数据。允许范围：1 年 - 10 年（默认：2 年）。<br>[时间后缀](/manual/appendix/suffixes)，例如支持 1y（一年）、365w（365 周）。|

en-us	 ### Handling of NaN values in Prometheus preprocessing  There is a new behavior for handling (skipping) NaN values. So, if a dataset consists of  valid numeric values and NaNs, then NaN values are skipped and:  -   'avg', 'max', 'min', 'sum' return a result that is calculated from the valid values -   'count' returns the number of valid values  If all values in a dataset are NaNs then 'avg', 'max', 'min', and 'sum' return a "no data  (at least one value is required)" error, while 'count' returns 0.  Previously, if NaN was the first value in a dataset then:  -   'avg', 'max', 'min', 'sum' returned a "Value "NAN" of type "string" is not suitable for \ value type "Numeric (float)"" error -   'count' returned the number of values (including NaN values)  Also previously, if NaN was not the first value in a dataset then:  -   'avg', 'sum' returned a "Value "NAN" of type "string" is not suitable for \ value type "Numeric (float)"" error -   'max' returned the maximum of values until the first NaN was encountered -   'min' returned the minimum of values until the first NaN was encountered -   'count' returned the number of values (including NaN values)
zh-cn	  ### Prometheus 预处理 NaN 的值  这里会有一个新的行为去处理(跳过)NaN值。因此，如果一个数据集由有效的数值和NaN组成，那么NaN值将被跳过，并且:  -   'avg', 'max', 'min', 'sum' 会使用有效值进行计算并且返回结果 -   'count' 会返回有效值的个数  如果数据集中的所有值都是 NaN 那么 'avg', 'max', 'min', and 'sum' 会返回一个 "no data  (at least one value is required)" 的错误提示，并且 'count' 会返回 0。  以前，如果值 NaN 是数据集中的第一个值，那么:  -   'avg', 'max', 'min', 'sum' 会返回 "Value "NAN" of type "string" is not suitable for value type "Numeric (float)"" 的错误提示 -   'count' 会返回值的数量(包括 NaN 值)  同样在之前，如果值 NaN 不是数据集中的第一个值，那么:  -   'avg', 'sum' 会返回 "Value "NAN" of type "string" is not suitable for \ value type "Numeric (float)"" 的错误提示 -   'max' 返回在遇到第一个NaN之前的最大值 -   'min' 返回在遇到第一个NaN之前的最小值 -   'count' 返回值的数量(包括NaN值)

en-us	# hanode.get
zh-cn	# HA 节点获取

en-us	#### Hardware
zh-cn	#### 硬件

en-us	#### Hardware  General advice on hardware:  -   Use fastest processor available -   SCSI or SAS is better than IDE (performance of IDE disks may be     significantly improved by using utility hdparm) and SATA -   15K RPM is better than 10K RPM which is better than 7200 RPM -   Use fast RAID storage -   Use fast Ethernet adapter -   Having more memory is always better
zh-cn	#### 硬件  关于硬件的一些建议：  -   使用最快的处理器 -   SCSI 或 SAS 优于 IDE（使用实用程序 hdparm 可以显着提高 IDE 磁盘的性能）和 SATA -   15K RPM 优于 10K RPM，10K RPM优于 7200 RPM -   使用快速 RAID 存储 -   使用快速以太网适配器 -   内存越多越好

en-us	##### - HDD/flash image (raw)      dd if=./zabbix_appliance_5.2.0.raw of=/dev/sdc bs=4k conv=fdatasync  Replace */dev/sdc* with your Flash/HDD disk device.  
zh-cn	##### - HDD/flash image (raw)      dd if=./zabbix_appliance_5.2.0.raw of=/dev/sdc bs=4k conv=fdatasync  将 */dev/sdc* 替换为你的 Flash/HDD 磁盘设备。

en-us	#### Header processing  The CSV file header line can be processed in two different ways:  -   If the *With header row* checkbox is marked - header line values are     interpreted as column names. In this case the column names must be     unique and the data row should not contain more columns than the     header row; -   If the *With header row* checkbox is not marked - the header line is     interpreted as data. Column names are generated automatically     (1,2,3,4...)  CSV file example:      Nr,Item name,Key,Qty     1,active agent item,agent.hostname,33     "2","passive agent item","agent.version","44"     3,"active,passive agent items",agent.ping,55  ::: noteclassic A quotation character within a quoted field in the input must be escaped by preceding it with another quotation character. :::  **Processing header line**  JSON output when a header line is expected:  ``` {.json} [    {       "Nr":"1",       "Item name":"active agent item",       "Key":"agent.hostname",       "Qty":"33"    },    {       "Nr":"2",       "Item name":"passive agent item",       "Key":"agent.version",       "Qty":"44"    },    {       "Nr":"3",       "Item name":"active,passive agent items",       "Key":"agent.ping",       "Qty":"55"    } ] ```  **No header line processing**  JSON output when a header line is not expected:  ``` {.json} [    {       "1":"Nr",       "2":"Item name",       "3":"Key"       "4":"Qty"    },    {       "1":"1",       "2":"active agent item",       "3":"agent.hostname"       "4":"33"    },    {       "1":"2",       "2":"passive agent item",       "3":"agent.version"       "4":"44"    },    {       "1":"3",       "2":"active,passive agent items",       "3":"agent.ping"       "4":"55"    } ] ```
zh-cn	#### 标题预处理  CSV文件标题行可以用两种不同的方式处理:  -   如果勾选*With header row*  - 标题行值被解释为列名。在这种情况下，列名必须是唯一的，数据行不应该包含比标题行更多的列； -   如果勾选 *With header row*  - 标题行解释为数据。自动生成列名(1,2,3,4…)  CSV 文件示例:      Nr,Item name,Key,Qty     1,active agent item,agent.hostname,33     "2","passive agent item","agent.version","44"     3,"active,passive agent items",agent.ping,55  ::: noteclassic 输入中的引号字段中的引号字符必须在其前面加上另一个引号字符进行转义。 :::  **有标题行预处理**  有标题行预处理时期望JSON的输出:  ``` {.json} [    {       "Nr":"1",       "Item name":"active agent item",       "Key":"agent.hostname",       "Qty":"33"    },    {       "Nr":"2",       "Item name":"passive agent item",       "Key":"agent.version",       "Qty":"44"    },    {       "Nr":"3",       "Item name":"active,passive agent items",       "Key":"agent.ping",       "Qty":"55"    } ] ```  **无标题行预处理**  无标题行预处理时期望JSON的输出:  ``` {.json} [    {       "1":"Nr",       "2":"Item name",       "3":"Key"       "4":"Qty"    },    {       "1":"1",       "2":"active agent item",       "3":"agent.hostname"       "4":"33"    },    {       "1":"2",       "2":"passive agent item",       "3":"agent.version"       "4":"44"    },    {       "1":"3",       "2":"active,passive agent items",       "3":"agent.ping"       "4":"55"    } ] ```

en-us	##### Hidden menu  Even when the menu is hidden completely, a full menu is just one mouse click away, by clicking on the burger icon. Note that it reappears over page content; to move page content to the right you have to unhide the menu by clicking on the show sidebar button.
zh-cn	##### 隐藏菜单  即使菜单完全隐藏，显示完整菜单也只需在汉堡图标点击一次鼠标。请注意菜单会在页面内容的上方重新出现；要把页面内容移到右边，你需要点击显示侧边栏按钮取消隐藏。

en-us	#### Hiding the file with list of common passwords  To increase the complexity of password brute force attacks, it is suggested to limit access to the file `ui/data/top_passwords.txt` by modifying web server configuration. This file contains a list of the most common and context-specific passwords, and is used to prevent users from setting such passwords if *Avoid easy-to-guess passwords* parameter is enabled in the [password policy](/manual/web_interface/frontend_sections/administration/authentication#internal_authentication).  For example, on NGINX file access can be limited by using the `location` directive:      location = /data/top_passwords.txt {​​​​​​​         deny all;         return 404;     }​​​​​​​  On Apache - by using `.htacess` file:      <Files "top_passwords.txt">         Order Allow,Deny       Deny from all     </Files>  ​  
zh-cn	#### 隐藏带有常用密码列表的文件  为了应对暴力攻击增加密码的复杂性，建议通过修改 web 服务器配置来限制对文件 `ui/data/top_passwords.txt` 的访问。 此文件包含最常见和特定上下文的密码列表，在 [password policy](/manual/web_interface/frontend_sections/administration/authentication#internal_authentication)。  例如，在 NGINX 文件访问可以通过使用 `location` 来限制 命令:      location = /data/top_passwords.txt {​​​​​​​         deny all;         return 404;     }​​​​​​​   在 Apache 上 - 通过使用 `.htacess` 文件：      <Files "top_passwords.txt">         Order Allow,Deny       Deny from all     </Files>

en-us	#### High availability cluster  Retrieve a list of server nodes and their status.  [High availability cluster API](/manual/api/reference/hanode)
zh-cn	#### 高可用集群  检索服务器节点及其状态的列表。  [High availability cluster API](/manual/api/reference/hanode)

en-us	### High availability node  ::: noteclassic Nodes are created by the Zabbix server and cannot be modified via the API. :::  The High availability node object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--|--|------| |ha\_nodeid|string|ID of the node.| |name|string|Name assigned to the node, using the HANodeName configuration entry of zabbix\_server.conf. Empty for a server running in standalone mode.| |address|string|IP or DNS name where the node connects from.| |port|integer|Port on which the node is running.| |lastaccess|integer|Heartbeat time, t.i. time of last update from the node. UTC timestamp.| |status|integer|State of the node.<br><br>Possible values:<br>0 - standby;<br>1 - stopped manually;<br>2 - unavailable;<br>3 - active.|
zh-cn	 ### 高可用节点  ::: noteclassic 节点是由Zabbix server 创建的，不能通过API修改。 :::  高可用节点对象具有以下属性。  |属性|[类型](/manual/api/reference_commentary#data_types)|描述| |--------|---------------------------------------------------|-----------| |ha\_nodeid|string|节点的 ID。| |name|string|使用zabbix\_server.conf的HANodeName配置项给节点分配的名称。在独立模式下运行的服务器该配置项是空的。| |address|string|节点连接的IP或DNS名称。| |port|integer|节点运行的端口。| |lastaccess|integer|心跳时间，节点最后一次更新的 t.i. 时间。UTC时间戳。| |status|integer|节点的状态。<br><br>可能的取值：<br>0 - 备用；<br>1 - 手动停止；<br>2 - 不可用；<br>3 - 活跃。|

en-us	### High availability node  ::: noteclassic Nodes are created by the Zabbix server and cannot be modified via the API. :::  The High availability node object has the following properties.  |Property|[Type](/manual/api/reference_commentary#data_types)|Description| |--------|---------------------------------------------------|-----------| |ha\_nodeid|string|ID of the node.| |name|string|Name assigned to the node, using the HANodeName configuration entry of zabbix\_server.conf. Empty for a server running in standalone mode.| |address|string|IP or DNS name where the node connects from.| |port|integer|Port on which the node is running.| |lastaccess|integer|Heartbeat time, t.i. time of last update from the node. UTC timestamp.| |status|integer|State of the node.<br><br>Possible values:<br>0 - standby;<br>1 - stopped manually;<br>2 - unavailable;<br>3 - active.|
zh-cn	 ### 高可用节点  ::: noteclassic 节点是由Zabbix server 创建的，不能通过API修改。 :::  高可用节点对象具有以下属性。  |属性|[类型](/manual/api/reference_commentary#data_types)|描述| |--------|---------------------------------------------------|-----------| |ha\_nodeid|string|节点的 ID。| |name|string|使用zabbix\_server.conf的HANodeName配置项给节点分配的名称。在独立模式下运行的服务器该配置项是空的。| |address|string|节点连接的IP或DNS名称。| |port|integer|节点运行的端口。| |lastaccess|integer|心跳时间，节点最后一次更新的 t.i. 时间。UTC时间戳。| |status|integer|节点的状态。<br><br>可能的取值：<br>0 - 备用；<br>1 - 手动停止；<br>2 - 不可用；<br>3 - 活跃。|

en-us	# > High availability node object  The following object is related to operating a High availability cluster of Zabbix servers.
zh-cn	 # > 高可用节点对象  以下对象与操作Zabbix servers 的高可用集群有关。

en-us	# High availability node  This class is designed to work with server nodes that are part of a High availability cluster, or a standalone server instance.  Object references:\  -   [High availability node](/manual/api/reference/hanode/object#hanode)  Available methods:\  -   [hanode.get](/manual/api/reference/hanode/get) - retrieving nodes
zh-cn	 # 高可用节点  该类被设计用来与作为高可用性集群一部分的服务器节点或独立的服务器实例一起工作。  对象引用:\  -   [高可用节点](/manual/api/reference/hanode/object#hanode)  可用的方法:\  -   [hanode.get](/manual/api/reference/hanode/get) - 检索节点

en-us	#### history  Changes:\ [ZBXNEXT-6714](https://support.zabbix.com/browse/ZBXNEXT-6714) added new API method `history.clear`.\
zh-cn	 #### 历史  变更：\ [ZBXNEXT-6714](https://support.zabbix.com/browse/ZBXNEXT-6714) 添加新方法`history.clear`。\

en-us	#### history  Changes:\ [ZBXNEXT-6714](https://support.zabbix.com/browse/ZBXNEXT-6714) added new method `history.clear`.\
zh-cn	 #### 历史  变更：\ [ZBXNEXT-6714](https://support.zabbix.com/browse/ZBXNEXT-6714) 添加新方法`history.clear`。\

en-us	# history.clear
zh-cn	# 删除历史数据

en-us	#### History functions  |FUNCTION|<|<|<| |--------|-|-|-| |<|**Description**|**Function-specific parameters**|**Comments**| |**change** (/host/key)|<|<|<| |<|The amount of difference between the previous and latest value.|<|Supported value types: float, int, str, text, log<br><br>For strings returns:<br>0 - values are equal<br>1 - values differ<br><br>Example:<br>=> **change**(/host/key)>10<br><br>Numeric difference will be calculated, as seen with these incoming example values ('previous' and 'latest' value = difference):<br>'1' and '5' = `+4`<br>'3' and '1' = `-2`<br>'0' and '-2.5' = `-2.5`<br><br>See also: [abs](/manual/appendix/functions/math) for comparison| |**changecount** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|Number of changes between adjacent values within the defined evaluation period.|See [common parameters](#common-parameters).<br><br>**mode** (optional; must be double-quoted)<br><br>Supported `modes`:<br>*all* - count all changes (default)<br>*dec* - count decreases<br>*inc* - count increases|Supported value types: float, int, str, text, log<br><br>For non-numeric value types, *mode* parameter is ignored.<br><br>Examples:<br>=> **changecount**(/host/key, 1w) → number of value changes for the last week until [now](/manual/config/triggers#evaluation_period)<br>=> **changecount**(/host/key,\#10,"inc") → number of value increases (relative to the adjacent value) among the last 10 values<br>=> **changecount**(/host/key,24h,"dec") → number of value decreases (relative to the adjacent value) for the last 24 hours until [now](/manual/config/triggers#evaluation_period)| |**count** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<|<| |<|Number of values within the defined evaluation period.|See [common parameters](#common-parameters).<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - matches if contains pattern (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** (optional) - required pattern (string arguments must be double-quoted)|Supported value types: float, integer, string, text, log<br><br>Float items match with the precision of 2.22e-16; if database is [not upgraded](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) the precision is 0.000001.<br><br>With *bitand* as the third parameter, the fourth `pattern` parameter can be specified as two numbers, separated by '/': **number\_to\_compare\_with/mask**. count() calculates "bitwise AND" from the value and the *mask* and compares the result to *number\_to\_compare\_with*. If the result of "bitwise AND" is equal to *number\_to\_compare\_with*, the value is counted.<br>If *number\_to\_compare\_with* and *mask* are equal, only the *mask* need be specified (without '/').<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings. For the purpose of regexp matching, float values will always be represented with 4 decimal digits after '.'. Also note that for large numbers difference in decimal (stored in database) and binary (used by Zabbix server) representation may affect the 4th decimal digit.<br><br>Examples:<br>=> **count**(/host/key,**10m**) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period)<br>=> **count**(/host/key,**10m**,"like","error") → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that contain 'error'<br>=> **count**(/host/key,**10m**,,12) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that equal '12'<br>=> **count**(/host/key,**10m**,"gt",12) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **count**(/host/key,**\#10**,"gt",12) → number of values within the last 10 values until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **count**(/host/key,**10m:now-1d**,"gt",12) → number of values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period) that were over '12'<br>=> **count**(/host/key,**10m**,"bitand","6/7") → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) having '110' (in binary) in the 3 least significant bits.<br>=> **count**(/host/key,**10m:now-1d**) → number of values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period)| |**countunique** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<|<| |<|Number of unique values within the defined evaluation period.|See [common parameters](#common-parameters).<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - matches if contains pattern (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** (optional) - required pattern (string arguments must be double-quoted)|Supported value types: float, integer, string, text, log<br><br>Float items match with the precision of 2.22e-16; if database is [not upgraded](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) the precision is 0.000001.<br><br>With *bitand* as the third parameter, the fourth `pattern` parameter can be specified as two numbers, separated by '/': **number\_to\_compare\_with/mask**. count() calculates "bitwise AND" from the value and the *mask* and compares the result to *number\_to\_compare\_with*. If the result of "bitwise AND" is equal to *number\_to\_compare\_with*, the value is counted.<br>If *number\_to\_compare\_with* and *mask* are equal, only the *mask* need be specified (without '/').<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings. For the purpose of regexp matching, float values will always be represented with 4 decimal digits after '.'. Also note that for large numbers difference in decimal (stored in database) and binary (used by Zabbix server) representation may affect the 4th decimal digit.<br><br>Examples:<br>=> **countunique**(/host/key,**10m**) → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period)<br>=> **countunique**(/host/key,**10m**,"like","error") → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that contain 'error'<br>=> **countunique**(/host/key,**10m**,"gt",12) → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **countunique**(/host/key,**\#10**,"gt",12) → number of unique values within the last 10 values until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **countunique**(/host/key,**10m:now-1d**,"gt",12) → number of unique values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period) that were over '12'<br>=> **countunique**(/host/key,**10m**,"bitand","6/7") → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) having '110' (in binary) in the 3 least significant bits.<br>=> **countunique**(/host/key,**10m:now-1d**) → number of unique values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period)| |**find** (/host/key,<(sec\|\#num)<:time shift>>,<operator>,<pattern>)|<|<|<| |<|Find a value match.|See [common parameters](#common-parameters).<br><br>**sec** or **\#num** (optional) - defaults to the latest value if not specified<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - value contains the string given in `pattern` (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** - required pattern (string arguments must be double-quoted); [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) regular expression if `operator` is *regexp*, *iregexp*.|Supported value types: float, int, str, text, log<br><br>Returns:<br>1 - found<br>0 - otherwise<br><br>If more than one value is processed, '1' is returned if there is at least one matching value.<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings.<br><br>Example:<br>=> **find**(/host/key,**10m**,"like","error") → find a value that contains 'error' within the last 10 minutes until [now](/manual/config/triggers#evaluation_period)| |**first** (/host/key,sec<:time shift>)|<|<|<| |<|The first (the oldest) value within the defined evaluation period.|See [common parameters](#common-parameters).|Supported value types: float, int, str, text, log<br><br>Example:<br>=> **first**(/host/key,**1h**) → retrieve the oldest value within the last hour until [now](/manual/config/triggers#evaluation_period)<br><br>See also last().| |**fuzzytime** (/host/key,sec)|<|<|<| |<|Checking how much the passive agent time differs from the Zabbix server/proxy time.|See [common-parameters](#common parameters).|Supported value types: float, int<br><br>Returns:<br>1 - difference between the passive item value (as timestamp) and Zabbix server/proxy timestamp is less than or equal to T seconds<br>0 - otherwise<br><br>Usually used with the 'system.localtime' item to check that local time is in sync with the local time of Zabbix server. *Note* that 'system.localtime' must be configured as a [passive check](/manual/appendix/items/activepassive#passive_checks).<br>Can be used also with vfs.file.time\[/path/file,modify\] key to check that file didn't get updates for long time.<br><br>Example:<br>=> **fuzzytime**(/host/key,**60s**)=0 → detect a problem if the time difference is over 60 seconds<br><br>This function is not recommended for use in complex trigger expressions (with multiple items involved), because it may cause unexpected results (time difference will be measured with the most recent metric), e.g. in `fuzzytime(/Host/system.localtime,60s)=0 or last(/Host/trap)<>0`| |**last** (/host/key,<\#num<:time shift>>)|<|<|<| |<|The most recent value.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value|Supported value types: float, int, str, text, log<br><br>Take note that a hash-tagged time period (\#N) works differently here than with many other functions.<br>For example:<br>last() is always equal to last(\#1)<br>last(\#3) - third most recent value (*not* three latest values)<br><br>Zabbix does not guarantee the exact order of values if more than two values exist within one second in history.<br><br>Example:<br>=> **last**(/host/key) → retrieve the last value<br>=> **last**(/host/key,**\#2**) → retrieve the previous value<br>=> **last**(/host/key,**\#1**) <> **last**(/host/key,**\#2**) → the last and previous values differ<br><br>See also first().| |**logeventid** (/host/key,<\#num<:time shift>>,<pattern>)|<|<|<| |<|Checking if event ID of the last log entry matches a regular expression.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value<br><br>**pattern** (optional) - regular expression describing the required pattern, [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) style (string arguments must be double-quoted).|Supported value types: log<br><br>Returns:<br>0 - does not match<br>1 - matches| |**logseverity** (/host/key,<\#num<:time shift>>)|<|<|<| |<|Log severity of the last log entry.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value|Supported value types: log<br><br>Returns:<br>0 - default severity<br>N - severity (integer, useful for Windows event logs: 1 - Information, 2 - Warning, 4 - Error, 7 - Failure Audit, 8 - Success Audit, 9 - Critical, 10 - Verbose).<br>Zabbix takes log severity from **Information** field of Windows event log.| |**logsource** (/host/key,<\#num<:time shift>>,<pattern>)|<|<|<| |<|Checking if log source of the last log entry matches a regular expression.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value<br><br>**pattern** (optional) - regular expression describing the required pattern, [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) style (string arguments must be double-quoted).|Supported value types: log<br><br>Returns:<br>0 - does not match<br>1 - matches<br><br>Normally used for Windows event logs. For example, logsource("VMware Server").| |**monodec** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|Check if there has been a monotonous decrease in values.|See [common parameters](#common-parameters).<br><br>**mode** (must be double-quoted) - *weak* (every value is smaller or the same as the previous one; default) or *strict* (every value has decreased)|Supported value types: int<br><br>Returns 1 if all elements in the time period continuously decrease, 0 otherwise.<br><br>Example:<br>=> **monodec**(/Host1/system.swap.size\[all,free\],**60s**) + **monodec**(/Host2/system.swap.size\[all,free\],**60s**) + **monodec**(/Host3/system.swap.size\[all,free\],**60s**) - calculate in how many hosts there has been a decrease in free swap size| |**monoinc** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|Check if there has been a monotonous increase in values.|See [common parameters](#common-parameters).<br><br>**mode** (must be double-quoted) - *weak* (every value is bigger or the same as the previous one; default) or *strict* (every value has increased)|Supported value types: int<br><br>Returns 1 if all elements in the time period continuously increase, 0 otherwise.<br><br>Example:<br>=> **monoinc**(/Host1/system.localtime,**\#3**,"strict")=0 - check if system local time has been increasing consistently| |**nodata** (/host/key,sec,<mode>)|<|<|<| |<|Checking for no data received.|See [common parameters](#common-parameters).<br><br>**sec** period should not be less than 30 seconds because the history syncer process calculates this function only every 30 seconds.<br><br>nodata(/host/key,0) is disallowed.<br><br>**mode** - if set to *strict* (double-quoted), this function will be insensitive to proxy availability (see comments for details).|All value types are supported.<br><br>Returns:<br>1 - if no data received during the defined period of time<br>0 - otherwise<br><br>Since Zabbix 5.0, the 'nodata' triggers monitored by proxy are, by default, sensitive to proxy availability - if proxy becomes unavailable, the 'nodata' triggers will not fire immediately after a restored connection, but will skip the data for the delayed period. Note that for passive proxies suppression is activated if connection is restored more than 15 seconds and no less than 2 & ProxyUpdateFrequency seconds later. For active proxies suppression is activated if connection is restored more than 15 seconds later.<br><br>To turn off sensitiveness to proxy availability, use the third parameter, e.g.: **nodata**(/host/key,**5m**,**"strict"**); in this case the function will work the same as before 5.0.0 and fire as soon as the evaluation period (five minutes) without data has past.<br><br>Note that this function will display an error if, within the period of the 1st parameter:<br>- there's no data and Zabbix server was restarted<br>- there's no data and maintenance was completed<br>- there's no data and the item was added or re-enabled<br>Errors are displayed in the *Info* column in trigger [configuration](/manual/web_interface/frontend_sections/configuration/hosts/triggers).<br><br>This function may not work properly if there are time differences between Zabbix server, proxy and agent. See also: [Time synchronization requirement](/manual/installation/requirements#time_synchronization).| |**percentile** (/host/key,(sec\|\#num)<:time shift>,percentage)|<|<|<| |<|P-th percentile of a period, where P (percentage) is specified by the third parameter.|See [common parameters](#common-parameters).<br><br>**percentage** - a floating-point number between 0 and 100 (inclusive) with up to 4 digits after the decimal point|Supported value types: float, int| |**rate** (/host/key,sec<:time shift>)|<|<|<| |<|Per-second average rate of the increase in a monotonically increasing counter within the defined time period.|See [common parameters](#common-parameters).|Supported value types: float, int<br><br>Functionally corresponds to '[rate](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate)' of PromQL.<br><br>Example:<br>=> **rate**(/host/key,**30s**) → If the monotonic increase over 30 seconds is 20, this function will return 0.67.|
zh-cn	#### 历史函数  |函数|<|<|<| |--------|-|-|-| |<|**描述**|**函数专用参数**|**注释**| |**baselinedev** (/host/key,data period:time shift,season_unit,num_seasons)|<|<|<| |<|返回最后一个数据周期与前几个时间段的相同数据周期之间的偏差数（通过stddevpop算法） |**data period** - 一段时间内的数据收集周期，定义为\<N>\<time unit> 其中<br>`N` - 时间单位的量度<br>`time unit` - h (小时), d (天), w (周), M (月) 或y (年), 必须等于或小于这个时间段<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移量(参见示例)<br><br> **season_unit** - 一个season的持续时间 (h, d, w, M, y), 不能小于数据周期 <br><br>**num_seasons** - season的数量评估| 示例:<br>=> **baselinedev**(/host/key,1d:now/d,"M",6) →  计算前6个月前一天和同一天的标准差（总体）数。如果上个月不存在该日期，则将使用该月的最后一天（7月31日将根据1月31日、2月28日、... 6月30日进行分析）。<br> => **baselinedev**(/host/key,1h:now/h,"d",10)  → 计算前一小时与前十天同一小时内的标准差（总体）数。| |**baselinewma** (/host/key,data period:time shift,season_unit,num_seasons)|<|<|<| |<|通过使用加权移动平均算法在多个相等时间段('seasons')中对同一时间范围内的数据进行平均来计算基线。|**data period** - 一段时间内的数据收集周期，定义为\<N>\<time unit> 其中<br>`N` - 时间单位的量度<br>`time unit` - h (小时), d (天), w (周), M (月) 或 y (年),  必须等于或小于这个时间段<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移量，以season为单位定义数据收集时间范围的结束（参见示例）<br><br> **season_unit** - 一个season的持续时间 (h, d, w, M, y), 不能小于数据周期 <br><br>**num_seasons** - season的数量评估| 示例:<br>=> **baselinewma**(/host/key,1h:now/h,"d",3) →  根据昨天结束的3天内最后一个完整小时计算基线。如果“现在”是周一13:30，则分析周五、周六、周日12:00-12:59的数据。<br>=> **baselinemwa**(/host/key,2h:now/h,"d",3) →  根据昨天结束的3天内最后两个小时计算基线。如果“现在”是周一13:30，则分析周五、周六、周日10:00-11:59的数据。<br>=> **baselinewma**(/host/key,1d:now/d,"M",4) → 根据前4个月的最后1天计算基线，不包括最后一个完整月份。如果今天是 9月1日，则为7月31日、6月30日、5 月31日的数据。| |**change** (/host/key)|<|<|<| |<|前一个值和最新值之间的差异量。|<|支持的值类型: float, int, str, text, log<br><br>对于字符串返回：<br>0 - 值相等<br>1 - 值不同<br><br>示例:<br>=> **change**(/host/key)>10<br><br>将计算数值差异，例如这些传入示例值 ('previous' 和 'latest' value = difference):<br>'1' and '5' = `+4`<br>'3' and '1' = `-2`<br>'0' and '-2.5' = `-2.5`<br><br>另外: [abs](/manual/appendix/functions/math) 进行比较| |**changecount** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|在定义的评估期内相邻值之间的变化次数。|参见[常用参数](#common-parameters).<br><br>**mode** (可选;必须使用双引号)<br><br>支持`modes`:<br>*all* - 计算所有更改（默认）<br>*dec* - 减少计数<br>*inc* - 增加计数|支持的值类型: float, int, str, text, log<br><br>对于非数值类型， *mode*参数被忽略。<br><br>示例：<br>=> **changecount**(/host/key, 1w) → 到[现在](/manual/config/triggers#evaluation_period)为止的最近一周值变化次数<br>=> **changecount**(/host/key,\#10,"inc") → 值增加的次数（相对于相邻value) 在最后10个值中<br>=> **changecount**(/host/key,24h,"dec") → 到[现在](/manual/config/triggers#evaluation_period)为止的过去 24 小时内值减少的数量（相对于相邻值）| |**count** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<|<| |<|定义的评估期内的值数。|参见[常用参数](#common-parameters).<br><br>**operator** (可选; 必须使用双引号)<br><br>支持的`operators`:<br>*eq* - 等于（默认）<br>*ne* - 不等于<br>*gt* - 大于<br>*ge* - 大于或等于<br>*lt* - 小于<br>*le* - 小于或等于<br>*like* - 匹配 if 包含模式（区分大小写）<br>*bitand* - 位与<br>*regexp* - `pattern`中给出的正则表达式匹配区分大小写<br>*iregexp* - `pattern`中给出的正则表达式匹配不区分大小写<br><br>**pattern** (可选) - 必需的模式（字符串参数必须用双引号引起来）|支持的值类型： float, integer, string, text, log<br><br>浮点项匹配精度为2.22e-16; 如果数据库[未升级](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) ，则精度为0.000001。<br><br>使用*bitand* 作为第三个参数，第四个`pattern`参数可以指定为两个数字，用'/'分隔： **number\_to\_compare\_with/mask**. count() 根据值和*mask* 计算"按位与" 并将结果和 *number\_to\_compare\_with*进行比较。如果"按位与"的结果等于*number\_to\_compare\_with*, 则计算该值。<br>如果*number\_to\_compare\_with* and *mask* 相等， 则只有*mask* 需要指定 (不带 '/').<br><br>以*regexp* or *iregexp* 作为第三个参数, 第四个`pattern` 参数可以是普通的或or [全局](/manual/regular_expressions#global_regular_expressions) (以'@'开头)正则表达式。在全局正则表达式的情况下，区分大小写是从全局正则表达式设置继承的。出于正则表达式匹配的目的，浮点值将始终用'.'后的4位十进制数字表示。另请注意，对于大数字，十进制（存储在数据库中）和二进制(由Zabbix server使用) 表示的差异可能会影响第 4 位十进制数字。<br><br>示例：<br>=> **count**(/host/key,**10m**) → 到[现在](/manual/config/triggers#evaluation_period)为止的最后 10 分钟的值数<br>=> **count**(/host/key,**10m**,"like","error") → 从[现在](/manual/config/triggers#evaluation_period) 开始过去10分钟内包含 'error' 的值的数量<br>=> **count**(/host/key,**10m**,,12) → 到[现在](/manual/config/triggers#evaluation_period) 为止的最后10分钟的值的数量等于'12'<br>=> **count**(/host/key,**10m**,"gt",12) → 到[现在](/manual/config/triggers#evaluation_period) 为止的最后10分钟的值的数量大于 '12'<br>=> **count**(/host/key,**\#10**,"gt",12) → 到[现在](/manual/config/triggers#evaluation_period) 为止的最后10个值中大于'12'的数量<br>=> **count**(/host/key,**10m:now-1d**,"gt",12) → 从[现在](/manual/config/triggers#evaluation_period)起24小时前到24小时前10分钟之间超过'12'的值数量<br>=> **count**(/host/key,**10m**,"bitand","6/7") → 到[现在](/manual/config/triggers#evaluation_period)为止最后10分钟的值的数量，在3个最低有效位中具有 '110' (二进制) 。<br>=> **count**(/host/key,**10m:now-1d**) → 从[现在](/manual/config/triggers#evaluation_period)起24小时前到24小时前10分钟之间的值数量| |**countunique** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<|<| |<|定义的评估期内唯一值的数量。|参见[常用参数](#common-parameters).<br><br>**operator** (可选；必须使用双引号)<br><br>支持`operators`:<br>*eq* - 等于（默认）<br>*ne* - 不等于<br>*gt* - 大于<br>*ge* - 大于或等于<br>*lt* - 小于<br>*le* - 小于或等于<br>*like* - 匹配 if 包含模式（区分大小写）<br>*bitand* - 位与<br>*regexp* - `pattern`中给出的正则表达式匹配区分大小写<br>*iregexp* - `pattern`中给出的正则表达式匹配不区分大小写<br><br>**pattern** (可选) - 必需的模式（字符串参数必须用双引号引起来）|支持的值类型： float, integer, string, text, log<br><br>浮点项匹配精度为2.22e-16; 如果数据库[未升级](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) ，则精度为0.000001。<br><br>使用*bitand* 作为第三个参数，第四个`pattern`参数可以指定为两个数字，用'/'分隔： **number\_to\_compare\_with/mask**. count() 根据值和*mask* 计算"按位与" 并将结果和 *number\_to\_compare\_with*进行比较。如果"按位与"的结果等于*number\_to\_compare\_with*, 则计算该值。<br>如果*number\_to\_compare\_with* and *mask* 相等， 则只有*mask* 需要指定 (不带 '/').<br><br>以*regexp* or *iregexp* 作为第三个参数, 第四个`pattern` 参数可以是普通的或or [全局](/manual/regular_expressions#global_regular_expressions) (以'@'开头)正则表达式。在全局正则表达式的情况下，区分大小写是从全局正则表达式设置继承的。出于正则表达式匹配的目的，浮点值将始终用'.'后的4位十进制数字表示。另请注意，对于大数字，十进制（存储在数据库中）和二进制(由Zabbix server使用) 表示的差异可能会影响第 4 位十进制数字。<br><br>Examples:<br>=> **countunique**(/host/key,**10m**) → 到[现在](/manual/config/triggers#evaluation_period)为止的最后 10 分钟的唯一值数<br>=> **countunique**(/host/key,**10m**,"like","error") →从[现在](/manual/config/triggers#evaluation_period) 开始过去10分钟内包含 'error' 的唯一值的数量<br>=> **countunique**(/host/key,**10m**,"gt",12) →  到[现在](/manual/config/triggers#evaluation_period) 为止的最后10分钟的唯一值的数量大于 '12'<br>=> **countunique**(/host/key,**\#10**,"gt",12) →  到[现在](/manual/config/triggers#evaluation_period) 为止的最后10个值中唯一值数量大于'12'<br>=> **countunique**(/host/key,**10m:now-1d**,"gt",12) → 从[现在](/manual/config/triggers#evaluation_period)起24小时前到24小时前10分钟之间超过'12'的唯一值数量<br>=> **countunique**(/host/key,**10m**,"bitand","6/7") → 到[现在](/manual/config/triggers#evaluation_period)为止最后10分钟的唯一值的数量，在3个最低有效位中具有 '110' (二进制) 。<br>=> **countunique**(/host/key,**10m:now-1d**) →从[现在](/manual/config/triggers#evaluation_period)起24小时前到24小时前10分钟之间的唯一值数量| |**find** (/host/key,<(sec\|\#num)<:time shift>>,<operator>,<pattern>)|<|<|<| |<|找到一个值匹配。|参见[常用参数](#common-parameters).<br><br>**sec** or **\#num** (可选) - 如果未指定，则默认为最新值<br><br>**operator** (可选；必须使用双引号)<br><br>支持`operators`:<br>*eq* - 等于（默认）<br>*ne* - 不等于<br>*gt* - 大于<br>*ge* - 大于或等于<br>*lt* - 小于<br>*le* - 小于或等于<br>*like* - 值包含`pattern` 中给定的字符串(区分大小写)<br>*bitand* - 位与<br>*regexp* - `pattern`中给出的正则表达式匹配区分大小写<br>*iregexp* - `pattern`中给出的正则表达式匹配不区分大小写<br><br>**pattern** - (可选) - 必需的模式（字符串参数必须用双引号引起来）；[Perl兼容正则表达式](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) 正则表达式，如果`operator` 是 *regexp*, *iregexp*。|支持的值类型：float, int, str, text, log<br><br>返回：<br>1 - 找到<br>0 - 否则<br><br>如果处理了多个值，至少有一个匹配值，则返回'1'。<br><br>以*regexp* 或 *iregexp* 作为第三个参数，第四个`pattern`参数可以是普通的或[全局](/manual/regular_expressions#global_regular_expressions) 的(以'@'为开头) 正则表达式。在全局正则表达式的情况下，区分大小写是从全局正则表达式设置继承的。<br><br>示例：<br>=> **find**(/host/key,**10m**,"like","error") → 查找从[现在](/manual/config/triggers#evaluation_period)开始10分钟前包含'error' 的值| |**first** (/host/key,sec<:time shift>)|<|<|<| |<|定义的评估期内的第一个（最旧的）值。|参见[常用参数](#common-parameters).|支持的值类型：float, int, str, text, log<br><br>示例：<br>=> **first**(/host/key,**1h**) → 检索从[现在](/manual/config/triggers#evaluation_period)开始最近一小时内最旧的值。<br><br>请参阅last()。| |**fuzzytime** (/host/key,sec)|<|<|<| |<|检查被动代理时间与Zabbix server/proxy时间的差异。|参见[常用参数](#common parameters).|支持的值类型：float, int<br><br>返回：<br>1 - 被动监控项值（作为时间戳）与 Zabbix server/proxy时间戳之间的差异小于或等于 T 秒<br>0 - 否则 <br><br>通常与 'system.localtime' 监控项一起使用以检查该本地时间与 Zabbix server的本地时间同步。 *注意* 'system.localtime'”必须配置为[被动检查](/manual/appendix/items/activepassive#passive_checks)。<br>也可以与 vfs.file.time\[/path/file,modify\] key 一起使用来检查文件是否长时间没有得到更新。<br><br>示例：<br>=> **fuzzytime**(/host/key,**60s**)=0 → 如果时间差超过 60 秒，则检测问题<br><br>不建议将此函数用于复杂的触发器表达式（涉及多个监控项），因为它可能会导致意外结果（将使用最近的度量来测量时间差）， 例如在 `fuzzytime(/Host/system.localtime,60s)=0 or last(/Host/trap)<>0`| |**last** (/host/key,<\#num<:time shift>>)|<|<|<| |<|最新值|参见[常用参数](#common-parameters).<br><br>**\#num** (可选) - 第N个最近的值|支持的值类型：float, int, str, text, log<br><br>请注意，带哈希标签的时间段(\#N)在这里的工作方式与许多其他函数不同。<br>例如：<br>last()总是等于last(\#1)<br>last(\#3) - 第三个最近的值 (*不是* 三个最新的值)<br><br>如果在1秒内存在两个以上的值，Zabbix不保证值的确切历史顺序。<br><br>示例：<br>=> **last**(/host/key) → 检索最后一个值<br>=> **last**(/host/key,**\#2**) → 检索前一个值<br>=> **last**(/host/key,**\#1**) <> **last**(/host/key,**\#2**) → 最后一个值和前一个值不同<br><br>另外参见first()。| |**logeventid** (/host/key,<\#num<:time shift>>,<pattern>)|<|<|<| |<|检查最后一个日志条目的事件 ID 是否与正则表达式匹配|参见 [常用参数](#common-parameters).<br><br>**\#num** (可选) - 第N个最近的值<br><br>**pattern** (可选) - 描述所需模式的正则表达式 [Perl兼容正则表达式](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE)样式(字符串参数必须用双引号引起来)|支持的值类型：log<br><br>返回：<br>0 - 不匹配<br>1 - 匹配| |**logseverity** (/host/key,<\#num<:time shift>>)|<|<|<| |<|最后一个日志条目的日志严重性。|参见 [常用参数](#common-parameters).<br><br>**\#num** (可选) - 第N个最近的值|支持的值类型： log<br><br>返回：<br>0 - 默认严重性<br>N - 严重性(整数，对 Windows事件日志有用：1 - 信息， 2 - 警告， 4 - 错误， 7 - 失败审计， 8 - 成功审计， 9 - 严重，10 - 详细).<br>Zabbix 从Windows 事件日志的 **Information** 中获取日志的严重性| |**logsource** (/host/key,<\#num<:time shift>>,<pattern>)|<|<|<| |<|检查最后一个日志条目的日志源是否匹配正则表达式|参见 [常用参数](#common-parameters).<br><br>**\#num** (可选) - 第N个最近的值<br><br>**pattern** (可选) -描述所需模式的正则表达式 [Perl兼容正则表达式](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE)(字符串参数必须用双引号引起来)|支持的值类型： log<br><br>返回：<br>0 - 不匹配<br>1 - 匹配<br><br>通常用于 Windows 事件日志。例如，logsource("VMware Server")| |**monodec** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|检查值是否单调下降|参见[常用参数](#common-parameters).<br><br>**mode** (必须使用双引号) - *weak* (每个值都小于或与前一个相同；默认) 或 *strict* (每个值都减少了)|支持的值类型：int<br><br>如果时间段内的所有元素连续减少，则返回1，否则返回0。<br><br>示例：<br>=> **monodec**(/Host1/system.swap.size\[all,free\],**60s**) + **monodec**(/Host2/system.swap.size\[all,free\],**60s**) + **monodec**(/Host3/system.swap.size\[all,free\],**60s**) - 计算空闲交换大小减少的主机数量| |**monoinc** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|检查值是否单调增加|参见 [常用参数](#common-parameters).<br><br>**mode** (必须使用双引号) - *weak* (每个值都大于或与前一个相同；默认) 或 *strict* (每个值都增加了)|支持的值类型：int<br><br>如果时间段内的所有元素连续增加，则返回1，否则返回0。<br><br>示例：<br>=> **monoinc**(/Host1/system.localtime,**\#3**,"strict")=0 - 检查系统本地时间是否一直在增加| |**nodata** (/host/key,sec,<mode>)|<|<|<| |<|检查是否没有收到数据|参见 [常用参数](#common-parameters).<br><br>**sec** 周期不应小于30 秒，因为历史同步器进程仅每30秒计算一次此函数。<br><br>nodata(/host/key,0)是不允许的<br><br>**mode** - 如果设置为*strict* (双引号), 此函数将对代理可用性不敏感（有关详细信息，请参阅注释）|支持所有值类型<br><br>返回：<br>1 - 如果在定义的时间段内没有收到数据<br>0 - 否则<br><br>从Zabbix 5.0, 代理监控的'nodata' 触发器默认情况下对代理可用性敏感 - 如果代理不可用，则 'nodata'触发器将恢复连接后不会立即触发，但会在延迟期间跳过数据。请注意，如果连接恢复超过15秒且不少于2秒和 ProxyUpdateFrequency秒后，则会激活被动代理抑制。如果连接恢复超过15秒，则会激活活动代理抑制。<br><br>要关闭对代理可用性的敏感性，请使用第三个参数，例如：**nodata**(/host/key,**5m**,**"strict"**);在这种情况下，该函数将与5.0.0之前的功能相同，并在没有数据的评估期（五分钟）过去后立即触发。<br><br>请注意，如果在第一个参数的时间段内，此函数将显示错误：<br>- 没有数据并且Zabbix server已重新启动<br>- 没有数据并且已完成维护<br>- 没有数据并且监控项已添加或重新启用<br>错误是显示在触发器 [配置](/manual/web_interface/frontend_sections/configuration/hosts/triggers)的*Info* 中。<br><br>如果Zabbix server, proxy和agent存在时间差异，此功能可能无法正常工作。另外参见: [时间同步要求](/manual/installation/requirements#time_synchronization)。| |**percentile** (/host/key,(sec\|\#num)<:time shift>,percentage)|<|<|<| |<|周期的第P个百分位数，其中P（百分比）由第三个参数指定|参见 [常用参数](#common-parameters).<br><br>**percentage** - 0到100（含）之间的浮点数，小数点后最多4位|支持的值类型：float, int| |**rate** (/host/key,sec<:time shift>)|<|<|<| |<|在定义的时间段内，单调递增的计数器每秒平均增加速率|参见[常用参数](#common-parameters).|支持的值类型：float, int<br><br>功能上对应于PromQL的'[rate](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate)'。<br><br>示例：<br>=> **rate**(/host/key,**30s**) → 如果 30 秒内单调增加为 20，则此函数将返回 0.67。| |**trendavg** (/host/key,time period:time shift)|<|<|<| |<|定义时间段内趋势值的平均值|**time period** - 时间段(最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）|示例：<br>=> **trendavg**(/host/key,**1h:now/h**) → 前一小时的平均值(例如 12:00-13:00)<br>=> **trendavg**(/host/key,**1h:now/h-1h**) → 两小时前的平均值(11:00-12:00)<br>=> **trendavg**(/host/key,**1h:now/h-2h**) → 三小时前的平均值(10:00-11:00)<br>=> **trendavg**(/host/key,**1M:now/M-1y**) → 一年前上个月的平均值| |**trendcount** (/host/key,time period:time shift)|<|<|<| |<|在定义的时间段内成功检索到的趋势值的数量。|**time period** - 时间段(最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）|示例：<br>=> **trendcount**(/host/key,**1h:now/h**) → 上一小时的计数(例如 12:00-13:00)<br>=> **trendcount**(/host/key,**1h:now/h-1h**) → 两小时前的计数 (11:00-12:00)<br>=> **trendcount**(/host/key,**1h:now/h-2h**) → 三小时前的计数 (10:00-11:00)<br>=> **trendcount**(/host/key,**1M:now/M-1y**) → 一年前的上个月的计数| |**trendmax** (/host/key,time period:time shift)|<|<|<| |<|定义时间段内趋势值的最大值|**time period** - - 时间段(最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）|示例：<br>=> **trendmax**(/host/key,**1h:now/h**) → 前一小时的最大值 (例如12:00-13:00)<br>=> **trendmax**(/host/key,**1h:now/h**) - **trendmin**(/host/key,**1h:now/h**) → 计算前一小时(12:00-13:00)的最大值和最小值之间的差值(趋势增量)<br>=> **trendmax**(/host/key,**1h:now/h-1h**) → 两小时前的最大值 (11:00-12:00)<br>=> **trendmax**(/host/key,**1h:now/h-2h**) → 三小时前的最大值 (10:00-11 :00)<br>=> **trendmax**(/host/key,**1M:now/M-1y**) → 一年前上个月的最大值| |**trendmin** (/host/key,time period:time shift)|<|<|<| |<|定义时间段内趋势值的最小值|**time period** -时间段(最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）|示例：<br>=> **trendmin**(/host/key,**1h:now/h**) → 前一小时的最小值(例如 12:00-13:00)<br>=> **trendmin**(/host/key,**1h:now/h**) - **trendmin**(/host/key,**1h:now/h**) → 计算前一小时(12:00-13:00)的最大值和最小值之间的差值(趋势增量)<br>=> **trendmin**(/host/key,**1h:now/h-1h**) → 最小两小时前(11:00-12:00)<br>=> **trendmin**(/host/key,**1h:now/h-2h**) → 最小三小时前 (10:00-11 :00)<br>=> **trendmin**(/host/key,**1M:now/M-1y**) → 一年前上个月的最小值| |**trendstl** (/host/key,eval period:time shift,detection period,season,<deviations>,<devalg>,<s_window>)|<|<|<| |<|返回异常率 - 一个介于0和1之间的十进制值，即（（检测周期中异常值的数量）/（检测周期中值的总数）|**eval period** - 必须分解的时间段 (最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）<br><br>**detection period** - 从计算异常的评估期结束开始的时间段（最小'1h'，不能长于评估期），定义为 \<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周)。<br><br>**season** - 预计seasonality (重复模式) 的最短时间段(最小'2h', 不能长于评估期，评估期的条目数必须大于结果频率的两倍 (season/h))，定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周)。<br><br>**deviations** - 计为异常的偏差数（用 devalg 计算）（可以是小数），（必须大于或等于1，默认为 3）<br><br>**devalg** (必须双引号) -偏差算法，可以是*stddevpop*, *stddevsamp* or *mad* (默认)<br><br>**s_window** 用于seasonal 提取的黄土窗口的跨度(滞后)(默认为10*评估期间的条目数+1)|示例：<br>=> **trendstl**(/host/key,**100h:now/h**,10h,2h) → 分析过去100小时的趋势数据，<br>找出该周期前10小时的异常率，<br>预计周期为2h，<br>如果评估期的剩余序列值达到该剩余序列的MAD的3个偏差值<br>=> **trendstl**(/host/key,**100h:now/h-10h**,100h,2h,2.1,"mad") →  分析前 100 小时趋势数据的周期，从 10 小时前开始计数，<br>找到整个周期的异常率，<br>预计周期为 2h，<br>如果评估期的剩余序列值达到该剩余序列的MAD的2,1偏差值，则将其视为异常值<br>=> **trendstl**(/host/key,**100d:now/d-1d**,10d,1d,4,,10) → 分析从前一天开始的前100天趋势数据，<br>求该周期最后10天周期的异常率，<br>期望周期为1天，<br>评估周期的剩余序列值视为异常如果它们达到该剩余系列的MAD的4个偏差值，<br>则覆盖 loess 窗口的默认跨度，用于季节性提取“10*eval period 中的条目数 +1”，跨度为10滞后<br>=> **trendstl**(/host/key,**1M:now/M-1y**,1d,2h,,"stddevsamp") → 一年前上个月的最小值<br>分析从一年前开始的上个月趋势数据，<br>求预计周期为2小时的该周期的最后一天，<br>如果评估周期的剩余序列值达到该剩余序列的样本标准偏差的3偏差值，则将其视为异常| |**trendsum** (/host/key,time period:time shift)|<|<|<| |<|定义时间段内的趋势值总和|**time period** -时间段(最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）|示例：<br>=> **trendsum**(/host/key,**1h:now/h**) → 前一小时的总和 (例如 12:00-13:00)<br>=> **trendsum**(/host/key,**1h:now/h-1h**) → 两小时前 (11:00-12:00) 的总和<br>=> **trendsum**(/host/key,**1h:now/h-2h**) → 三小时前 (10:00-11:00) 的总和<br>=> **trendsum**(/host/key,**1M:now/M-1y**) → 一年前上个月的总和|

en-us	#### History functions  |FUNCTION|<|<| |---|----|----| |**Description**|**Function-specific parameters**|**Comments**| |**change** (/host/key)|<|<|<| |The amount of difference between the previous and latest value.| |Supported value types: float, int, str, text, log<br><br>For strings returns:<br>0 - values are equal<br>1 - values differ<br><br>Example:<br>=> **change**(/host/key)>10<br><br>Numeric difference will be calculated, as seen with these incoming example values ('previous' and 'latest' value = difference):<br>'1' and '5' = `+4`<br>'3' and '1' = `-2`<br>'0' and '-2.5' = `-2.5`<br><br>See also: [abs](/manual/appendix/functions/math) for comparison| |**changecount** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<| |Number of changes between adjacent values within the defined evaluation period.|See [common parameters](#common-parameters).<br><br>**mode** (optional; must be double-quoted)<br><br>Supported `modes`:<br>*all* - count all changes (default)<br>*dec* - count decreases<br>*inc* - count increases|Supported value types: float, int, str, text, log<br><br>For non-numeric value types, *mode* parameter is ignored.<br><br>Examples:<br>=> **changecount**(/host/key, 1w) → number of value changes for the last week until [now](/manual/config/triggers#evaluation_period)<br>=> **changecount**(/host/key,\#10,"inc") → number of value increases (relative to the adjacent value) among the last 10 values<br>=> **changecount**(/host/key,24h,"dec") → number of value decreases (relative to the adjacent value) for the last 24 hours until [now](/manual/config/triggers#evaluation_period)| |**count** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<| |Number of values within the defined evaluation period.|See [common parameters](#common-parameters).<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - matches if contains pattern (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** (optional) - required pattern (string arguments must be double-quoted)|Supported value types: float, integer, string, text, log<br><br>Float items match with the precision of 2.22e-16; if database is [not upgraded](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) the precision is 0.000001.<br><br>With *bitand* as the third parameter, the fourth `pattern` parameter can be specified as two numbers, separated by '/': **number\_to\_compare\_with/mask**. count() calculates "bitwise AND" from the value and the *mask* and compares the result to *number\_to\_compare\_with*. If the result of "bitwise AND" is equal to *number\_to\_compare\_with*, the value is counted.<br>If *number\_to\_compare\_with* and *mask* are equal, only the *mask* need be specified (without '/').<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings. For the purpose of regexp matching, float values will always be represented with 4 decimal digits after '.'. Also note that for large numbers difference in decimal (stored in database) and binary (used by Zabbix server) representation may affect the 4th decimal digit.<br><br>Examples:<br>=> **count**(/host/key,**10m**) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period)<br>=> **count**(/host/key,**10m**,"like","error") → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that contain 'error'<br>=> **count**(/host/key,**10m**,,12) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that equal '12'<br>=> **count**(/host/key,**10m**,"gt",12) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **count**(/host/key,**\#10**,"gt",12) → number of values within the last 10 values until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **count**(/host/key,**10m:now-1d**,"gt",12) → number of values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period) that were over '12'<br>=> **count**(/host/key,**10m**,"bitand","6/7") → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) having '110' (in binary) in the 3 least significant bits.<br>=> **count**(/host/key,**10m:now-1d**) → number of values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period)| |**countunique** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<| |Number of unique values within the defined evaluation period.|See [common parameters](#common-parameters).<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - matches if contains pattern (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** (optional) - required pattern (string arguments must be double-quoted)|Supported value types: float, integer, string, text, log<br><br>Float items match with the precision of 2.22e-16; if database is [not upgraded](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) the precision is 0.000001.<br><br>With *bitand* as the third parameter, the fourth `pattern` parameter can be specified as two numbers, separated by '/': **number\_to\_compare\_with/mask**. count() calculates "bitwise AND" from the value and the *mask* and compares the result to *number\_to\_compare\_with*. If the result of "bitwise AND" is equal to *number\_to\_compare\_with*, the value is counted.<br>If *number\_to\_compare\_with* and *mask* are equal, only the *mask* need be specified (without '/').<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings. For the purpose of regexp matching, float values will always be represented with 4 decimal digits after '.'. Also note that for large numbers difference in decimal (stored in database) and binary (used by Zabbix server) representation may affect the 4th decimal digit.<br><br>Examples:<br>=> **countunique**(/host/key,**10m**) → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period)<br>=> **countunique**(/host/key,**10m**,"like","error") → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that contain 'error'<br>=> **countunique**(/host/key,**10m**,"gt",12) → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **countunique**(/host/key,**\#10**,"gt",12) → number of unique values within the last 10 values until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **countunique**(/host/key,**10m:now-1d**,"gt",12) → number of unique values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period) that were over '12'<br>=> **countunique**(/host/key,**10m**,"bitand","6/7") → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) having '110' (in binary) in the 3 least significant bits.<br>=> **countunique**(/host/key,**10m:now-1d**) → number of unique values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period)| |**find** (/host/key,<(sec\|\#num)<:time shift>>,<operator>,<pattern>)|<|<| |Find a value match.|See [common parameters](#common-parameters).<br><br>**sec** or **\#num** (optional) - defaults to the latest value if not specified<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - value contains the string given in `pattern` (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** - required pattern (string arguments must be double-quoted); [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) regular expression if `operator` is *regexp*, *iregexp*.|Supported value types: float, int, str, text, log<br><br>Returns:<br>1 - found<br>0 - otherwise<br><br>If more than one value is processed, '1' is returned if there is at least one matching value.<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings.<br><br>Example:<br>=> **find**(/host/key,**10m**,"like","error") → find a value that contains 'error' within the last 10 minutes until [now](/manual/config/triggers#evaluation_period)| |**first** (/host/key,sec<:time shift>)|<|<| |The first (the oldest) value within the defined evaluation period.|See [common parameters](#common-parameters).|Supported value types: float, int, str, text, log<br><br>Example:<br>=> **first**(/host/key,**1h**) → retrieve the oldest value within the last hour until [now](/manual/config/triggers#evaluation_period)<br><br>See also last().| |**fuzzytime** (/host/key,sec)|<|<| |Checking how much the passive agent time differs from the Zabbix server/proxy time.|See [common-parameters](#common parameters).|Supported value types: float, int<br><br>Returns:<br>1 - difference between the passive item value (as timestamp) and Zabbix server/proxy timestamp is less than or equal to T seconds<br>0 - otherwise<br><br>Usually used with the 'system.localtime' item to check that local time is in sync with the local time of Zabbix server. *Note* that 'system.localtime' must be configured as a [passive check](/manual/appendix/items/activepassive#passive_checks).<br>Can be used also with vfs.file.time\[/path/file,modify\] key to check that file didn't get updates for long time.<br><br>Example:<br>=> **fuzzytime**(/host/key,**60s**)=0 → detect a problem if the time difference is over 60 seconds<br><br>This function is not recommended for use in complex trigger expressions (with multiple items involved), because it may cause unexpected results (time difference will be measured with the most recent metric), e.g. in `fuzzytime(/Host/system.localtime,60s)=0 or last(/Host/trap)<>0`| |**last** (/host/key,<\#num<:time shift>>)|<|<| |The most recent value.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value|Supported value types: float, int, str, text, log<br><br>Take note that a hash-tagged time period (\#N) works differently here than with many other functions.<br>For example:<br>last() is always equal to last(\#1)<br>last(\#3) - third most recent value (*not* three latest values)<br><br>Zabbix does not guarantee the exact order of values if more than two values exist within one second in history.<br><br>Example:<br>=> **last**(/host/key) → retrieve the last value<br>=> **last**(/host/key,**\#2**) → retrieve the previous value<br>=> **last**(/host/key,**\#1**) <> **last**(/host/key,**\#2**) → the last and previous values differ<br><br>See also first().| |**logeventid** (/host/key,<\#num<:time shift>>,<pattern>)|<|<| |Checking if event ID of the last log entry matches a regular expression.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value<br><br>**pattern** (optional) - regular expression describing the required pattern, [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) style (string arguments must be double-quoted).|Supported value types: log<br><br>Returns:<br>0 - does not match<br>1 - matches| |**logseverity** (/host/key,<\#num<:time shift>>)|<|<| |Log severity of the last log entry.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value|Supported value types: log<br><br>Returns:<br>0 - default severity<br>N - severity (integer, useful for Windows event logs: 1 - Information, 2 - Warning, 4 - Error, 7 - Failure Audit, 8 - Success Audit, 9 - Critical, 10 - Verbose).<br>Zabbix takes log severity from **Information** field of Windows event log.| |**logsource** (/host/key,<\#num<:time shift>>,<pattern>)|<|<| |Checking if log source of the last log entry matches a regular expression.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value<br><br>**pattern** (optional) - regular expression describing the required pattern, [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) style (string arguments must be double-quoted).|Supported value types: log<br><br>Returns:<br>0 - does not match<br>1 - matches<br><br>Normally used for Windows event logs. For example, logsource("VMware Server").| |**monodec** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<| |Check if there has been a monotonous decrease in values.|See [common parameters](#common-parameters).<br><br>**mode** (must be double-quoted) - *weak* (every value is smaller or the same as the previous one; default) or *strict* (every value has decreased)|Supported value types: int<br><br>Returns 1 if all elements in the time period continuously decrease, 0 otherwise.<br><br>Example:<br>=> **monodec**(/Host1/system.swap.size\[all,free\],**60s**) + **monodec**(/Host2/system.swap.size\[all,free\],**60s**) + **monodec**(/Host3/system.swap.size\[all,free\],**60s**) - calculate in how many hosts there has been a decrease in free swap size| |**monoinc** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<| |Check if there has been a monotonous increase in values.|See [common parameters](#common-parameters).<br><br>**mode** (must be double-quoted) - *weak* (every value is bigger or the same as the previous one; default) or *strict* (every value has increased)|Supported value types: int<br><br>Returns 1 if all elements in the time period continuously increase, 0 otherwise.<br><br>Example:<br>=> **monoinc**(/Host1/system.localtime,**\#3**,"strict")=0 - check if system local time has been increasing consistently| |**nodata** (/host/key,sec,<mode>)|<|<| |Checking for no data received.|See [common parameters](#common-parameters).<br><br>**sec** period should not be less than 30 seconds because the history syncer process calculates this function only every 30 seconds.<br><br>nodata(/host/key,0) is disallowed.<br><br>**mode** - if set to *strict* (double-quoted), this function will be insensitive to proxy availability (see comments for details).|All value types are supported.<br><br>Returns:<br>1 - if no data received during the defined period of time<br>0 - otherwise<br><br>Since Zabbix 5.0, the 'nodata' triggers monitored by proxy are, by default, sensitive to proxy availability - if proxy becomes unavailable, the 'nodata' triggers will not fire immediately after a restored connection, but will skip the data for the delayed period. Note that for passive proxies suppression is activated if connection is restored more than 15 seconds and no less than 2 & ProxyUpdateFrequency seconds later. For active proxies suppression is activated if connection is restored more than 15 seconds later.<br><br>To turn off sensitiveness to proxy availability, use the third parameter, e.g.: **nodata**(/host/key,**5m**,**"strict"**); in this case the function will work the same as before 5.0.0 and fire as soon as the evaluation period (five minutes) without data has past.<br><br>Note that this function will display an error if, within the period of the 1st parameter:<br>- there's no data and Zabbix server was restarted<br>- there's no data and maintenance was completed<br>- there's no data and the item was added or re-enabled<br>Errors are displayed in the *Info* column in trigger [configuration](/manual/web_interface/frontend_sections/configuration/hosts/triggers).<br><br>This function may not work properly if there are time differences between Zabbix server, proxy and agent. See also: [Time synchronization requirement](/manual/installation/requirements#time_synchronization).| |**percentile** (/host/key,(sec\|\#num)<:time shift>,percentage)|<|<| |P-th percentile of a period, where P (percentage) is specified by the third parameter.|See [common parameters](#common-parameters).<br><br>**percentage** - a floating-point number between 0 and 100 (inclusive) with up to 4 digits after the decimal point|Supported value types: float, int| |**rate** (/host/key,sec<:time shift>)|<|<| |Per-second average rate of the increase in a monotonically increasing counter within the defined time period.|See [common parameters](#common-parameters).|Supported value types: float, int<br><br>Functionally corresponds to '[rate](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate)' of PromQL.<br><br>Example:<br>=> **rate**(/host/key,**30s**) → If the monotonic increase over 30 seconds is 20, this function will return 0.67.|
zh-cn	#### 历史函数  |函数|<|<|<| |--------|-|-|-| |<|**描述**|**函数专用参数**|**注释**| |**baselinedev** (/host/key,data period:time shift,season_unit,num_seasons)|<|<|<| |<|返回最后一个数据周期与前几个时间段的相同数据周期之间的偏差数（通过stddevpop算法） |**data period** - 一段时间内的数据收集周期，定义为\<N>\<time unit> 其中<br>`N` - 时间单位的量度<br>`time unit` - h (小时), d (天), w (周), M (月) 或y (年), 必须等于或小于这个时间段<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移量(参见示例)<br><br> **season_unit** - 一个season的持续时间 (h, d, w, M, y), 不能小于数据周期 <br><br>**num_seasons** - season的数量评估| 示例:<br>=> **baselinedev**(/host/key,1d:now/d,"M",6) →  计算前6个月前一天和同一天的标准差（总体）数。如果上个月不存在该日期，则将使用该月的最后一天（7月31日将根据1月31日、2月28日、... 6月30日进行分析）。<br> => **baselinedev**(/host/key,1h:now/h,"d",10)  → 计算前一小时与前十天同一小时内的标准差（总体）数。| |**baselinewma** (/host/key,data period:time shift,season_unit,num_seasons)|<|<|<| |<|通过使用加权移动平均算法在多个相等时间段('seasons')中对同一时间范围内的数据进行平均来计算基线。|**data period** - 一段时间内的数据收集周期，定义为\<N>\<time unit> 其中<br>`N` - 时间单位的量度<br>`time unit` - h (小时), d (天), w (周), M (月) 或 y (年),  必须等于或小于这个时间段<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移量，以season为单位定义数据收集时间范围的结束（参见示例）<br><br> **season_unit** - 一个season的持续时间 (h, d, w, M, y), 不能小于数据周期 <br><br>**num_seasons** - season的数量评估| 示例:<br>=> **baselinewma**(/host/key,1h:now/h,"d",3) →  根据昨天结束的3天内最后一个完整小时计算基线。如果“现在”是周一13:30，则分析周五、周六、周日12:00-12:59的数据。<br>=> **baselinemwa**(/host/key,2h:now/h,"d",3) →  根据昨天结束的3天内最后两个小时计算基线。如果“现在”是周一13:30，则分析周五、周六、周日10:00-11:59的数据。<br>=> **baselinewma**(/host/key,1d:now/d,"M",4) → 根据前4个月的最后1天计算基线，不包括最后一个完整月份。如果今天是 9月1日，则为7月31日、6月30日、5 月31日的数据。| |**change** (/host/key)|<|<|<| |<|前一个值和最新值之间的差异量。|<|支持的值类型: float, int, str, text, log<br><br>对于字符串返回：<br>0 - 值相等<br>1 - 值不同<br><br>示例:<br>=> **change**(/host/key)>10<br><br>将计算数值差异，例如这些传入示例值 ('previous' 和 'latest' value = difference):<br>'1' and '5' = `+4`<br>'3' and '1' = `-2`<br>'0' and '-2.5' = `-2.5`<br><br>另外: [abs](/manual/appendix/functions/math) 进行比较| |**changecount** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|在定义的评估期内相邻值之间的变化次数。|参见[常用参数](#common-parameters).<br><br>**mode** (可选;必须使用双引号)<br><br>支持`modes`:<br>*all* - 计算所有更改（默认）<br>*dec* - 减少计数<br>*inc* - 增加计数|支持的值类型: float, int, str, text, log<br><br>对于非数值类型， *mode*参数被忽略。<br><br>示例：<br>=> **changecount**(/host/key, 1w) → 到[现在](/manual/config/triggers#evaluation_period)为止的最近一周值变化次数<br>=> **changecount**(/host/key,\#10,"inc") → 值增加的次数（相对于相邻value) 在最后10个值中<br>=> **changecount**(/host/key,24h,"dec") → 到[现在](/manual/config/triggers#evaluation_period)为止的过去 24 小时内值减少的数量（相对于相邻值）| |**count** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<|<| |<|定义的评估期内的值数。|参见[常用参数](#common-parameters).<br><br>**operator** (可选; 必须使用双引号)<br><br>支持的`operators`:<br>*eq* - 等于（默认）<br>*ne* - 不等于<br>*gt* - 大于<br>*ge* - 大于或等于<br>*lt* - 小于<br>*le* - 小于或等于<br>*like* - 匹配 if 包含模式（区分大小写）<br>*bitand* - 位与<br>*regexp* - `pattern`中给出的正则表达式匹配区分大小写<br>*iregexp* - `pattern`中给出的正则表达式匹配不区分大小写<br><br>**pattern** (可选) - 必需的模式（字符串参数必须用双引号引起来）|支持的值类型： float, integer, string, text, log<br><br>浮点项匹配精度为2.22e-16; 如果数据库[未升级](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) ，则精度为0.000001。<br><br>使用*bitand* 作为第三个参数，第四个`pattern`参数可以指定为两个数字，用'/'分隔： **number\_to\_compare\_with/mask**. count() 根据值和*mask* 计算"按位与" 并将结果和 *number\_to\_compare\_with*进行比较。如果"按位与"的结果等于*number\_to\_compare\_with*, 则计算该值。<br>如果*number\_to\_compare\_with* and *mask* 相等， 则只有*mask* 需要指定 (不带 '/').<br><br>以*regexp* or *iregexp* 作为第三个参数, 第四个`pattern` 参数可以是普通的或or [全局](/manual/regular_expressions#global_regular_expressions) (以'@'开头)正则表达式。在全局正则表达式的情况下，区分大小写是从全局正则表达式设置继承的。出于正则表达式匹配的目的，浮点值将始终用'.'后的4位十进制数字表示。另请注意，对于大数字，十进制（存储在数据库中）和二进制(由Zabbix server使用) 表示的差异可能会影响第 4 位十进制数字。<br><br>示例：<br>=> **count**(/host/key,**10m**) → 到[现在](/manual/config/triggers#evaluation_period)为止的最后 10 分钟的值数<br>=> **count**(/host/key,**10m**,"like","error") → 从[现在](/manual/config/triggers#evaluation_period) 开始过去10分钟内包含 'error' 的值的数量<br>=> **count**(/host/key,**10m**,,12) → 到[现在](/manual/config/triggers#evaluation_period) 为止的最后10分钟的值的数量等于'12'<br>=> **count**(/host/key,**10m**,"gt",12) → 到[现在](/manual/config/triggers#evaluation_period) 为止的最后10分钟的值的数量大于 '12'<br>=> **count**(/host/key,**\#10**,"gt",12) → 到[现在](/manual/config/triggers#evaluation_period) 为止的最后10个值中大于'12'的数量<br>=> **count**(/host/key,**10m:now-1d**,"gt",12) → 从[现在](/manual/config/triggers#evaluation_period)起24小时前到24小时前10分钟之间超过'12'的值数量<br>=> **count**(/host/key,**10m**,"bitand","6/7") → 到[现在](/manual/config/triggers#evaluation_period)为止最后10分钟的值的数量，在3个最低有效位中具有 '110' (二进制) 。<br>=> **count**(/host/key,**10m:now-1d**) → 从[现在](/manual/config/triggers#evaluation_period)起24小时前到24小时前10分钟之间的值数量| |**countunique** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<|<| |<|定义的评估期内唯一值的数量。|参见[常用参数](#common-parameters).<br><br>**operator** (可选；必须使用双引号)<br><br>支持`operators`:<br>*eq* - 等于（默认）<br>*ne* - 不等于<br>*gt* - 大于<br>*ge* - 大于或等于<br>*lt* - 小于<br>*le* - 小于或等于<br>*like* - 匹配 if 包含模式（区分大小写）<br>*bitand* - 位与<br>*regexp* - `pattern`中给出的正则表达式匹配区分大小写<br>*iregexp* - `pattern`中给出的正则表达式匹配不区分大小写<br><br>**pattern** (可选) - 必需的模式（字符串参数必须用双引号引起来）|支持的值类型： float, integer, string, text, log<br><br>浮点项匹配精度为2.22e-16; 如果数据库[未升级](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) ，则精度为0.000001。<br><br>使用*bitand* 作为第三个参数，第四个`pattern`参数可以指定为两个数字，用'/'分隔： **number\_to\_compare\_with/mask**. count() 根据值和*mask* 计算"按位与" 并将结果和 *number\_to\_compare\_with*进行比较。如果"按位与"的结果等于*number\_to\_compare\_with*, 则计算该值。<br>如果*number\_to\_compare\_with* and *mask* 相等， 则只有*mask* 需要指定 (不带 '/').<br><br>以*regexp* or *iregexp* 作为第三个参数, 第四个`pattern` 参数可以是普通的或or [全局](/manual/regular_expressions#global_regular_expressions) (以'@'开头)正则表达式。在全局正则表达式的情况下，区分大小写是从全局正则表达式设置继承的。出于正则表达式匹配的目的，浮点值将始终用'.'后的4位十进制数字表示。另请注意，对于大数字，十进制（存储在数据库中）和二进制(由Zabbix server使用) 表示的差异可能会影响第 4 位十进制数字。<br><br>Examples:<br>=> **countunique**(/host/key,**10m**) → 到[现在](/manual/config/triggers#evaluation_period)为止的最后 10 分钟的唯一值数<br>=> **countunique**(/host/key,**10m**,"like","error") →从[现在](/manual/config/triggers#evaluation_period) 开始过去10分钟内包含 'error' 的唯一值的数量<br>=> **countunique**(/host/key,**10m**,"gt",12) →  到[现在](/manual/config/triggers#evaluation_period) 为止的最后10分钟的唯一值的数量大于 '12'<br>=> **countunique**(/host/key,**\#10**,"gt",12) →  到[现在](/manual/config/triggers#evaluation_period) 为止的最后10个值中唯一值数量大于'12'<br>=> **countunique**(/host/key,**10m:now-1d**,"gt",12) → 从[现在](/manual/config/triggers#evaluation_period)起24小时前到24小时前10分钟之间超过'12'的唯一值数量<br>=> **countunique**(/host/key,**10m**,"bitand","6/7") → 到[现在](/manual/config/triggers#evaluation_period)为止最后10分钟的唯一值的数量，在3个最低有效位中具有 '110' (二进制) 。<br>=> **countunique**(/host/key,**10m:now-1d**) →从[现在](/manual/config/triggers#evaluation_period)起24小时前到24小时前10分钟之间的唯一值数量| |**find** (/host/key,<(sec\|\#num)<:time shift>>,<operator>,<pattern>)|<|<|<| |<|找到一个值匹配。|参见[常用参数](#common-parameters).<br><br>**sec** or **\#num** (可选) - 如果未指定，则默认为最新值<br><br>**operator** (可选；必须使用双引号)<br><br>支持`operators`:<br>*eq* - 等于（默认）<br>*ne* - 不等于<br>*gt* - 大于<br>*ge* - 大于或等于<br>*lt* - 小于<br>*le* - 小于或等于<br>*like* - 值包含`pattern` 中给定的字符串(区分大小写)<br>*bitand* - 位与<br>*regexp* - `pattern`中给出的正则表达式匹配区分大小写<br>*iregexp* - `pattern`中给出的正则表达式匹配不区分大小写<br><br>**pattern** - (可选) - 必需的模式（字符串参数必须用双引号引起来）；[Perl兼容正则表达式](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) 正则表达式，如果`operator` 是 *regexp*, *iregexp*。|支持的值类型：float, int, str, text, log<br><br>返回：<br>1 - 找到<br>0 - 否则<br><br>如果处理了多个值，至少有一个匹配值，则返回'1'。<br><br>以*regexp* 或 *iregexp* 作为第三个参数，第四个`pattern`参数可以是普通的或[全局](/manual/regular_expressions#global_regular_expressions) 的(以'@'为开头) 正则表达式。在全局正则表达式的情况下，区分大小写是从全局正则表达式设置继承的。<br><br>示例：<br>=> **find**(/host/key,**10m**,"like","error") → 查找从[现在](/manual/config/triggers#evaluation_period)开始10分钟前包含'error' 的值| |**first** (/host/key,sec<:time shift>)|<|<|<| |<|定义的评估期内的第一个（最旧的）值。|参见[常用参数](#common-parameters).|支持的值类型：float, int, str, text, log<br><br>示例：<br>=> **first**(/host/key,**1h**) → 检索从[现在](/manual/config/triggers#evaluation_period)开始最近一小时内最旧的值。<br><br>请参阅last()。| |**fuzzytime** (/host/key,sec)|<|<|<| |<|检查被动代理时间与Zabbix server/proxy时间的差异。|参见[常用参数](#common parameters).|支持的值类型：float, int<br><br>返回：<br>1 - 被动监控项值（作为时间戳）与 Zabbix server/proxy时间戳之间的差异小于或等于 T 秒<br>0 - 否则 <br><br>通常与 'system.localtime' 监控项一起使用以检查该本地时间与 Zabbix server的本地时间同步。 *注意* 'system.localtime'”必须配置为[被动检查](/manual/appendix/items/activepassive#passive_checks)。<br>也可以与 vfs.file.time\[/path/file,modify\] key 一起使用来检查文件是否长时间没有得到更新。<br><br>示例：<br>=> **fuzzytime**(/host/key,**60s**)=0 → 如果时间差超过 60 秒，则检测问题<br><br>不建议将此函数用于复杂的触发器表达式（涉及多个监控项），因为它可能会导致意外结果（将使用最近的度量来测量时间差）， 例如在 `fuzzytime(/Host/system.localtime,60s)=0 or last(/Host/trap)<>0`| |**last** (/host/key,<\#num<:time shift>>)|<|<|<| |<|最新值|参见[常用参数](#common-parameters).<br><br>**\#num** (可选) - 第N个最近的值|支持的值类型：float, int, str, text, log<br><br>请注意，带哈希标签的时间段(\#N)在这里的工作方式与许多其他函数不同。<br>例如：<br>last()总是等于last(\#1)<br>last(\#3) - 第三个最近的值 (*不是* 三个最新的值)<br><br>如果在1秒内存在两个以上的值，Zabbix不保证值的确切历史顺序。<br><br>示例：<br>=> **last**(/host/key) → 检索最后一个值<br>=> **last**(/host/key,**\#2**) → 检索前一个值<br>=> **last**(/host/key,**\#1**) <> **last**(/host/key,**\#2**) → 最后一个值和前一个值不同<br><br>另外参见first()。| |**logeventid** (/host/key,<\#num<:time shift>>,<pattern>)|<|<|<| |<|检查最后一个日志条目的事件 ID 是否与正则表达式匹配|参见 [常用参数](#common-parameters).<br><br>**\#num** (可选) - 第N个最近的值<br><br>**pattern** (可选) - 描述所需模式的正则表达式 [Perl兼容正则表达式](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE)样式(字符串参数必须用双引号引起来)|支持的值类型：log<br><br>返回：<br>0 - 不匹配<br>1 - 匹配| |**logseverity** (/host/key,<\#num<:time shift>>)|<|<|<| |<|最后一个日志条目的日志严重性。|参见 [常用参数](#common-parameters).<br><br>**\#num** (可选) - 第N个最近的值|支持的值类型： log<br><br>返回：<br>0 - 默认严重性<br>N - 严重性(整数，对 Windows事件日志有用：1 - 信息， 2 - 警告， 4 - 错误， 7 - 失败审计， 8 - 成功审计， 9 - 严重，10 - 详细).<br>Zabbix 从Windows 事件日志的 **Information** 中获取日志的严重性| |**logsource** (/host/key,<\#num<:time shift>>,<pattern>)|<|<|<| |<|检查最后一个日志条目的日志源是否匹配正则表达式|参见 [常用参数](#common-parameters).<br><br>**\#num** (可选) - 第N个最近的值<br><br>**pattern** (可选) -描述所需模式的正则表达式 [Perl兼容正则表达式](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE)(字符串参数必须用双引号引起来)|支持的值类型： log<br><br>返回：<br>0 - 不匹配<br>1 - 匹配<br><br>通常用于 Windows 事件日志。例如，logsource("VMware Server")| |**monodec** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|检查值是否单调下降|参见[常用参数](#common-parameters).<br><br>**mode** (必须使用双引号) - *weak* (每个值都小于或与前一个相同；默认) 或 *strict* (每个值都减少了)|支持的值类型：int<br><br>如果时间段内的所有元素连续减少，则返回1，否则返回0。<br><br>示例：<br>=> **monodec**(/Host1/system.swap.size\[all,free\],**60s**) + **monodec**(/Host2/system.swap.size\[all,free\],**60s**) + **monodec**(/Host3/system.swap.size\[all,free\],**60s**) - 计算空闲交换大小减少的主机数量| |**monoinc** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|检查值是否单调增加|参见 [常用参数](#common-parameters).<br><br>**mode** (必须使用双引号) - *weak* (每个值都大于或与前一个相同；默认) 或 *strict* (每个值都增加了)|支持的值类型：int<br><br>如果时间段内的所有元素连续增加，则返回1，否则返回0。<br><br>示例：<br>=> **monoinc**(/Host1/system.localtime,**\#3**,"strict")=0 - 检查系统本地时间是否一直在增加| |**nodata** (/host/key,sec,<mode>)|<|<|<| |<|检查是否没有收到数据|参见 [常用参数](#common-parameters).<br><br>**sec** 周期不应小于30 秒，因为历史同步器进程仅每30秒计算一次此函数。<br><br>nodata(/host/key,0)是不允许的<br><br>**mode** - 如果设置为*strict* (双引号), 此函数将对代理可用性不敏感（有关详细信息，请参阅注释）|支持所有值类型<br><br>返回：<br>1 - 如果在定义的时间段内没有收到数据<br>0 - 否则<br><br>从Zabbix 5.0, 代理监控的'nodata' 触发器默认情况下对代理可用性敏感 - 如果代理不可用，则 'nodata'触发器将恢复连接后不会立即触发，但会在延迟期间跳过数据。请注意，如果连接恢复超过15秒且不少于2秒和 ProxyUpdateFrequency秒后，则会激活被动代理抑制。如果连接恢复超过15秒，则会激活活动代理抑制。<br><br>要关闭对代理可用性的敏感性，请使用第三个参数，例如：**nodata**(/host/key,**5m**,**"strict"**);在这种情况下，该函数将与5.0.0之前的功能相同，并在没有数据的评估期（五分钟）过去后立即触发。<br><br>请注意，如果在第一个参数的时间段内，此函数将显示错误：<br>- 没有数据并且Zabbix server已重新启动<br>- 没有数据并且已完成维护<br>- 没有数据并且监控项已添加或重新启用<br>错误是显示在触发器 [配置](/manual/web_interface/frontend_sections/configuration/hosts/triggers)的*Info* 中。<br><br>如果Zabbix server, proxy和agent存在时间差异，此功能可能无法正常工作。另外参见: [时间同步要求](/manual/installation/requirements#time_synchronization)。| |**percentile** (/host/key,(sec\|\#num)<:time shift>,percentage)|<|<|<| |<|周期的第P个百分位数，其中P（百分比）由第三个参数指定|参见 [常用参数](#common-parameters).<br><br>**percentage** - 0到100（含）之间的浮点数，小数点后最多4位|支持的值类型：float, int| |**rate** (/host/key,sec<:time shift>)|<|<|<| |<|在定义的时间段内，单调递增的计数器每秒平均增加速率|参见[常用参数](#common-parameters).|支持的值类型：float, int<br><br>功能上对应于PromQL的'[rate](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate)'。<br><br>示例：<br>=> **rate**(/host/key,**30s**) → 如果 30 秒内单调增加为 20，则此函数将返回 0.67。| |**trendavg** (/host/key,time period:time shift)|<|<|<| |<|定义时间段内趋势值的平均值|**time period** - 时间段(最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）|示例：<br>=> **trendavg**(/host/key,**1h:now/h**) → 前一小时的平均值(例如 12:00-13:00)<br>=> **trendavg**(/host/key,**1h:now/h-1h**) → 两小时前的平均值(11:00-12:00)<br>=> **trendavg**(/host/key,**1h:now/h-2h**) → 三小时前的平均值(10:00-11:00)<br>=> **trendavg**(/host/key,**1M:now/M-1y**) → 一年前上个月的平均值| |**trendcount** (/host/key,time period:time shift)|<|<|<| |<|在定义的时间段内成功检索到的趋势值的数量。|**time period** - 时间段(最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）|示例：<br>=> **trendcount**(/host/key,**1h:now/h**) → 上一小时的计数(例如 12:00-13:00)<br>=> **trendcount**(/host/key,**1h:now/h-1h**) → 两小时前的计数 (11:00-12:00)<br>=> **trendcount**(/host/key,**1h:now/h-2h**) → 三小时前的计数 (10:00-11:00)<br>=> **trendcount**(/host/key,**1M:now/M-1y**) → 一年前的上个月的计数| |**trendmax** (/host/key,time period:time shift)|<|<|<| |<|定义时间段内趋势值的最大值|**time period** - - 时间段(最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）|示例：<br>=> **trendmax**(/host/key,**1h:now/h**) → 前一小时的最大值 (例如12:00-13:00)<br>=> **trendmax**(/host/key,**1h:now/h**) - **trendmin**(/host/key,**1h:now/h**) → 计算前一小时(12:00-13:00)的最大值和最小值之间的差值(趋势增量)<br>=> **trendmax**(/host/key,**1h:now/h-1h**) → 两小时前的最大值 (11:00-12:00)<br>=> **trendmax**(/host/key,**1h:now/h-2h**) → 三小时前的最大值 (10:00-11 :00)<br>=> **trendmax**(/host/key,**1M:now/M-1y**) → 一年前上个月的最大值| |**trendmin** (/host/key,time period:time shift)|<|<|<| |<|定义时间段内趋势值的最小值|**time period** -时间段(最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）|示例：<br>=> **trendmin**(/host/key,**1h:now/h**) → 前一小时的最小值(例如 12:00-13:00)<br>=> **trendmin**(/host/key,**1h:now/h**) - **trendmin**(/host/key,**1h:now/h**) → 计算前一小时(12:00-13:00)的最大值和最小值之间的差值(趋势增量)<br>=> **trendmin**(/host/key,**1h:now/h-1h**) → 最小两小时前(11:00-12:00)<br>=> **trendmin**(/host/key,**1h:now/h-2h**) → 最小三小时前 (10:00-11 :00)<br>=> **trendmin**(/host/key,**1M:now/M-1y**) → 一年前上个月的最小值| |**trendstl** (/host/key,eval period:time shift,detection period,season,<deviations>,<devalg>,<s_window>)|<|<|<| |<|返回异常率 - 一个介于0和1之间的十进制值，即（（检测周期中异常值的数量）/（检测周期中值的总数）|**eval period** - 必须分解的时间段 (最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）<br><br>**detection period** - 从计算异常的评估期结束开始的时间段（最小'1h'，不能长于评估期），定义为 \<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周)。<br><br>**season** - 预计seasonality (重复模式) 的最短时间段(最小'2h', 不能长于评估期，评估期的条目数必须大于结果频率的两倍 (season/h))，定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周)。<br><br>**deviations** - 计为异常的偏差数（用 devalg 计算）（可以是小数），（必须大于或等于1，默认为 3）<br><br>**devalg** (必须双引号) -偏差算法，可以是*stddevpop*, *stddevsamp* or *mad* (默认)<br><br>**s_window** 用于seasonal 提取的黄土窗口的跨度(滞后)(默认为10*评估期间的条目数+1)|示例：<br>=> **trendstl**(/host/key,**100h:now/h**,10h,2h) → 分析过去100小时的趋势数据，<br>找出该周期前10小时的异常率，<br>预计周期为2h，<br>如果评估期的剩余序列值达到该剩余序列的MAD的3个偏差值<br>=> **trendstl**(/host/key,**100h:now/h-10h**,100h,2h,2.1,"mad") →  分析前 100 小时趋势数据的周期，从 10 小时前开始计数，<br>找到整个周期的异常率，<br>预计周期为 2h，<br>如果评估期的剩余序列值达到该剩余序列的MAD的2,1偏差值，则将其视为异常值<br>=> **trendstl**(/host/key,**100d:now/d-1d**,10d,1d,4,,10) → 分析从前一天开始的前100天趋势数据，<br>求该周期最后10天周期的异常率，<br>期望周期为1天，<br>评估周期的剩余序列值视为异常如果它们达到该剩余系列的MAD的4个偏差值，<br>则覆盖 loess 窗口的默认跨度，用于季节性提取“10*eval period 中的条目数 +1”，跨度为10滞后<br>=> **trendstl**(/host/key,**1M:now/M-1y**,1d,2h,,"stddevsamp") → 一年前上个月的最小值<br>分析从一年前开始的上个月趋势数据，<br>求预计周期为2小时的该周期的最后一天，<br>如果评估周期的剩余序列值达到该剩余序列的样本标准偏差的3偏差值，则将其视为异常| |**trendsum** (/host/key,time period:time shift)|<|<|<| |<|定义时间段内的趋势值总和|**time period** -时间段(最小'1h'), 定义为\<N>\<time unit> 其中<br>`N` - 时间单位数<br>`time unit` - h (时), d (天), w (周), M (月) 或 y (年)。<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - 时间段偏移（参见示例）|示例：<br>=> **trendsum**(/host/key,**1h:now/h**) → 前一小时的总和 (例如 12:00-13:00)<br>=> **trendsum**(/host/key,**1h:now/h-1h**) → 两小时前 (11:00-12:00) 的总和<br>=> **trendsum**(/host/key,**1h:now/h-2h**) → 三小时前 (10:00-11:00) 的总和<br>=> **trendsum**(/host/key,**1M:now/M-1y**) → 一年前上个月的总和|

en-us	#### History functions  |FUNCTION|<|<|<| |--------|-|-|-| |<|**Description**|**Function-specific parameters**|**Comments**| |**change** (/host/key)|<|<|<| |<|The amount of difference between the previous and latest value.|<|Supported value types: float, int, str, text, log<br><br>For strings returns:<br>0 - values are equal<br>1 - values differ<br><br>Example:<br>=> **change**(/host/key)>10<br><br>Numeric difference will be calculated, as seen with these incoming example values ('previous' and 'latest' value = difference):<br>'1' and '5' = `+4`<br>'3' and '1' = `-2`<br>'0' and '-2.5' = `-2.5`<br><br>See also: [abs](/manual/appendix/functions/math) for comparison| |**changecount** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|Number of changes between adjacent values within the defined evaluation period.|See [common parameters](#common-parameters).<br><br>**mode** (optional; must be double-quoted)<br><br>Supported `modes`:<br>*all* - count all changes (default)<br>*dec* - count decreases<br>*inc* - count increases|Supported value types: float, int, str, text, log<br><br>For non-numeric value types, *mode* parameter is ignored.<br><br>Examples:<br>=> **changecount**(/host/key, 1w) → number of value changes for the last week until [now](/manual/config/triggers#evaluation_period)<br>=> **changecount**(/host/key,\#10,"inc") → number of value increases (relative to the adjacent value) among the last 10 values<br>=> **changecount**(/host/key,24h,"dec") → number of value decreases (relative to the adjacent value) for the last 24 hours until [now](/manual/config/triggers#evaluation_period)| |**count** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<|<| |<|Number of values within the defined evaluation period.|See [common parameters](#common-parameters).<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - matches if contains pattern (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** (optional) - required pattern (string arguments must be double-quoted)|Supported value types: float, integer, string, text, log<br><br>Float items match with the precision of 2.22e-16; if database is [not upgraded](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) the precision is 0.000001.<br><br>With *bitand* as the third parameter, the fourth `pattern` parameter can be specified as two numbers, separated by '/': **number\_to\_compare\_with/mask**. count() calculates "bitwise AND" from the value and the *mask* and compares the result to *number\_to\_compare\_with*. If the result of "bitwise AND" is equal to *number\_to\_compare\_with*, the value is counted.<br>If *number\_to\_compare\_with* and *mask* are equal, only the *mask* need be specified (without '/').<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings. For the purpose of regexp matching, float values will always be represented with 4 decimal digits after '.'. Also note that for large numbers difference in decimal (stored in database) and binary (used by Zabbix server) representation may affect the 4th decimal digit.<br><br>Examples:<br>=> **count**(/host/key,**10m**) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period)<br>=> **count**(/host/key,**10m**,"like","error") → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that contain 'error'<br>=> **count**(/host/key,**10m**,,12) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that equal '12'<br>=> **count**(/host/key,**10m**,"gt",12) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **count**(/host/key,**\#10**,"gt",12) → number of values within the last 10 values until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **count**(/host/key,**10m:now-1d**,"gt",12) → number of values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period) that were over '12'<br>=> **count**(/host/key,**10m**,"bitand","6/7") → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) having '110' (in binary) in the 3 least significant bits.<br>=> **count**(/host/key,**10m:now-1d**) → number of values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period)| |**countunique** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<|<| |<|Number of unique values within the defined evaluation period.|See [common parameters](#common-parameters).<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - matches if contains pattern (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** (optional) - required pattern (string arguments must be double-quoted)|Supported value types: float, integer, string, text, log<br><br>Float items match with the precision of 2.22e-16; if database is [not upgraded](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) the precision is 0.000001.<br><br>With *bitand* as the third parameter, the fourth `pattern` parameter can be specified as two numbers, separated by '/': **number\_to\_compare\_with/mask**. count() calculates "bitwise AND" from the value and the *mask* and compares the result to *number\_to\_compare\_with*. If the result of "bitwise AND" is equal to *number\_to\_compare\_with*, the value is counted.<br>If *number\_to\_compare\_with* and *mask* are equal, only the *mask* need be specified (without '/').<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings. For the purpose of regexp matching, float values will always be represented with 4 decimal digits after '.'. Also note that for large numbers difference in decimal (stored in database) and binary (used by Zabbix server) representation may affect the 4th decimal digit.<br><br>Examples:<br>=> **countunique**(/host/key,**10m**) → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period)<br>=> **countunique**(/host/key,**10m**,"like","error") → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that contain 'error'<br>=> **countunique**(/host/key,**10m**,"gt",12) → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **countunique**(/host/key,**\#10**,"gt",12) → number of unique values within the last 10 values until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **countunique**(/host/key,**10m:now-1d**,"gt",12) → number of unique values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period) that were over '12'<br>=> **countunique**(/host/key,**10m**,"bitand","6/7") → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) having '110' (in binary) in the 3 least significant bits.<br>=> **countunique**(/host/key,**10m:now-1d**) → number of unique values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period)| |**find** (/host/key,<(sec\|\#num)<:time shift>>,<operator>,<pattern>)|<|<|<| |<|Find a value match.|See [common parameters](#common-parameters).<br><br>**sec** or **\#num** (optional) - defaults to the latest value if not specified<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - value contains the string given in `pattern` (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** - required pattern (string arguments must be double-quoted); [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) regular expression if `operator` is *regexp*, *iregexp*.|Supported value types: float, int, str, text, log<br><br>Returns:<br>1 - found<br>0 - otherwise<br><br>If more than one value is processed, '1' is returned if there is at least one matching value.<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings.<br><br>Example:<br>=> **find**(/host/key,**10m**,"like","error") → find a value that contains 'error' within the last 10 minutes until [now](/manual/config/triggers#evaluation_period)| |**first** (/host/key,sec<:time shift>)|<|<|<| |<|The first (the oldest) value within the defined evaluation period.|See [common parameters](#common-parameters).|Supported value types: float, int, str, text, log<br><br>Example:<br>=> **first**(/host/key,**1h**) → retrieve the oldest value within the last hour until [now](/manual/config/triggers#evaluation_period)<br><br>See also last().| |**fuzzytime** (/host/key,sec)|<|<|<| |<|Checking how much the passive agent time differs from the Zabbix server/proxy time.|See [common-parameters](#common parameters).|Supported value types: float, int<br><br>Returns:<br>1 - difference between the passive item value (as timestamp) and Zabbix server/proxy timestamp is less than or equal to T seconds<br>0 - otherwise<br><br>Usually used with the 'system.localtime' item to check that local time is in sync with the local time of Zabbix server. *Note* that 'system.localtime' must be configured as a [passive check](/manual/appendix/items/activepassive#passive_checks).<br>Can be used also with vfs.file.time\[/path/file,modify\] key to check that file didn't get updates for long time.<br><br>Example:<br>=> **fuzzytime**(/host/key,**60s**)=0 → detect a problem if the time difference is over 60 seconds<br><br>This function is not recommended for use in complex trigger expressions (with multiple items involved), because it may cause unexpected results (time difference will be measured with the most recent metric), e.g. in `fuzzytime(/Host/system.localtime,60s)=0 or last(/Host/trap)<>0`| |**last** (/host/key,<\#num<:time shift>>)|<|<|<| |<|The most recent value.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value|Supported value types: float, int, str, text, log<br><br>Take note that a hash-tagged time period (\#N) works differently here than with many other functions.<br>For example:<br>last() is always equal to last(\#1)<br>last(\#3) - third most recent value (*not* three latest values)<br><br>Zabbix does not guarantee the exact order of values if more than two values exist within one second in history.<br><br>Example:<br>=> **last**(/host/key) → retrieve the last value<br>=> **last**(/host/key,**\#2**) → retrieve the previous value<br>=> **last**(/host/key,**\#1**) <> **last**(/host/key,**\#2**) → the last and previous values differ<br><br>See also first().| |**logeventid** (/host/key,<\#num<:time shift>>,<pattern>)|<|<|<| |<|Checking if event ID of the last log entry matches a regular expression.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value<br><br>**pattern** (optional) - regular expression describing the required pattern, [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) style (string arguments must be double-quoted).|Supported value types: log<br><br>Returns:<br>0 - does not match<br>1 - matches| |**logseverity** (/host/key,<\#num<:time shift>>)|<|<|<| |<|Log severity of the last log entry.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value|Supported value types: log<br><br>Returns:<br>0 - default severity<br>N - severity (integer, useful for Windows event logs: 1 - Information, 2 - Warning, 4 - Error, 7 - Failure Audit, 8 - Success Audit, 9 - Critical, 10 - Verbose).<br>Zabbix takes log severity from **Information** field of Windows event log.| |**logsource** (/host/key,<\#num<:time shift>>,<pattern>)|<|<|<| |<|Checking if log source of the last log entry matches a regular expression.|See [common parameters](#common-parameters).<br><br>**\#num** (optional) - the Nth most recent value<br><br>**pattern** (optional) - regular expression describing the required pattern, [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) style (string arguments must be double-quoted).|Supported value types: log<br><br>Returns:<br>0 - does not match<br>1 - matches<br><br>Normally used for Windows event logs. For example, logsource("VMware Server").| |**monodec** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|Check if there has been a monotonous decrease in values.|See [common parameters](#common-parameters).<br><br>**mode** (must be double-quoted) - *weak* (every value is smaller or the same as the previous one; default) or *strict* (every value has decreased)|Supported value types: int<br><br>Returns 1 if all elements in the time period continuously decrease, 0 otherwise.<br><br>Example:<br>=> **monodec**(/Host1/system.swap.size\[all,free\],**60s**) + **monodec**(/Host2/system.swap.size\[all,free\],**60s**) + **monodec**(/Host3/system.swap.size\[all,free\],**60s**) - calculate in how many hosts there has been a decrease in free swap size| |**monoinc** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|Check if there has been a monotonous increase in values.|See [common parameters](#common-parameters).<br><br>**mode** (must be double-quoted) - *weak* (every value is bigger or the same as the previous one; default) or *strict* (every value has increased)|Supported value types: int<br><br>Returns 1 if all elements in the time period continuously increase, 0 otherwise.<br><br>Example:<br>=> **monoinc**(/Host1/system.localtime,**\#3**,"strict")=0 - check if system local time has been increasing consistently| |**nodata** (/host/key,sec,<mode>)|<|<|<| |<|Checking for no data received.|See [common parameters](#common-parameters).<br><br>**sec** period should not be less than 30 seconds because the history syncer process calculates this function only every 30 seconds.<br><br>nodata(/host/key,0) is disallowed.<br><br>**mode** - if set to *strict* (double-quoted), this function will be insensitive to proxy availability (see comments for details).|All value types are supported.<br><br>Returns:<br>1 - if no data received during the defined period of time<br>0 - otherwise<br><br>Since Zabbix 5.0, the 'nodata' triggers monitored by proxy are, by default, sensitive to proxy availability - if proxy becomes unavailable, the 'nodata' triggers will not fire immediately after a restored connection, but will skip the data for the delayed period. Note that for passive proxies suppression is activated if connection is restored more than 15 seconds and no less than 2 & ProxyUpdateFrequency seconds later. For active proxies suppression is activated if connection is restored more than 15 seconds later.<br><br>To turn off sensitiveness to proxy availability, use the third parameter, e.g.: **nodata**(/host/key,**5m**,**"strict"**); in this case the function will work the same as before 5.0.0 and fire as soon as the evaluation period (five minutes) without data has past.<br><br>Note that this function will display an error if, within the period of the 1st parameter:<br>- there's no data and Zabbix server was restarted<br>- there's no data and maintenance was completed<br>- there's no data and the item was added or re-enabled<br>Errors are displayed in the *Info* column in trigger [configuration](/manual/web_interface/frontend_sections/configuration/hosts/triggers).<br><br>This function may not work properly if there are time differences between Zabbix server, proxy and agent. See also: [Time synchronization requirement](/manual/installation/requirements#time_synchronization).| |**percentile** (/host/key,(sec\|\#num)<:time shift>,percentage)|<|<|<| |<|P-th percentile of a period, where P (percentage) is specified by the third parameter.|See [common parameters](#common-parameters).<br><br>**percentage** - a floating-point number between 0 and 100 (inclusive) with up to 4 digits after the decimal point|Supported value types: float, int| |**rate** (/host/key,sec<:time shift>)|<|<|<| |<|Per-second average rate of the increase in a monotonically increasing counter within the defined time period.|See [common parameters](#common-parameters).|Supported value types: float, int<br><br>Functionally corresponds to '[rate](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate)' of PromQL.<br><br>Example:<br>=> **rate**(/host/key,**30s**) → If the monotonic increase over 30 seconds is 20, this function will return 0.67.| |**trendavg** (/host/key,time period:time shift)|<|<|<| |<|Average of trend values within the defined time period.|**time period** - the time period (minimum '1h'), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week), M (month) or y (year).<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - the time period offset (see examples)|Examples:<br>=> **trendavg**(/host/key,**1h:now/h**) → average for the previous hour (e.g. 12:00-13:00)<br>=> **trendavg**(/host/key,**1h:now/h-1h**) → average for two hours ago (11:00-12:00)<br>=> **trendavg**(/host/key,**1h:now/h-2h**) → average for three hours ago (10:00-11:00)<br>=> **trendavg**(/host/key,**1M:now/M-1y**) → average for the previous month a year ago| |**trendcount** (/host/key,time period:time shift)|<|<|<| |<|Number of successfully retrieved trend values within the defined time period.|**time period** - the time period (minimum '1h'), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week), M (month) or y (year).<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - the time period offset (see examples)|Examples:<br>=> **trendcount**(/host/key,**1h:now/h**) → count for the previous hour (e.g. 12:00-13:00)<br>=> **trendcount**(/host/key,**1h:now/h-1h**) → count for two hours ago (11:00-12:00)<br>=> **trendcount**(/host/key,**1h:now/h-2h**) → count for three hours ago (10:00-11:00)<br>=> **trendcount**(/host/key,**1M:now/M-1y**) → count for the previous month a year ago| |**trendmax** (/host/key,time period:time shift)|<|<|<| |<|The maximum in trend values within the defined time period.|**time period** - the time period (minimum '1h'), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week), M (month) or y (year).<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - the time period offset (see examples)|Examples:<br>=> **trendmax**(/host/key,**1h:now/h**) → maximum for the previous hour (e.g. 12:00-13:00)<br>=> **trendmax**(/host/key,**1h:now/h**) - **trendmin**(/host/key,**1h:now/h**) → calculate the difference between the maximum and minimum values (trend delta) for the previous hour (12:00-13:00)<br>=> **trendmax**(/host/key,**1h:now/h-1h**) → maximum for two hours ago (11:00-12:00)<br>=> **trendmax**(/host/key,**1h:now/h-2h**) → maximum for three hours ago (10:00-11:00)<br>=> **trendmax**(/host/key,**1M:now/M-1y**) → maximum for the previous month a year ago| |**trendmin** (/host/key,time period:time shift)|<|<|<| |<|The minimum in trend values within the defined time period.|**time period** - the time period (minimum '1h'), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week), M (month) or y (year).<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - the time period offset (see examples)|Examples:<br>=> **trendmin**(/host/key,**1h:now/h**) → minimum for the previous hour (e.g. 12:00-13:00)<br>=> **trendmin**(/host/key,**1h:now/h**) - **trendmin**(/host/key,**1h:now/h**) → calculate the difference between the maximum and minimum values (trend delta) for the previous hour (12:00-13:00)<br>=> **trendmin**(/host/key,**1h:now/h-1h**) → minimum for two hours ago (11:00-12:00)<br>=> **trendmin**(/host/key,**1h:now/h-2h**) → minimum for three hours ago (10:00-11:00)<br>=> **trendmin**(/host/key,**1M:now/M-1y**) → minimum for the previous month a year ago| |**trendstl** (/host/key,eval period:time shift,detection period,season,<deviations>,<devalg>,<s_window>)|<|<|<| |<|Returns an anomaly rate - a decimal value between 0 and 1 that is ((the number of anomaly values in detect period) / (total number of values in detect period).|**eval period** - the time period that must be decomposed (minimum '1h'), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week), M (month) or y (year).<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - the time period offset (see examples)<br><br>**detection period** - the time period starting from the end of eval period for which anomalies are calculated (minimum '1h', cannot be longer than eval period), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week).<br><br>**season** - the shortest time period where seasonality (repeating patterns) is expected (minimum '2h', cannot be longer than eval period, number of entries in the eval period must be greater than the two times of the resulting frequency (season/h)), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week).<br><br>**deviations** - the number of deviations (calculated with devalg) to count as anomaly (can be decimal), (must be greater than or equal to 1, default is 3)<br><br>**devalg** - deviation algorithm, can be 'stddevpop', 'stddevsamp' or 'mad' (default)<br><br>**s_window** - the span (in lags) of the loess window for seasonal extraction (default is 10 * number of entries in eval period + 1)|Examples:<br>=> **trendstl**(/host/key,**100h:now/h**,10h,2h) →  analysing the last 100 hours of trend data,<br>find the anomalies rate for the previous 10 hours of that period,<br>expecting the periodicity to be 2h,<br>the remainder series values of the evaluation period are considered anomalies if they reach the value of 3 deviations of the MAD of that remainder series<br>=> **trendstl**(/host/key,**100h:now/h-10h**,100h,2h,2.1,'mad') →  analysing the period of previous 100 hours of trend data, starting counting 10 hours ago<br>find the anomalies rate for that entire period<br>expecting the periodicity to be 2h,<br>the remainder series values of the evaluation period are considered anomalies if they reach the value of  2,1 deviations of the MAD of that remainder series<br>=> **trendstl**(/host/key,**100d:now/d-1d**,10d,1d,4,,10) → analysing previous 100 days of trend data starting from a day ago,<br>find the anomalies rate for the period of last 10d of that period,<br>expecting the periodicity to be 1d,<br>the remainder series values of the evaluation period are considered anomalies if they reach the value of 4 deviations of the MAD of that remainder series,<br>overriding the default span of the loess window for seasonal extraction of "10 * number of entries in eval period + 1" with the span of 10 lags<br>=> **trendstl**(/host/key,**1M:now/M-1y**,1d,2h,,'stddevsamp') → minimum for the previous month a year ago<br>analysing previous month of trend data starting from a year ago,<br>find the anomalies rate of the last day of that period<br>expecting the periodicity to be 2h,<br>the remainder series values of the evaluation period are considered anomalies if they reach the value of 3 deviation of the sample standard deviation of that remainder series| |**trendsum** (/host/key,time period:time shift)|<|<|<| |<|Sum of trend values within the defined time period.|**time period** - the time period (minimum '1h'), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week), M (month) or y (year).<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - the time period offset (see examples)|Examples:<br>=> **trendsum**(/host/key,**1h:now/h**) → sum for the previous hour (e.g. 12:00-13:00)<br>=> **trendsum**(/host/key,**1h:now/h-1h**) → sum for two hours ago (11:00-12:00)<br>=> **trendsum**(/host/key,**1h:now/h-2h**) → sum for three hours ago (10:00-11:00)<br>=> **trendsum**(/host/key,**1M:now/M-1y**) → sum for the previous month a year ago|  
zh-cn	#### History functions  |FUNCTION|<|<|<| |--------|-|-|-| |<|**Description**|**Function-specific parameters**|**Comments**| |**change** (/host/key)|<|<|<| |<|The amount of difference between the previous and latest value.|<|Supported value types: float, int, str, text, log<br><br>For strings returns:<br>0 - values are equal<br>1 - values differ<br><br>Example:<br>=> **change**(/host/key)>10<br><br>Numeric difference will be calculated, as seen with these incoming example values ('previous' and 'latest' value = difference):<br>'1' and '5' = `+4`<br>'3' and '1' = `-2`<br>'0' and '-2.5' = `-2.5`<br><br>See also: [abs](/manual/appendix/functions/math) for comparison| |**changecount** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|Number of changes between adjacent values within the defined evaluation period.|See [common parameters](#common parameters).<br><br>**mode** (optional; must be double-quoted)<br><br>Supported `modes`:<br>*all* - count all changes (default)<br>*dec* - count decreases<br>*inc* - count increases|Supported value types: float, int, str, text, log<br><br>For non-numeric value types, *mode* parameter is ignored.<br><br>Examples:<br>=> **changecount**(/host/key, 1w) → number of value changes for the last week until [now](/manual/config/triggers#evaluation_period)<br>=> **changecount**(/host/key,\#10,"inc") → number of value increases (relative to the adjacent value) among the last 10 values<br>=> **changecount**(/host/key,24h,"dec") → number of value decreases (relative to the adjacent value) for the last 24 hours until [now](/manual/config/triggers#evaluation_period)| |**count** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<|<| |<|Number of values within the defined evaluation period.|See [common parameters](#common parameters).<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - matches if contains pattern (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** (optional) - required pattern (string arguments must be double-quoted)|Supported value types: float, integer, string, text, log<br><br>Float items match with the precision of 2.22e-16; if database is [not upgraded](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) the precision is 0.000001.<br><br>With *bitand* as the third parameter, the fourth `pattern` parameter can be specified as two numbers, separated by '/': **number\_to\_compare\_with/mask**. count() calculates "bitwise AND" from the value and the *mask* and compares the result to *number\_to\_compare\_with*. If the result of "bitwise AND" is equal to *number\_to\_compare\_with*, the value is counted.<br>If *number\_to\_compare\_with* and *mask* are equal, only the *mask* need be specified (without '/').<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings. For the purpose of regexp matching, float values will always be represented with 4 decimal digits after '.'. Also note that for large numbers difference in decimal (stored in database) and binary (used by Zabbix server) representation may affect the 4th decimal digit.<br><br>Examples:<br>=> **count**(/host/key,**10m**) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period)<br>=> **count**(/host/key,**10m**,"like","error") → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that contain 'error'<br>=> **count**(/host/key,**10m**,,12) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that equal '12'<br>=> **count**(/host/key,**10m**,"gt",12) → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **count**(/host/key,**\#10**,"gt",12) → number of values within the last 10 values until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **count**(/host/key,**10m:now-1d**,"gt",12) → number of values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period) that were over '12'<br>=> **count**(/host/key,**10m**,"bitand","6/7") → number of values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) having '110' (in binary) in the 3 least significant bits.<br>=> **count**(/host/key,**10m:now-1d**) → number of values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period)| |**countunique** (/host/key,(sec\|\#num)<:time shift>,<operator>,<pattern>)|<|<|<| |<|Number of unique values within the defined evaluation period.|See [common parameters](#common parameters).<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - matches if contains pattern (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** (optional) - required pattern (string arguments must be double-quoted)|Supported value types: float, integer, string, text, log<br><br>Float items match with the precision of 2.22e-16; if database is [not upgraded](https://www.zabbix.com/documentation/5.0/manual/installation/upgrade_notes_500#enabling_extended_range_of_numeric_float_values) the precision is 0.000001.<br><br>With *bitand* as the third parameter, the fourth `pattern` parameter can be specified as two numbers, separated by '/': **number\_to\_compare\_with/mask**. count() calculates "bitwise AND" from the value and the *mask* and compares the result to *number\_to\_compare\_with*. If the result of "bitwise AND" is equal to *number\_to\_compare\_with*, the value is counted.<br>If *number\_to\_compare\_with* and *mask* are equal, only the *mask* need be specified (without '/').<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings. For the purpose of regexp matching, float values will always be represented with 4 decimal digits after '.'. Also note that for large numbers difference in decimal (stored in database) and binary (used by Zabbix server) representation may affect the 4th decimal digit.<br><br>Examples:<br>=> **countunique**(/host/key,**10m**) → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period)<br>=> **countunique**(/host/key,**10m**,"like","error") → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that contain 'error'<br>=> **countunique**(/host/key,**10m**,"gt",12) → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **countunique**(/host/key,**\#10**,"gt",12) → number of unique values within the last 10 values until [now](/manual/config/triggers#evaluation_period) that are over '12'<br>=> **countunique**(/host/key,**10m:now-1d**,"gt",12) → number of unique values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period) that were over '12'<br>=> **countunique**(/host/key,**10m**,"bitand","6/7") → number of unique values for the last 10 minutes until [now](/manual/config/triggers#evaluation_period) having '110' (in binary) in the 3 least significant bits.<br>=> **countunique**(/host/key,**10m:now-1d**) → number of unique values between 24 hours and 10 minutes and 24 hours ago from [now](/manual/config/triggers#evaluation_period)| |**find** (/host/key,<(sec\|\#num)<:time shift>>,<operator>,<pattern>)|<|<|<| |<|Find a value match.|See [common parameters](#common parameters).<br><br>**sec** or **\#num** (optional) - defaults to the latest value if not specified<br><br>**operator** (optional; must be double-quoted)<br><br>Supported `operators`:<br>*eq* - equal (default)<br>*ne* - not equal<br>*gt* - greater<br>*ge* - greater or equal<br>*lt* - less<br>*le* - less or equal<br>*like* - value contains the string given in `pattern` (case-sensitive)<br>*bitand* - bitwise AND<br>*regexp* - case-sensitive match of the regular expression given in `pattern`<br>*iregexp* - case-insensitive match of the regular expression given in `pattern`<br><br>**pattern** - required pattern (string arguments must be double-quoted); [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) regular expression if `operator` is *regexp*, *iregexp*.|Supported value types: float, int, str, text, log<br><br>Returns:<br>1 - found<br>0 - otherwise<br><br>If more than one value is processed, '1' is returned if there is at least one matching value.<br><br>With *regexp* or *iregexp* as the third parameter, the fourth `pattern` parameter can be an ordinary or [global](/manual/regular_expressions#global_regular_expressions) (starting with '@') regular expression. In case of global regular expressions case sensitivity is inherited from global regular expression settings.<br><br>Example:<br>=> **find**(/host/key,**10m**,"like","error") → find a value that contains 'error' within the last 10 minutes until [now](/manual/config/triggers#evaluation_period)| |**first** (/host/key,sec<:time shift>)|<|<|<| |<|The first (the oldest) value within the defined evaluation period.|See [common parameters](#common parameters).|Supported value types: float, int, str, text, log<br><br>Example:<br>=> **first**(/host/key,**1h**) → retrieve the oldest value within the last hour until [now](/manual/config/triggers#evaluation_period)<br><br>See also last().| |**fuzzytime** (/host/key,sec)|<|<|<| |<|Checking how much the passive agent time differs from the Zabbix server/proxy time.|See [common parameters](#common parameters).|Supported value types: float, int<br><br>Returns:<br>1 - difference between the passive item value (as timestamp) and Zabbix server/proxy timestamp is less than or equal to T seconds<br>0 - otherwise<br><br>Usually used with the 'system.localtime' item to check that local time is in sync with the local time of Zabbix server. *Note* that 'system.localtime' must be configured as a [passive check](/manual/appendix/items/activepassive#passive_checks).<br>Can be used also with vfs.file.time\[/path/file,modify\] key to check that file didn't get updates for long time.<br><br>Example:<br>=> **fuzzytime**(/host/key,**60s**)=0 → detect a problem if the time difference is over 60 seconds<br><br>This function is not recommended for use in complex trigger expressions (with multiple items involved), because it may cause unexpected results (time difference will be measured with the most recent metric), e.g. in `fuzzytime(/Host/system.localtime,60s)=0 or last(/Host/trap)<>0`| |**last** (/host/key,<\#num<:time shift>>)|<|<|<| |<|The most recent value.|See [common parameters](#common parameters).<br><br>**\#num** (optional) - the Nth most recent value|Supported value types: float, int, str, text, log<br><br>Take note that a hash-tagged time period (\#N) works differently here than with many other functions.<br>For example:<br>last() is always equal to last(\#1)<br>last(\#3) - third most recent value (*not* three latest values)<br><br>Zabbix does not guarantee the exact order of values if more than two values exist within one second in history.<br><br>Example:<br>=> **last**(/host/key) → retrieve the last value<br>=> **last**(/host/key,**\#2**) → retrieve the previous value<br>=> **last**(/host/key,**\#1**) <> **last**(/host/key,**\#2**) → the last and previous values differ<br><br>See also first().| |**logeventid** (/host/key,<\#num<:time shift>>,<pattern>)|<|<|<| |<|Checking if event ID of the last log entry matches a regular expression.|See [common parameters](#common parameters).<br><br>**\#num** (optional) - the Nth most recent value<br><br>**pattern** (optional) - regular expression describing the required pattern, [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) style (string arguments must be double-quoted).|Supported value types: log<br><br>Returns:<br>0 - does not match<br>1 - matches| |**logseverity** (/host/key,<\#num<:time shift>>)|<|<|<| |<|Log severity of the last log entry.|See [common parameters](#common parameters).<br><br>**\#num** (optional) - the Nth most recent value|Supported value types: log<br><br>Returns:<br>0 - default severity<br>N - severity (integer, useful for Windows event logs: 1 - Information, 2 - Warning, 4 - Error, 7 - Failure Audit, 8 - Success Audit, 9 - Critical, 10 - Verbose).<br>Zabbix takes log severity from **Information** field of Windows event log.| |**logsource** (/host/key,<\#num<:time shift>>,<pattern>)|<|<|<| |<|Checking if log source of the last log entry matches a regular expression.|See [common parameters](#common parameters).<br><br>**\#num** (optional) - the Nth most recent value<br><br>**pattern** (optional) - regular expression describing the required pattern, [Perl Compatible Regular Expression](https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions) (PCRE) style (string arguments must be double-quoted).|Supported value types: log<br><br>Returns:<br>0 - does not match<br>1 - matches<br><br>Normally used for Windows event logs. For example, logsource("VMware Server").| |**monodec** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|Check if there has been a monotonous decrease in values.|See [common parameters](#common parameters).<br><br>**mode** (must be double-quoted) - *weak* (every value is smaller or the same as the previous one; default) or *strict* (every value has decreased)|Supported value types: int<br><br>Returns 1 if all elements in the time period continuously decrease, 0 otherwise.<br><br>Example:<br>=> **monodec**(/Host1/system.swap.size\[all,free\],**60s**) + **monodec**(/Host2/system.swap.size\[all,free\],**60s**) + **monodec**(/Host3/system.swap.size\[all,free\],**60s**) - calculate in how many hosts there has been a decrease in free swap size| |**monoinc** (/host/key,(sec\|\#num)<:time shift>,<mode>)|<|<|<| |<|Check if there has been a monotonous increase in values.|See [common parameters](#common parameters).<br><br>**mode** (must be double-quoted) - *weak* (every value is bigger or the same as the previous one; default) or *strict* (every value has increased)|Supported value types: int<br><br>Returns 1 if all elements in the time period continuously increase, 0 otherwise.<br><br>Example:<br>=> **monoinc**(/Host1/system.localtime,**\#3**,"strict")=0 - check if system local time has been increasing consistently| |**nodata** (/host/key,sec,<mode>)|<|<|<| |<|Checking for no data received.|See [common parameters](#common parameters).<br><br>**sec** period should not be less than 30 seconds because the history syncer process calculates this function only every 30 seconds.<br><br>nodata(/host/key,0) is disallowed.<br><br>**mode** - if set to *strict* (double-quoted), this function will be insensitive to proxy availability (see comments for details).|All value types are supported.<br><br>Returns:<br>1 - if no data received during the defined period of time<br>0 - otherwise<br><br>Since Zabbix 5.0, the 'nodata' triggers monitored by proxy are, by default, sensitive to proxy availability - if proxy becomes unavailable, the 'nodata' triggers will not fire immediately after a restored connection, but will skip the data for the delayed period. Note that for passive proxies suppression is activated if connection is restored more than 15 seconds and no less than 2 & ProxyUpdateFrequency seconds later. For active proxies suppression is activated if connection is restored more than 15 seconds later.<br><br>To turn off sensitiveness to proxy availability, use the third parameter, e.g.: **nodata**(/host/key,**5m**,**"strict"**); in this case the function will work the same as before 5.0.0 and fire as soon as the evaluation period (five minutes) without data has past.<br><br>Note that this function will display an error if, within the period of the 1st parameter:<br>- there's no data and Zabbix server was restarted<br>- there's no data and maintenance was completed<br>- there's no data and the item was added or re-enabled<br>Errors are displayed in the *Info* column in trigger [configuration](/manual/web_interface/frontend_sections/configuration/hosts/triggers).<br><br>This function may not work properly if there are time differences between Zabbix server, proxy and agent. See also: [Time synchronization requirement](/manual/installation/requirements#time_synchronization).| |**percentile** (/host/key,(sec\|\#num)<:time shift>,percentage)|<|<|<| |<|P-th percentile of a period, where P (percentage) is specified by the third parameter.|See [common parameters](#common parameters).<br><br>**percentage** - a floating-point number between 0 and 100 (inclusive) with up to 4 digits after the decimal point|Supported value types: float, int| |**rate** (/host/key,sec<:time shift>)|<|<|<| |<|Per-second average rate of the increase in a monotonically increasing counter within the defined time period.|See [common parameters](#common parameters).|Supported value types: float, int<br><br>Functionally corresponds to '[rate](https://prometheus.io/docs/prometheus/latest/querying/functions/#rate)' of PromQL.<br><br>Example:<br>=> **rate**(/host/key,**30s**) → If the monotonic increase over 30 seconds is 20, this function will return 0.67.| |**trendavg** (/host/key,time period:time shift)|<|<|<| |<|Average of trend values within the defined time period.|**time period** - the time period (minimum '1h'), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week), M (month) or y (year).<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - the time period offset (see examples)|Examples:<br>=> **trendavg**(/host/key,**1h:now/h**) → average for the previous hour (e.g. 12:00-13:00)<br>=> **trendavg**(/host/key,**1h:now/h-1h**) → average for two hours ago (11:00-12:00)<br>=> **trendavg**(/host/key,**1h:now/h-2h**) → average for three hours ago (10:00-11:00)<br>=> **trendavg**(/host/key,**1M:now/M-1y**) → average for the previous month a year ago| |**trendcount** (/host/key,time period:time shift)|<|<|<| |<|Number of successfully retrieved trend values within the defined time period.|**time period** - the time period (minimum '1h'), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week), M (month) or y (year).<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - the time period offset (see examples)|Examples:<br>=> **trendcount**(/host/key,**1h:now/h**) → count for the previous hour (e.g. 12:00-13:00)<br>=> **trendcount**(/host/key,**1h:now/h-1h**) → count for two hours ago (11:00-12:00)<br>=> **trendcount**(/host/key,**1h:now/h-2h**) → count for three hours ago (10:00-11:00)<br>=> **trendcount**(/host/key,**1M:now/M-1y**) → count for the previous month a year ago| |**trendmax** (/host/key,time period:time shift)|<|<|<| |<|The maximum in trend values within the defined time period.|**time period** - the time period (minimum '1h'), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week), M (month) or y (year).<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - the time period offset (see examples)|Examples:<br>=> **trendmax**(/host/key,**1h:now/h**) → maximum for the previous hour (e.g. 12:00-13:00)<br>=> **trendmax**(/host/key,**1h:now/h**) - **trendmin**(/host/key,**1h:now/h**) → calculate the difference between the maximum and minimum values (trend delta) for the previous hour (12:00-13:00)<br>=> **trendmax**(/host/key,**1h:now/h-1h**) → maximum for two hours ago (11:00-12:00)<br>=> **trendmax**(/host/key,**1h:now/h-2h**) → maximum for three hours ago (10:00-11:00)<br>=> **trendmax**(/host/key,**1M:now/M-1y**) → maximum for the previous month a year ago| |**trendmin** (/host/key,time period:time shift)|<|<|<| |<|The minimum in trend values within the defined time period.|**time period** - the time period (minimum '1h'), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week), M (month) or y (year).<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - the time period offset (see examples)|Examples:<br>=> **trendmin**(/host/key,**1h:now/h**) → minimum for the previous hour (e.g. 12:00-13:00)<br>=> **trendmax**(/host/key,**1h:now/h**) - **trendmin**(/host/key,**1h:now/h**) → calculate the difference between the maximum and minimum values (trend delta) for the previous hour (12:00-13:00)<br>=> **trendmin**(/host/key,**1h:now/h-1h**) → minimum for two hours ago (11:00-12:00)<br>=> **trendmin**(/host/key,**1h:now/h-2h**) → minimum for three hours ago (10:00-11:00)<br>=> **trendmin**(/host/key,**1M:now/M-1y**) → minimum for the previous month a year ago| |**trendsum** (/host/key,time period:time shift)|<|<|<| |<|Sum of trend values within the defined time period.|**time period** - the time period (minimum '1h'), defined as <N><time unit> where<br>`N` - number of time units<br>`time unit` - h (hour), d (day), w (week), M (month) or y (year).<br><br>[Time shift](/manual/config/triggers/expression#function-specific_parameters) - the time period offset (see examples)|Examples:<br>=> **trendsum**(/host/key,**1h:now/h**) → sum for the previous hour (e.g. 12:00-13:00)<br>=> **trendsum**(/host/key,**1h:now/h-1h**) → sum for two hours ago (11:00-12:00)<br>=> **trendsum**(/host/key,**1h:now/h-2h**) → sum for three hours ago (10:00-11:00)<br>=> **trendsum**(/host/key,**1M:now/M-1y**) → sum for the previous month a year ago|  

en-us	# history.get
zh-cn	 # 查询历史数据

en-us	# > History object  The following objects are directly related to the `history` API.  ::: noteclassic History objects differ depending on the item's type of information. They are created by the Zabbix server and cannot be modified via the API. :::
zh-cn	 # > 历史数据对象  下列对象与 `history` API直接相关。  ::: noteclassic 历史数据对象会因为监控项的数据类型而有所不同.它们都是Zabbix Server创建的，不能通过API进行修改。 :::

en-us	#### History  Retrieve historical values gathered by Zabbix monitoring processes for presentation or further processing.  [History API](/manual/api/reference/history)
zh-cn	#### 历史记录  检索 Zabbix 监控进程收集的历史值，以便进行演示或进一步处理。  [History API](/manual/api/reference/history)

en-us	# History  This class is designed to work with history data.  Object references:\  -   [History](/manual/api/reference/history/object#history)  Available methods:\  -   [history.get](/manual/api/reference/history/get) - retrieving     history data.
zh-cn	 # 历史数据  该类旨在处理历史数据。  对象引用:\  -   [History](/manual/api/reference/history/object#history)  可用的方法:\  -   [history.get](/manual/api/reference/history/get) 检索历史数据

en-us	 ### HMAC function for JavaScript  A new function has been added to the JavaScript engine allowing to return HMAC hash:  -   `hmac('<hash type>',key,string)`  This is useful for cases when hash-based message authentication code (HMAC) is required for signing requests. MD5 and SHA256 hash types are supported, e. g.:     -   `hmac('md5',key,string)`    -   `hmac('sha256',key,string)`
zh-cn	### JavaScript 的 HMAC 函数  JavaScript 引擎中添加了一个新函数，允许返回 HMAC 哈希：  - · `hmac('<hash type>',key,string)`  这对于需要基于散列的消息身份验证代码 (HMAC) 来签署请求的情况很有用。 支持 MD5 和 SHA256 哈希类型，例如：    · - · `hmac('md5',key,string)`   · - · `hmac('sha256',key,string)`

en-us	#### Host access from several user groups  A user may belong to any number of user groups. These groups may have different access permissions to hosts.  Therefore, it is important to know what hosts an unprivileged user will be able to access as a result. For example, let us consider how access to host **X** (in Hostgroup 1) will be affected in various situations for a user who is in user groups A and B.  -   If Group A has only *Read* access to Hostgroup 1, but Group B     *Read-write* access to Hostgroup 1, the user will get **Read-write**     access to 'X'.  ::: noteimportant “Read-write” permissions have precedence over “Read” permissions starting with Zabbix 2.2. :::  -   In the same scenario as above, if 'X' is simultaneously also in     Hostgroup 2 that is **denied** to Group A or B, access to 'X' will     be **unavailable**, despite a *Read-write* access to Hostgroup 1. -   If Group A has no permissions defined and Group B has a *Read-write*     access to Hostgroup 1, the user will get **Read-write** access to     'X'. -   If Group A has *Deny* access to Hostgroup 1 and Group B has a     *Read-write* access to Hostgroup 1, the user will get access to 'X'     **denied**.
zh-cn	#### 多个用户组的主机访问  一个用户可以属于任意数量的用户组。这些组可能对主机具有不同的访问权限。  因此，了解非特权用户将能够访问哪些主机非常重要。例如，让我们考虑在用户组 A 和 B 中的用户在各种情况下对主机 **X**（在主机组 1 中）的访问将如何受到影响。  - 如果 A 组只有对主机组 1 的 *Read* 访问权限，但 B 组对主机组 1 的 *Read-write* 访问权限，则用户将获得对“X”的**Read-write** 访问权限。  ::: noteimportant 从 Zabbix 2.2 开始，“读写”权限优先于“读取”权限。 :::  - 在与上述相同的情况下，如果“X”同时也在被**拒绝**组 A 或 B 的主机组 2 中，则对“X”的访问将**不可用**，尽管 *读写* 访问主机组 1。 - 如果 A 组没有定义权限，而 B 组对主机组 1 具有 *读写*访问权限，则用户将获得对“X”的**读写**访问权限。 - 如果 A 组对主机组 1 具有 *Deny* 访问权限，而 B 组对主机组 1 具有 *Read-write* 访问权限，则用户将获得对 'X' **denied** 的访问权限。

en-us	##### Host configuration  A host must be configured to process IPMI checks. An IPMI interface must be added, with the respective IP and port numbers, and IPMI authentication parameters must be defined.  See the [configuration of hosts](/manual/config/hosts/host) for more details.
zh-cn	##### 主机配置  主机必须配置为处理IPMI检查。必须添加IPMI接口，必须定义相应的IP和端口号，并且必须定义IPMI认证参数。  更多细节请查看 [主机配置](/manual/config/hosts/host) 。

en-us	#### Host configuration  To use VMware simple checks the host must have the following user macros defined:  -   **{$VMWARE.URL}** - VMware service (vCenter or ESX hypervisor) SDK     URL (<https://servername/sdk>) -   **{$VMWARE.USERNAME}** - VMware service user name -   **{$VMWARE.PASSWORD}** - VMware service {$VMWARE.USERNAME} user     password
zh-cn	#### 主机配置  要使用 VMware 简单检查，主机必须定义以下用户宏：  -   **{$VMWARE.URL}** - VMware 服务 (vCenter 或 ESX hypervisor) SDK -   **{$VMWARE.USERNAME}** - VMware 服务用户名 -   **{$VMWARE.PASSWORD}** - VMware 服务 {$VMWARE.USERNAME} 用户密码

en-us	##### Host configuration  You can specify that an individual host should be monitored by a proxy in the [host configuration](/manual/config/hosts/host) form, using the *Monitored by proxy* field.  ![](../../../assets/en/manual/proxies/proxy_set.png)  Host [mass update](/manual/config/hosts/hostupdate) is another way of specifying that hosts should be monitored by a proxy.
zh-cn	##### 主机配置  你可以在[主机配置](/manual/config/hosts/host)表单中指定一个单独的主机应该被一个proxy监控，使用*Monitored by proxy*字段。  ![](../../../assets/en/manual/proxies/proxy_set.png)  主机 [批量更新](/manual/config/hosts/hostupdate)是指定主机应该由proxy监视的另一种方式。

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

en-us	##### Host creation  A host is added if the *Add host* operation is selected. A host is also added, even if the *Add host* operation is missing, if you select operations resulting in actions on a host. Such operations are:  -   enable host -   disable host -   add host to a host group -   link template to a host  Created hosts are added to the *Discovered hosts* group (by default, configurable in *Administration* → *General* → *[Other](/manual/web_interface/frontend_sections/administration/general#other_parameters)*). If you wish hosts to be added to another group, add a *Remove from host groups* operation (specifying "Discovered hosts") and also add an *Add to host groups* operation (specifying another host group), because a host must belong to a host group.
zh-cn	##### 创建主机  选择 *添加主机* 操作来创建主机。但无需 *添加主机* 操作一样可以创建主机，只要该操作对主机造成了变更即可。此类操作有：  -   启用主机 -   禁用主机 -   添加主机到组 -   链接模板到主机  新建的主机会添加到 *发现的主机* 组 (默认设置，也可到  *管理* → *通用* → *[其它](/manual/web_interface/frontend_sections/administration/general#other_parameters)*界面自定义)。 如果想更改主机的主机组，可以执行 *从主机组中移除* 的操作(选定 "发现的主机"组) 并执行 *添加到主机组* 的操作(选定另一个主机组)，因为一个主机必须属于某个主机组。

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

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