您好,登錄后才能下訂單哦!
十、使用Zabbix Agent監(jiān)控Windows主機:
node-130節(jié)點的操作系統(tǒng)為Windows Server 2012 R2
1、node-130節(jié)點下載Windows版本的Zabbix Agent:https://www.zabbix.com/download_agents,zabbix_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虛機測試過程中,不要將參數(shù)# 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] 在其上下文中,該請求的地址無效”,導(dǎo)致Zabbix Agent無法開機自啟
4、修改node-130節(jié)點主機名:
右鍵“這臺電腦”--> 屬性 --> 更改設(shè)置 --> 更改 --> 輸入“計算機名”--> 確定 --> 重啟
5、防火墻允許10050端口通信:
控制面板 --> 查看方式(小圖標)--> Windows防火墻 --> 高級設(shè)置 --> 入站規(guī)則 --> 新建規(guī)則 --> 端口 --> TCP,特定本地端口(10050)--> 允許連接 --> 勾選“域”、“專用”和“公用”--> 名稱“Zabbix Agent”--> 完成
6、將Zabbix Agent注冊為系統(tǒng)服務(wù):
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
7、node-130節(jié)點啟動Zabbix Agent:
Win + R --> services.msc
查看10050端口是否被監(jiān)聽:netstat -an | find "10050"
查看日志:C:\zabbix_agents-4.0.14\zabbix_agentd.log
8、Zabbix Web添加node-130節(jié)點:
Configuration --> Hosts --> Create host --> Add
9、node-130節(jié)點鏈接Windows監(jiān)控模板:
勾選所有監(jiān)控項,點擊“Check now”:
10、查看最新監(jiān)控數(shù)據(jù):
11、node-130節(jié)點監(jiān)控Windows Update服務(wù):
說明:
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
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。