可以从Windows MSI安装包(32位或64位)安装Zabbix agent。download.
32位包不能安装在64位Windows中。
所有软件包都支持TLS,然而,配置TLS是可选的。
支持UI和命令行的安装。
请双击已下载的MSI文件进行安装。


接受许可证已进入下一步。

具体参数。
| 参数 | 描述 | 
|---|---|
| 主机名 | 指定主机名。 | 
| Zabbix server IP/DNS | 指定Zabbix server的IP/DNS。 | 
| Agent监听端口 | 指定agent 监听端口 (默认为10050)。 | 
| 主动检查Server或Proxy | 为激活agent主动检查指定Zabbix server/proxy的IP/DNS。 | 
| 启用PSK | 选中校验框,通过预共享密钥激活TLS支持。 | 
| 将agent位置添加到PATH | 将agent位置添加至PATH变量。 | 

输入预共享密钥的标识和对应值。 此步骤仅在上一步中选中 Enable PSK 之后才有用。

选择要安装的Zabbix组件- Zabbix agent daemon, Zabbix sender, Zabbix get.

Zabbix组件和配置文件将安装在程序文件 Zabbix Agent 文件夹中。 zabbix_agentd.exe 在Windows服务中将被设置为自动启动。

以下参数由创建的 MSI 支持。
| 参数 | 描述 | 
|---|---|
| ADDDEFAULT | 要安装的程序的逗号分隔列表。 可能的值: AgentProgram,GetProgram,SenderProgram,ALL。示例: ADDDEFAULT=AgentProgram,GetProgram | 
| ADDLOCAL | 要安装的程序的逗号分隔列表。 可能的值: AgentProgram,GetProgram,SenderProgram,ALL。示例: ADDLOCAL=AgentProgram,SenderProgram | 
| ALLOWDENYKEY | 通过 ;分隔的 "AllowKey" 和 "DenyKey" 参数 序列使用 \\;转义分隔符。示例: ALLOWDENYKEY="AllowKey=system.run[type c:\windows\system32\drivers\etc\hosts];DenyKey=system.run[*]" | 
| CONF | 自定义配置文件的完整路径名。 示例: CONF=c:\full\path\to\user.conf | 
| ENABLEPATH | 将agent 位置添加到 PATH 变量。 | 
| ENABLEPERSISTENTBUFFER | 仅限 Zabbix agent 2。启用对主动项目使用本地持久存储。 | 
| HOSTINTERFACE | 定义主机接口的可选参数。 | 
| HOSTMETADATA | 定义主机元数据的可选参数。 | 
| HOSTMETADATAITEM | 定义用于获取主机元数据的 Zabbix agent 监控项的可选参数。 | 
| HOSTNAME | 定义主机名的可选参数。 | 
| INCLUDE | 通过 ;分隔的 包含 序列 | 
| INSTALLFOLDER | Zabbix 组件及配置文件将被安装的文件夹的完整路径名。 | 
| LISTENIP | agent 应监听的逗号分隔 IP 地址列表。 | 
| LISTENPORT | agent 将在此端口上监听来自服务器的连接。 | 
| LOGFILE | 日志文件的名称。 | 
| LOGTYPE | 日志输出的类型。 | 
| PERSISTENTBUFFERFILE | 仅限 Zabbix agent 2。Zabbix agent 2 应保留 SQLite 数据库的文件。 | 
| PERSISTENTBUFFERPERIOD | 仅限 Zabbix agent 2。当没有连接到server 或proxy 时,数据应存储的时间周期。 | 
| SERVER | 逗号分隔的 IP 地址列表,可选地使用 CIDR 表示法,或 Zabbix server 和 Zabbix proxy的 DNS 名称。 | 
| SERVERACTIVE | 用于获取主动检查的 Zabbix server/proxy 地址或集群配置。 | 
| SKIP | SKIP=fw- 不要安装防火墙例外规则。 | 
| STARTUPTYPE | Zabbix Windows agent/agent2 服务的启动类型。可能的值: automatic- 在 Windows 启动时自动启动服务;delayed- (默认) 在自动启动服务启动完成后延迟启动服务(适用于 Windows Server 2008/Vista 及更高版本);manual- 手动启动服务(由用户或应用程序);disabled- 禁用服务,使其不能由用户或应用程序启动。示例: STARTUPTYPE=disabled | 
| STATUSPORT | 仅限 Zabbix agent 2。如果设置,agent 将在此端口上监听 HTTP 状态请求(http://localhost:<port>/status)。 | 
| TIMEOUT | 指定通信的超时时间(以秒为单位)。 | 
| TLSACCEPT | 接受哪种传入连接。 | 
| TLSCAFILE | 包含顶层 CA 证书的文件的完整路径名,用于对等证书验证,用于 Zabbix 组件之间的加密通信。 | 
| TLSCERTFILE | 包含agent 证书或证书链的文件的完整路径名,用于 Zabbix 组件之间的加密通信。 | 
| TLSCONNECT | agent 应如何连接到 Zabbix server 或proxy。 | 
| TLSCRLFILE | 包含吊销证书的文件的完整路径名。此参数用于 Zabbix 组件之间的加密通信。 | 
| TLSKEYFILE | 包含agent 私钥的文件的完整路径名,用于 Zabbix 组件之间的加密通信。 | 
| TLSPSKFILE | 包含agent预共享密钥 的文件的完整路径名,用于与 Zabbix 服务器的加密通信。 | 
| TLSPSKIDENTITY | 预共享密钥 身份字符串,用于与 Zabbix 服务器的加密通信。 | 
| TLSPSKVALUE | 预共享密钥 字符串值,用于与 Zabbix 服务器的加密通信。 | 
| TLSSERVERCERTISSUER | 允许的server(proxy)证书颁发者。 | 
| TLSSERVERCERTSUBJECT | 允许的server(proxy)证书主题。 | 
请注意,方括号内的链接是示例链接,实际使用时应替换为正确的文档链接。
要从命令行安装 Zabbix Windows agent,您可以运行以下命令,例如:
SET INSTALLFOLDER=C:\Program Files\Zabbix Agent
       msiexec /l*v log.txt /i zabbix_agent-7.0.0-x86.msi /qn ^
        LOGTYPE=file ^
        LOGFILE="%INSTALLFOLDER%\zabbix_agentd.log" ^
        SERVER=192.168.6.76 ^
        LISTENPORT=12345 ^
        SERVERACTIVE=::1 ^
        HOSTNAME=myHost ^
        TLSCONNECT=psk ^
        TLSACCEPT=psk ^
        TLSPSKIDENTITY=MyPSKID ^
        TLSPSKFILE="%INSTALLFOLDER%\mykey.psk" ^
        TLSCAFILE="c:\temp\f.txt1" ^
        TLSCRLFILE="c:\temp\f.txt2" ^
        TLSSERVERCERTISSUER="My CA" ^
        TLSSERVERCERTSUBJECT="My Cert" ^
        TLSCERTFILE="c:\temp\f.txt5" ^
        TLSKEYFILE="c:\temp\f.txt6" ^
        ENABLEPATH=1 ^
        INSTALLFOLDER="%INSTALLFOLDER%" ^
        SKIP=fw ^
        ALLOWDENYKEY="DenyKey=vfs.file.contents[/etc/passwd]"您也可以运行以下命令,例如:
msiexec /l*v log.txt /i zabbix_agent-7.0.0-x86.msi /qn ^
        SERVER=192.168.6.76 ^
        TLSCONNECT=psk ^
        TLSACCEPT=psk ^
        TLSPSKIDENTITY=MyPSKID ^
        TLSPSKVALUE=1f87b595725ac58dd977beef14b97461a7c1045b9a1c963065002c5473194952如果同时传递了 TLSPSKFILE 和 TLSPSKVALUE,则会将 TLSPSKVALUE 写入 TLSPSKFILE。
Zabbix agent 2 loadable plugins can be installed on Windows using 64-bit MSI installer packages, available for download.
Minimum OS requirements for MSI installation are Windows 10 (64-bit) or Windows Server 2016.
Packages include:
Packages do not include the Ember+ plugin, which is currently only available to be built from source (for both Unix and Windows).
Before installing a plugin, check its README file. It may contain additional requirements and installation instructions specific to the plugin.
Similarly to Zabbix agent/agent2, loadable plugins can be installed using the Setup Wizard or the command line.
1. Double-click the downloaded MSI file to start the installation.
2. Accept the End-User License Agreement.
3. Select the Zabbix agent 2 loadable plugins (MongoDB plugin, PostgreSQL plugin, MSSQL plugin) to be installed.
It is recommended to use the default installation location provided by the installer. Using a custom location without the necessary permissions may compromise the security of the installation.
4. Click Install to begin the installation.
All selected Zabbix agent 2 loadable plugins will be installed in your specified location (default: C:\Program Files\Zabbix Agent 2), with their configuration files installed in the zabbix_agent2.d subfolder.
5. Click the Finish button to exit the Setup Wizard.
Zabbix agent 2 loadable plugins can be installed from the command line by running the MSI installer with msiexec. For example:
Zabbix agent 2 loadable plugin MSI installer packages support the following parameters.
| Parameter | Description | 
|---|---|
| ADDDEFAULT | A list of comma-delimited components to install in their default configuration. For more information, see ADDDEFAULT property. Possible values: MongodbPlugin,PostgresqlPlugin,MssqlPlugin,ALLExample: ADDDEFAULT=MongodbPlugin,PostgresqlPlugin | 
| ADDLOCAL | A list of comma-delimited components to install locally. For more information, see ADDLOCAL property. Possible values: MongodbPlugin,PostgresqlPlugin,MssqlPlugin,ALLExample: ADDLOCAL=MongodbPlugin,MssqlPlugin | 
| INSTALLFOLDER | The full pathname to a folder where Zabbix components will be installed, with their configuration files installed in the zabbix_agent2.dsubfolder.Example: INSTALLFOLDER="C:\Program Files\Zabbix Agent 2" |