温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

发布时间:2020-07-26 13:54:04 来源:网络 阅读:393 作者:Marion0728 栏目:系统运维

十、使用Zabbix Agent监控Windows主机:

node-130节点的操作系统为Windows Server 2012 R2

1、node-130节点下载Windows版本的Zabbix Agenthttps://www.zabbix.com/download_agentszabbix_agents-4.0.14-win-amd64.zip

2、解压至C盘,重命名文件夹:C:\zabbix_agents-4.0.14

3、修改zabbix_agentd.conf配置文件:C:\zabbix_agents-4.0.14\conf\zabbix_agentd.conf

修改前

修改后

# LogType=file

LogType=file

LogFile=c:\zabbix_agentd.log

LogFile=C:\zabbix_agents-4.0.14\zabbix_agentd.log

Server=127.0.0.1

Server=192.168.0.120

# ListenPort=10050

ListenPort=10050

# ListenIP=0.0.0.0

ListenIP=0.0.0.0

ServerActive=127.0.0.1

ServerActive=192.168.0.120

Hostname=Windows host

Hostname=node-130

# HostMetadata=

HostMetadata=node-130

特别说明:

VMware虚机测试过程中,不要将参数# ListenIP=0.0.0.0的值修改为ListenIP=192.168.0.130,否则重启Windows Server 2012 R2后,zabbix_agentd.log中会提示“listener failed: bind() for [[192.168.0.130]:10050] failed: [0x00002741] 在其上下文中,该请求的地址无效”,导致Zabbix Agent无法开机自启

4、修node-130节点主机名:

右键“这台电脑”--> 属性 --> 更改设置 --> 更改 --> 输入“计算机名”--> 确定 --> 重启

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

5、防火墙允许10050端口通信:

控制面板 --> 查看方式(小图标)--> Windows防火墙 --> 高级设置 --> 入站规则 --> 新建规则 --> 端口 --> TCP,特定本地端口(10050--> 允许连接 --> 勾选“域”、“专用”和“公用”--> 名称“Zabbix Agent--> 完成

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

6、Zabbix Agent注册为系统服务:

Win + R --> cmd

cd \

"C:\zabbix_agents-4.0.14\bin\zabbix_agentd.exe" --config "C:\zabbix_agents-4.0.14\conf\zabbix_agentd.conf" --install

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

7、node-130节点启动Zabbix Agent

Win + R --> services.msc

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

查看10050端口是否被监听:netstat -an | find "10050"

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

查看日志:C:\zabbix_agents-4.0.14\zabbix_agentd.log

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

8、Zabbix Web添加node-130节点:

Configuration --> Hosts --> Create host --> Add

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

9、node-130节点链接Windows监控模板:

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

勾选所有监控项,点击“Check now”:

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

10、查看最新监控数据:

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

11、node-130节点监控Windows Update服务:

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

CentOS 7.7 yum方式安装配置Zabbix 4.0 LTS详解(八)

说明:

service.info[service,<param>]    Information about a service. Returns integer with param as state, startup; string - with param as displayname, path, user; text - with param as description; Specifically for state: 0 - running, 1 - paused, 2 - start pending, 3 - pause pending, 4 - continue pending, 5 - stop pending, 6 - stopped, 7 - unknown, 255 - no such service; Specifically for startup: 0 - automatic, 1 - automatic delayed, 2 - manual, 3 - disabled, 4 - unknown

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI