[comment]: # translation:outdated

[comment]: # ({ea7b20e9-ea7b20e9})
# 14 插件

[comment]: # ({/ea7b20e9-ea7b20e9})

[comment]: # ({03f9fe6d-84502826})
### 概述

插件为扩展Zabbix监控能力提供了一种选择方案. 插件采用Go编程语言编写, 仅由Zabbix agent 2支持.

插件可作为[loadable
modules](/manual/config/items/loadablemodules)(C语言编写)的替代方案, 以及其他扩展Zabbix功能的方法, 例如[user
parameters](userparameters)(agent指标), [external
checks](/manual/config/items/itemtypes/external)(无agent监控)和`system.run[]` Zabbix [agent
item](/manual/config/items/itemtypes/zabbix_agent).

以下特性为Zabbix agent 2及其插件所特有:

- 支持被动检查和主动检查的定时与灵活间隔
- 考虑调度和任务并发性的任务队列管理
- 插件级超时设置
- 启动时检查Zabbix agent 2与插件的兼容性

自Zabbix 6.0.0起, 插件无需直接集成到agent 2中, 可作为可加载插件添加, 从而简化了用于收集新监控指标的附加插件的创建过程.

本页面列出了Zabbix原生及可加载插件, 并从用户角度描述了插件配置原则.
关于编写自定义插件的说明, 请参阅[Plugin development guidelines](https://www.zabbix.com/documentation/guidelines/en/plugins).
要了解Zabbix agent 2与可加载插件之间的通信流程及指标收集过程的更多信息, 请参见[可加载插件](https://www.zabbix.com/documentation/guidelines/en/plugins/loadable_plugins#可加载插件).

[comment]: # ({/03f9fe6d-84502826})

[comment]: # ({d65a91bb-ff9223df})
### 配置插件

本节提供插件配置的通用原则与最佳实践。

所有插件均通过*Plugins.\**参数进行配置，该参数可以是Zabbix agent 2 [configuration
file](/manual/appendix/config/zabbix_agent2)的组成部分，也可属于插件自身的[configuration file](/manual/appendix/config/zabbix_agent2_plugins)。若插件使用独立的配置file，则应在Zabbix agent 2配置file的Include参数中指定该file路径。

典型插件参数结构如下：

*Plugins.<PluginName>.<Parameter>=<Value>*

此外存在两类特殊参数组：

-   *Plugins.<PluginName>.Default.<Parameter>=<Value>* 用于定义[默认参数值](#default-values)

-   *Plugins.<PluginName>.<SessionName>.<Parameter>=<Value>* 用于通过[命名会话](#named-sessions)为不同监控目标定义独立参数集

所有参数命名需符合以下要求：

-   建议插件名称采用首字母大写；
-   参数名称应大写；
-   禁止使用特殊字符；
-   嵌套层级不受限制；
-   参数数量无限制。

[comment]: # ({/d65a91bb-ff9223df})

[comment]: # ({5c6632ff-bebf9145})
##### 默认值

自Zabbix 6.0.18起，您可以在配置file中为连接相关参数（URI、用户名、密码等）设置默认值，格式如下：

*Plugins.<PluginName>.Default.<Parameter>=<Value>*

例如，*Plugins.Mysql.Default.Username=zabbix*，*Plugins.MongoDB.Default.Uri=tcp://127.0.0.1:27017*等。

如果在监控项键或[命名会话](#named-sessions)参数中未提供此类参数的值，插件将使用默认值。如果默认参数也未定义，则将使用硬编码的默认值。

::: noteclassic
如果监控项键没有任何参数，Zabbix agent 2将尝试使用默认参数部分中定义的值来收集指标。

:::

[comment]: # ({/5c6632ff-bebf9145})

[comment]: # ({db37e407-36aaae86})
##### 命名会话

命名会话表示插件参数的附加层级，
可用于为每个被监控实例指定独立的认证参数集。每个命名会话参数
应具有以下结构：

*Plugins.<插件名称>.Sessions.<会话名称>.<参数>=<值>*

会话名称可作为connString 监控项键参数使用，而无需
单独指定URI、用户名和/或密码。

在监控项键中，
第一个参数可以是connString或URI。如果第一个
键参数不匹配任何会话名称，它将被视为
URI。请注意，不支持将凭据嵌入URI中，应改用命名会话参数。

可用的[named session parameters](/manual/appendix/config/zabbix_agent2_plugins)列表取决于具体插件。

*在Zabbix 6.0.17之前的版本中*，当在键参数中提供connString（会话名称）时，监控项键参数中的用户名和密码必须为空。这些值将从会话参数中获取。如果未为命名会话指定认证参数，则将使用硬编码的默认值。

*自Zabbix 6.0.17起*，可以通过在监控项键参数中指定新值来覆盖会话参数（参见[示例](#example-2)）。

*自Zabbix 6.0.18起*，如果未为命名会话定义参数，Zabbix agent 2将使用[默认插件参数](#default-values)中定义的值。

[comment]: # ({/db37e407-36aaae86})

[comment]: # ({c7af48f2-240862ae})


##### 参数优先级

*自version 6.0.18版本起*，Zabbix agent 2插件按以下顺序搜索连接相关参数值：

![](../../../assets/en/diagrams/agent2_parameters.png)

1. 首先将监控项键参数与会话名称进行比对。若未匹配则视为实际值；此时将跳过步骤3。若匹配成功，则参数值（通常为URI）必须在命名会话中定义。
2. 其他参数将从已定义的监控项键中获取。
3. 若监控项键参数（例如密码）为空，插件将查找对应的命名会话参数。
4. 若会话参数也未指定，将使用对应[默认参数](#default-values)中定义的值。
5. 若上述步骤均失败，插件将使用硬编码的默认值。

[comment]: # ({/c7af48f2-240862ae})

[comment]: # ({8524d036-b9a40708})


##### 示例1

监控两个实例 "MySQL1" 和 "MySQL2".

配置参数:

```bash
Plugins.Mysql.Sessions.MySQL1.Uri=tcp://127.0.0.1:3306
Plugins.Mysql.Sessions.MySQL1.User=mysql1_user
Plugins.Mysql.Sessions.MySQL1.Password=unique_password
Plugins.Mysql.Sessions.MySQL2.Uri=tcp://192.0.2.0:3306
Plugins.Mysql.Sessions.MySQL2.User=mysql2_user
Plugins.Mysql.Sessions.MySQL2.Password=different_password
```
通过此配置，每个会话名称可作为 [item key](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2) 中的 connString 使用，例如 `mysql.ping[MySQL1]` 或 `mysql.ping[MySQL2]`。

[comment]: # ({/8524d036-b9a40708})

[comment]: # ({d0314b27-fc81ee54})


##### 示例2

在监控项键中提供部分参数（自Zabbix 6.0.17起支持）

配置参数：

```bash
Plugins.PostgreSQL.Sessions.Session1.Uri=tcp://192.0.2.234:5432
Plugins.PostgreSQL.Sessions.Session1.User=old_username
Plugins.PostgreSQL.Sessions.Session1.Password=session_password
```
[Item key](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2): `pgsql.ping[session1,new_username,,postgres]`

此配置的结果是，agent将使用以下参数连接到PostgreSQL：

- 会话参数中的URI：*192.0.2.234:5432*
- 监控项键中的用户名：*new_username*
- 会话参数中的密码（因为在监控项键中省略）：*session_password*
- 监控项键中的数据库名：*postgres*

[comment]: # ({/d0314b27-fc81ee54})

[comment]: # ({55fd6560-f6b6009f})


##### 示例3

使用默认配置参数收集指标。

配置参数：

```bash
Plugins.PostgreSQL.Default.Uri=tcp://192.0.2.234:5432
Plugins.PostgreSQL.Default.User=zabbix
Plugins.PostgreSQL.Default.Password=password
```
[Item key](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2): `pgsql.ping[,,,postgres]`

此配置的结果是，agent将使用以下参数连接到PostgreSQL：

- 默认URI: *192.0.2.234:5432*
- 默认用户名: *zabbix*
- 默认密码: *password*
- 来自监控项键的数据库名称: *postgres*

[comment]: # ({/55fd6560-f6b6009f})

[comment]: # ({8385f300-8385f300})
##### 连接

部分插件支持同时从多个实例采集指标
可监控本地及远程实例 支持TCP和Unix套接字连接

建议配置插件保持与实例的连接为开启状态
其优势在于减少网络拥塞 延迟以及因连接数减少带来的CPU和memory资源消耗
客户端库会处理此机制

::: notetip
 未使用连接应保持开启的时长可通过
*Plugins.<PluginName>.KeepAlive*参数配置\
例如: *Plugins.Memcached.KeepAlive* 

:::

[comment]: # ({/8385f300-8385f300})

[comment]: # ({ddd702ab-4c4f3ca2})
### 插件

Zabbix agent 2支持的所有指标均由插件收集。

[comment]: # ({/ddd702ab-4c4f3ca2})

[comment]: # ({d8bfe072-db8edfbf})


#### 内置

以下插件为Zabbix agent 2提供开箱即用的支持。点击插件名称可跳转至插件仓库获取更多信息。

| 插件名称 | 描述 | [Supported item keys](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2) | 备注 |
|--|--|--|----|
| Agent | 被使用的Zabbix agent指标。 | agent.hostname, agent.ping, agent.version | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [Ceph](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/ceph/README.md?at=refs%2Fheads%2Frelease%2F6.0) | Ceph监控。 | ceph.df.details, ceph.osd.stats, ceph.osd.discovery, ceph.osd.dump,<br>ceph.ping, ceph.pool.discovery, ceph.status |          |
| [CPU](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/system/cpu?at=refs%2Fheads%2Frelease%2F6.0) | 系统CPU监控（CPU数量/核心数、发现的CPU、利用率百分比）。 | system.cpu.discovery, system.cpu.num, system.cpu.util | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [Docker](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/docker/README.md?at=refs%2Fheads%2Frelease%2F6.0) | Docker容器监控。 | docker.container\_info, docker.container\_stats, docker.containers, docker.containers.discovery,<br>docker.data\_usage, docker.images, docker.images.discovery, docker.info, docker.ping | 另见：<br>[Configuration parameters](/manual/appendix/config/zabbix_agent2_plugins/d_plugin) |
| File | 文件指标收集。 | vfs.file.cksum, vfs.file.contents, vfs.file.exists, vfs.file.md5sum,<br>vfs.file.regexp, vfs.file.regmatch, vfs.file.size, vfs.file.time | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [Kernel](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/kernel?at=refs%2Fheads%2Frelease%2F6.0) | 内核监控。 | kernel.maxfiles, kernel.maxproc                                                | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [Log](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/log?at=refs%2Fheads%2Frelease%2F6.0) | 日志file监控。 | log, log.count, logrt, logrt.count                                             | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。<br><br>另见：<br>插件配置参数 ([Unix](/manual/appendix/config/zabbix_agent2)/[Windows](/manual/appendix/config/zabbix_agent2_win)) |
| [Memcached](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/memcached/README.md?at=refs%2Fheads%2Frelease%2F6.0) | Memcached服务器监控。 | memcached.ping, memcached.stats                                                |          |
| [Modbus](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/modbus/README.md?at=refs%2Fheads%2Frelease%2F6.0) | 读取Modbus数据。 | modbus.get                                                         | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [MQTT](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/mqtt/README.md?at=refs%2Fheads%2Frelease%2F6.0) | 接收MQTT主题的发布值。 | mqtt.get                                                           | 要配置与MQTT代理的加密连接，请在agent配置file中指定TLS参数作为[命名会话](#named_sessions)或[默认](#default-values)参数。目前，TLS参数不能作为监控项键参数传递。 |
| [MySQL](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/mysql/README.md?at=refs%2Fheads%2Frelease%2F6.0) | MySQL及其分支的监控。 | mysql.custom.query, mysql.db.discovery, mysql.db.size, mysql.get\_status\_variables,<br>mysql.ping, mysql.replication.discovery, mysql.replication.get\_slave\_status, mysql.version | 要配置与数据库的加密连接，请在agent配置file中指定TLS参数作为[命名会话](#named_sessions)或[默认](#default-values)参数。目前，TLS参数不能作为监控项键参数传递。<br><br>`mysql.custom.query` 监控项键自Zabbix 6.0.21起支持。 |
| [NetIf](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/net/netif?at=refs%2Fheads%2Frelease%2F6.0) | 网络接口监控。 | net.if.collisions, net.if.discovery, net.if.in, net.if.out, net.if.total       | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [Oracle](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/oracle/README.md?at=refs%2Fheads%2Frelease%2F6.0) | Oracle数据库监控。 | oracle.diskgroups.stats, oracle.diskgroups.discovery, oracle.archive.info, oracle.archive.discovery,<br>oracle.cdb.info, oracle.custom.query, oracle.datafiles.stats, oracle.db.discovery,<br>oracle.fra.stats, oracle.instance.info, oracle.pdb.info, oracle.pdb.discovery,<br>oracle.pga.stats, oracle.ping, oracle.proc.stats, oracle.redolog.info,<br>oracle.sga.stats, oracle.sessions.stats, oracle.sys.metrics, oracle.sys.params,<br>oracle.ts.stats, oracle.ts.discovery, oracle.user.info, oracle.version | 使用插件前请安装[Oracle Instant Client](https://www.oracle.com/database/technologies/instant-client/downloads.html)。 |
| [Proc](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/proc?at=refs%2Fheads%2Frelease%2F6.0) | 进程CPU利用率百分比。 | proc.cpu.util                                                      | 支持的键值与Zabbix agent [key](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [Redis](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/redis/README.md?at=refs%2Fheads%2Frelease%2F6.0) | Redis服务器监控。 | redis.config, redis.info, redis.ping, redis.slowlog.count                      |          |
| [Smart](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/smart?at=refs%2Fheads%2Frelease%2F6.0) | S.M.A.R.T.监控。 | smart.attribute.discovery, smart.disk.discovery, smart.disk.get    | 最低要求的smartctl version为7.1。<br>执行Zabbix agent 2的用户需要sudo/root权限访问smartctl。插件仅使用以下命令：<br>``/usr/sbin/smartctl -a *``<br>``/usr/sbin/smartctl --scan *``<br>``/usr/sbin/smartctl -j -V``<br><br>支持的[keys](/manual/config/items/itemtypes/zabbix_agent/zabbix_agent2)仅在Linux/Windows上可与Zabbix agent 2一起使用，作为被动或主动检查。<br>另见：<br>[Configuration parameters](/manual/appendix/config/zabbix_agent2_plugins/smart_plugin) |
| [Swap](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/system/swap?at=refs%2Fheads%2Frelease%2F6.0) | 交换空间大小（字节/百分比）。 | system.swap.size                                                               | 支持的键值与Zabbix agent [key](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| SystemRun | 运行指定命令。 | system.run                                                         | 支持的键值与Zabbix agent [key](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。<br><br>另见：<br>插件配置参数 ([Unix](/manual/appendix/config/zabbix_agent2)/[Windows](/manual/appendix/config/zabbix_agent2_win)) |
| Systemd | systemd服务监控。 | systemd.unit.discovery, systemd.unit.get, systemd.unit.info        |          |
| [TCP](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/net/tcp?at=refs%2Fheads%2Frelease%2F6.0) | TCP连接可用性检查。 | net.tcp.port                                                       | 支持的键值与Zabbix agent [key](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [UDP](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/net/udp?at=refs%2Fheads%2Frelease%2F6.0) | UDP服务可用性和性能监控。 | net.udp.service, net.udp.service.perf                  | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [Uname](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/system/uname?at=refs%2Fheads%2Frelease%2F6.0) | 系统信息检索。 | system.hostname, system.sw.arch, system.uname                                  | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [Uptime](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/system/uptime?at=refs%2Fheads%2Frelease%2F6.0) | 系统运行时间指标收集。 | system.uptime                                                                  | 支持的键值与Zabbix agent [key](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [VFSDev](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/vfs/dev?at=refs%2Fheads%2Frelease%2F6.0) | VFS指标收集。 | vfs.dev.discovery, vfs.dev.read, vfs.dev.write                                 | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [WebCertificate](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/web/certificate?at=refs%2Fheads%2Frelease%2F6.0) | TLS/SSL网站证书监控。 | web.certificate.get                                                |          |
| [WebPage](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/web/page?at=refs%2Fheads%2Frelease%2F6.0) | 网页监控。 | web.page.get, web.page.perf, web.page.regexp                       | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [ZabbixAsync](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/zabbix/async?at=refs%2Fheads%2Frelease%2F6.0) | 异步指标收集。 | net.tcp.listen, net.udp.listen, sensor, system.boottime, system.cpu.intr, system.cpu.load,<br>system.cpu.switches, system.hw.cpu, system.hw.macaddr, system.localtime, system.sw.os,<br>system.swap.in, system.swap.out, vfs.fs.discovery | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [ZabbixStats](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/zabbix/stats?at=refs%2Fheads%2Frelease%2F6.0) | Zabbix server/proxy内部指标或队列中延迟监控项的数量。 | zabbix.stats                                                                   | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |
| [ZabbixSync](https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/go/plugins/zabbix/sync?at=refs%2Fheads%2Frelease%2F6.0) | 同步指标收集。 | net.dns, net.dns.record, net.tcp.service, net.tcp.service.perf, proc.mem,<br>proc.num, system.hw.chassis, system.hw.devices, system.sw.packages,<br>system.users.num, vfs.dir.count, vfs.dir.size, vfs.fs.get, vfs.fs.inode,<br>vfs.fs.size, vm.memory.size. | 支持的键值与Zabbix agent [keys](/manual/config/items/itemtypes/zabbix_agent)具有相同参数。 |

[comment]: # ({/d8bfe072-db8edfbf})

[comment]: # ({ffa290a9-6c9cc970})


#### 可加载

::: notetip
可加载插件在启动时支持以下参数：<br>
-   *-V --version* - 打印插件version及许可证信息；<br>
-   *-h --help* - 打印帮助信息。

:::

点击插件名称可跳转至包含更多信息的插件仓库。

| 插件名称 | 描述 | 支持的监控项键 | 备注 |
|--|--|--|----|
| [Ember+](https://git.zabbix.com/projects/AP/repos/ember-plus/browse?at=refs%2Fheads%2Frelease%2F6.0) | Ember+监控。 | ember.get | 该插件自Zabbix 6.0.30起支持。目前仅支持从源码构建（适用于Unix和Windows）。<br><br>另见[参数](/manual/appendix/config/zabbix_agent2_plugins/ember_plus_plugin#参数)。 |
| [MongoDB](https://git.zabbix.com/projects/AP/repos/mongodb/browse/README.md?at=refs%2Fheads%2Frelease%2F6.0) | MongoDB服务器及集群监控（基于文档的分布式数据库）。 | mongodb.collection.stats, mongodb.collections.discovery, mongodb.collections.usage, mongodb.connpool.stats,<br>mongodb.db.stats, mongodb.db.discovery, mongodb.jumbo\_chunks.count, mongodb.oplog.stats,<br>mongodb.ping, mongodb.rs.config, mongodb.rs.status, mongodb.server.status,<br>mongodb.sh.discovery, mongodb.version | 该插件自Zabbix 6.0.6起可加载（之前为内置）。Windows预编译插件二进制文件自[Zabbix 6.0.19](https://cdn.zabbix.com/zabbix/binaries/stable/6.0/6.0.19/)起提供，并兼容之前的6.0版本。<br><br>要配置数据库加密连接，请在agent配置file中以[命名会话](#named_sessions)参数形式指定TLS参数。<br>插件版本1.2.0、6.0.13及更新版本支持^[1](#footnotes)^。<br>目前TLS参数不能作为监控项键参数传递。<br><br>另见[参数](/manual/appendix/config/zabbix_agent2_plugins/mongodb_plugin#参数)。 |
| [MSSQL](https://git.zabbix.com/projects/AP/repos/mssql/browse?at=refs%2Fheads%2Frelease%2F6.0) | MSSQL数据库监控。 | mssql.availability.group.get, mssql.custom.query, mssql.db.get, mssql.job.status.get, mssql.last.backup.get, mssql.local.db.get, mssql.mirroring.get, mssql.nonlocal.db.get, mssql.perfcounter.get, mssql.ping, mssql.quorum.get, mssql.quorum.member.get, mssql.replica.get, mssql.version | 该插件自Zabbix 6.0.27起支持。Windows预编译插件二进制文件自[Zabbix 6.0.28](https://cdn.zabbix.com/zabbix/binaries/stable/6.4/6.4.13/)起提供，并兼容6.0.27 version。<br><br>要配置数据库加密连接，请在agent配置file中以[命名会话](#named_sessions)或[默认值](#default-values)参数形式指定TLS参数。目前TLS参数不能作为监控项键参数传递。<br><br>另见[参数](/manual/appendix/config/zabbix_agent2_plugins/mssql_plugin#参数)。 |
| [PostgreSQL](https://git.zabbix.com/projects/AP/repos/postgresql/browse/README.md?at=refs%2Fheads%2Frelease%2F6.0) | PostgreSQL及其分支监控。 | pgsql.autovacuum.count, pgsql.archive, pgsql.bgwriter, pgsql.cache.hit, pgsql.connections,<br> pgsql.custom.query, pgsql.dbstat, pgsql.dbstat.sum, pgsql.db.age, pgsql.db.bloating\_tables, <br> pgsql.db.discovery, pgsql.db.size, pgsql.locks, pgsql.oldest.xid, pgsql.ping, pgsql.queries, <br> pgsql.replication.count, pgsql.replication.process, pgsql.replication.process.discovery, pgsql.replication.recovery\_role, pgsql.replication.status, <br> pgsql.replication\_lag.b, pgsql.replication\_lag.sec, pgsql.uptime, pgsql.version, pgsql.wal.stat | 该插件自Zabbix 6.0.10起可加载（之前为内置）。Windows预编译插件二进制文件自[Zabbix 6.0.19](https://cdn.zabbix.com/zabbix/binaries/stable/6.0/6.0.19/)起提供，并兼容之前的6.0版本。<br><br>要配置数据库加密连接，请在agent配置file中以[命名会话](#named_sessions)或[默认值](#default-values)参数形式指定TLS参数。<br>目前TLS参数不能作为监控项键参数传递。<br><br>另见[参数](/manual/appendix/config/zabbix_agent2_plugins/postgresql_plugin#参数)。 |

另见：[Building loadable plugins](/manual/config/items/plugins/build)。

[comment]: # ({/ffa290a9-6c9cc970})

[comment]: # ({5b823834-0a3a4a6b})


##### 脚注

^**1**^ - 自Zabbix 6.0.13起，可加载插件开始采用与Zabbix自身相同的版本控制系统。
因此，MongoDB插件version的版本号从1.2.0变更为6.0.13，PostgreSQL插件version
的版本号从1.2.1变更为6.0.13。

[comment]: # ({/5b823834-0a3a4a6b})
