首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >Zabbix【部署 04】 Windows系统安装配置agent及agent2

Zabbix【部署 04】 Windows系统安装配置agent及agent2

原创
作者头像
yuanzhengme
发布2025-08-18 22:41:35
发布2025-08-18 22:41:35
2550
举报
文章被收录于专栏:Linux相关Linux相关

1.下载

选择对应的ZABBIX VERSION版本:

在这里插入图片描述
在这里插入图片描述

下载zip文件或查看安装说明:

在这里插入图片描述
在这里插入图片描述

官网 的安装说明:

在这里插入图片描述
在这里插入图片描述

2.agent

2.1 准备

下载对应版本的zip文件并解压,选择一个文件夹放置zabbix_agentd.exe和配置文件zabbix_agentd.conf。例如:

代码语言:bash
复制
# 1.在 e 盘创建 zabbix 文件夹E
E:\zabbix
# 拷贝解压包内 bin\zabbix_agentd.exe 和 conf\zabbix_agentd.conf 文件到 e:\zabbix 
代码语言:bash
复制
# 2.修改 zabbix_agentd.conf 文件 
# 日志文件【默认在C:盘】
LogFile=E:\zabbix\zabbix_agentd.log
# zabbix-server 服务的IP地址【如果Server部署在云服务器则需要配置云服务器的外网IP】
Server=127.0.0.1
ServerActive=127.0.0.1
# making sure to specify a correct "Hostname" parameter
Hostname="Hostname"

Hostname配置参数的影响:

在这里插入图片描述
在这里插入图片描述

页面没有配置相应的Hostname会报错:

代码语言:bash
复制
# 配置
Hostname=Windows host
# 报错
no active checks on server [xxx.xxx.x.xxx:10051]: host [Windows host] not found
# 原因
# Web 上未配置 Name 是 Windows host 的 Hosts

2.2 安装

使用以下命令安装 zabbix agent 作为 Windows 服务。

代码语言:bash
复制
# 安装命令
E:\> E:\zabbix\zabbix_agentd.exe -c E:\zabbix\zabbix_agentd.conf -i

zabbix_agentd [xxxx]: 'Zabbix Agentd' installed successfully

打开任务管理器,启动agent服务。

在这里插入图片描述
在这里插入图片描述

2.3 其他操作

可以在一台主机上运行多个agent实例。单个实例可以使用默认配置文件,也可以使用命令行中指定的配置文件。对于多个实例,每个agent实例必须有自己的配置文件(其中一个实例可以使用默认配置文件)。Zabbix agent 可以使用以下命令行参数:

Parameter

Description

UNIX and Windows agent

-c --config <config-file>

Path to the configuration file. You may use this option to specify a configuration file that is not the default one. On UNIX, default is /usr/local/etc/zabbix_agentd.conf or as set by compile-time variables --sysconfdir or --prefix On Windows, default is c:\zabbix_agentd.conf

-p --print

Print known items and exit. Note: To return user parameter results as well, you must specify the configuration file (if it is not in the default location).

-t --test <item key>

Test specified item and exit. Note: To return user parameter results as well, you must specify the configuration file (if it is not in the default location).

-h --help

Display help information

-V --version

Display version number

UNIX agent only

-R --runtime-control <option>

Perform administrative functions. See runtime control.

Windows agent only

-m --multiple-agents

Use multiple agent instances (with -i,-d,-s,-x functions). To distinguish service names of instances, each service name will include the Hostname value from the specified configuration file.

Windows agent only (functions)

-i --install

Install Zabbix Windows agent as service

-d --uninstall

Uninstall Zabbix Windows agent service

-s --start

Start Zabbix Windows agent service

-x --stop

Stop Zabbix Windows agent service

Specific examples of using command line parameters:

  • printing all built-in agent items with values
  • testing a user parameter with "mysql.ping" key defined in the specified configuration file
  • installing a "Zabbix Agent" service for Windows using the default path to configuration file c:\zabbix_agentd.conf
  • installing a "Zabbix Agent Hostname" service for Windows using the configuration file zabbix_agentd.conf located in the same folder as agent executable and make the service name unique by extending it by Hostname value from the config file

3.agent2

安装方式跟agent一致,但是同样的配置,图表还是有区别的:

在这里插入图片描述
在这里插入图片描述
  • agent主机信息
在这里插入图片描述
在这里插入图片描述
  • agent2的主机信息
在这里插入图片描述
在这里插入图片描述

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1.下载
  • 2.agent
    • 2.1 准备
    • 2.2 安装
    • 2.3 其他操作
  • 3.agent2
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档