?? ? ??
公司主營業(yè)務(wù):網(wǎng)站建設(shè)、成都網(wǎng)站建設(shè)、移動網(wǎng)站開發(fā)等業(yè)務(wù)。幫助企業(yè)客戶真正實現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競爭能力。創(chuàng)新互聯(lián)是一支青春激揚、勤奮敬業(yè)、活力青春激揚、勤奮敬業(yè)、活力澎湃、和諧高效的團隊。公司秉承以“開放、自由、嚴謹、自律”為核心的企業(yè)文化,感謝他們對我們的高要求,感謝他們從不同領(lǐng)域給我們帶來的挑戰(zhàn),讓我們激情的團隊有機會用頭腦與智慧不斷的給客戶帶來驚喜。創(chuàng)新互聯(lián)推出淶源免費做網(wǎng)站回饋大家。
Zabbix 是一個基于 WEB 界面的提供分布式系統(tǒng)監(jiān)視以及網(wǎng)絡(luò)監(jiān)視功能的企業(yè)級的開源解決方案。它能監(jiān)視各種網(wǎng)絡(luò)參數(shù),保證服務(wù)器系統(tǒng)的安全運營;并提供靈活的通知機制以讓系統(tǒng)管理員快速定位/解決存在的各種問題。
?
安裝環(huán)境:CentOS Linux release 7.5? IP:192.168.1.100
#?wget?https://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
#?rpm?–ivh?zabbix-release-4.4-1.el7.noarch.rpm
?
安裝?Zabbix?server并使用?MySQL?數(shù)據(jù)庫:#?yum?-y?install?zabbix-server-mysql? 安裝?Zabbix?前端并使用?MySQL?數(shù)據(jù)庫:#?yum?-y?install?zabbix-web-mysql安裝Zabbix?agent客戶端,本機監(jiān)控:#?yum?-y?install?zabbix-agent
安裝zabbix-get工具
# yum –y install zabbix-get
安裝mariadb數(shù)據(jù)庫#?yum?-y?install?mariadb-server
?
#?systemctl?start?mariadb #?systemctl?enable?mariadb
創(chuàng)建Zabbix的數(shù)據(jù)庫名為zabbix,注意字符集的選擇MariaDB?[(none)]>?CREATE?DATABASE?zabbix?CHARSET?utf8?COLLATE?utf8_bin;創(chuàng)建Zabbix的用戶名為zabbixadmin,密碼為123456MariaDB?[(none)]>?GRANT?ALL?ON?zabbix.*?TO?zabbixadmin@localhost?IDENTIFIED?BY?'123456';
?
查看SQL語句的目錄#rpm?-ql?zabbix-server-mysql ... /usr/share/doc/zabbix-server-mysql-4.4.3/create.sql.gz ...導入SQL語句到剛才創(chuàng)建的zabbix數(shù)據(jù)庫中#zcat?/usr/share/doc/zabbix-server-mysql-4.4.3/create.sql.gz?|?mysql?-uzabbixadmin?-p123456?zabbix
?
#?vim?/etc/zabbix/zabbix_server.conf ... DBHost=localhost DBName=zabbix DBUser=zabbixadmin DBPassword=123456...
?
#?systemctl?start?zabbix-server #?systemctl?enable?zabbix-server
?
修改時區(qū)#?vim?/etc/httpd/conf.d/zabbix.conf php_value?date.timezone?Asia/Shanghai
?
#?systemctl?start?httpd #?systemctl?enable?httpd
?
安裝環(huán)境:CentOS release 6.9 (Final)? IP:192.168.1.200
?
注意:這里客戶端選擇的是CentOS6,需要安裝的是CentOS 6的yum源,如果要安裝其他版本的需要去阿里的mirrors里自行查找
#?wget?--no-check-certificate?https://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/6/x86_64/zabbix-release-4.4-1.el6.noarch.rpm
#?rpm?–ivh?zabbix-release-4.4-1.el6.noarch.rpm
?
#?yum?install?zabbix-agent
?
#?vim?/etc/zabbix/zabbix_agentd.conf ... Server=192.168.1.100????????????????????????????#?Zabbix?Server的ip地址ServerActive=192.168.1.100Hostname=web01 ...
?
#?service?zabbix-agent?start #?chkconfig?--add?zabbix-agent #?chkconfig?zabbix-agent?on
?
官方地址:https://www.zabbix.com/cn/download_agents
?
?
修改如下字段:
LogFile=c:\zabbix\zabbix_agentd.log
Server=192.168.1.100
ServerActive=192.168.1.100
Hostname=windows-web
?
C:Windows\system32>? cd c:\zabbix
c:\zabbix> bin\zabbix_agentd –i –c conf\zabbix_agentd.conf???? #安裝zabbix客戶端
c:\zabbix> bin\zabbix_agentd –s –c conf\zabbix_agentd.conf??? #啟動zabbix服務(wù)
?
http://192.168.1.100/zabbix
?
?
?
?
系統(tǒng)默認的用戶名:Admin
系統(tǒng)默認密碼:zabbix
?
?
?
原亂碼現(xiàn)象
服務(wù)器端安裝字體 #?yum?install?wqy-microhei-fonts?-y 修改字體鏈接,鏈接到新安裝的字體 #?rm?/usr/share/zabbix/assets/fonts/graphfont.ttf? #?ln?-sv?/usr/share/fonts/wqy-microhei/wqy-microhei.ttc?/usr/share/zabbix/assets/fonts/graphfont.ttf
?
修改后刷新頁面即可
?
?
?
除了Zabbix給的模板監(jiān)控項,我們可以自定義監(jiān)控的內(nèi)容
httpd開啟服務(wù)后會打開80端口
#?ss?-tnl State???????Recv-Q?Send-Q?????????????????????????????????????????????Local?Address:Port???????????????????????????????????????????????Peer?Address:Port? LISTEN??????0??????128???????????????????????????????????????????????????????????:::10050????????????????????????????????????????????????????????:::*?????LISTEN??????0??????128????????????????????????????????????????????????????????????*:10050?????????????????????????????????????????????????????????*:*?????LISTEN??????0??????128???????????????????????????????????????????????????????????:::80???????????????????????????????????????????????????????????:::*?????LISTEN??????0??????128???????????????????????????????????????????????????????????:::22???????????????????????????????????????????????????????????:::*?????LISTEN??????0??????128????????????????????????????????????????????????????????????*:22????????????????????????????????????????????????????????????*:*
可以通過命令取到值:ss -tnl | awk '{print $4}' | grep ':80$'
#?ss?-tnl?|?awk?'{print?$4}'?|?grep?–o?'80$'80
如過httpd服務(wù)關(guān)閉后,80端口也會關(guān)閉,此命令取不到值
?
自定義監(jiān)控項的目錄是/etc/zabbix/zabbix_agentd.d,在里面創(chuàng)建以.conf結(jié)尾的文件即可#?vim?/etc/zabbix/zabbix_agentd.d/port80.conf UserParameter=httpd.port80,??ss?-tnl?|?awk?'{print?$4}'?|?grep?–o?'80'
?
重啟服務(wù)
#?service?zabbix-agent?restarthttpd.port80?是給該監(jiān)控項取的名字 ss?-tnl?|?awk?'{print?$4}'?|?grep?–o?'80'?是自定義的監(jiān)控項取值命令
?
?
?
?
網(wǎng)站欄目:Zabbix4.4.4監(jiān)控windows;
標題來源:http://jinyejixie.com/article8/gcejop.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供Google、品牌網(wǎng)站制作、微信公眾號、App開發(fā)、ChatGPT、微信小程序
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)