zabbix4.0監控部署


zabbix4.0監控部署

1、為什么要使用監控?

  • 1.為什么要使用監控

    1.對系統不間斷實時監控

    2.實時反饋系統當前狀態

    3.保證服務可靠性安全性

    4.保證業務持續穩定運行

2、如何進行監控,比如我們需要監控磁盤的使用率

  • 2.如何進行監控,比如我們需要監控磁盤的使用率

    1.如何查看磁盤使用率df -h

    2.監控磁盤的那些指標block、inode

    3.如何獲取具體的信息df -h|awk '/\/$/{print $(NF-1)}'

    4.獲取的數值到達多少報警 80%

3、zabbix監控與傳統的監控的區別是什么?

  • 3.zabbix如何部署

    1.硬件監控 路由器、交換機、防火牆 (DELL IRDAC ipmi)

    2.系統監控 CPU、內存、磁盤、網絡、進程、TCP

    3.服務監控 nginx、php、tomcat、redis、memcache、mysql

    4.WEB監控 請求時間、響應時間、加載時間、

    5.日志監控 ELk(收集、存儲、分析、展示) 日志易

    6.安全監控 Firewalld、WAF(Nginx+lua)、安全寶、牛盾雲、安全狗

    7.網絡監控 smokeping 多機房

    8.業務監控 活動引入多少流量、產生多少注冊量、帶來多大價值

4、zabbix監控部署過程

系統:centos7.* 主機ip:10.8.3.47 賬號:root 密碼:

2.優化步驟
        #1.配置yum倉庫
rm -f /etc/yum.repos.d/*
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

        #2.安裝基礎軟件包
			yum install net-tools vim tree htop iftop iotop lrzsz sl wget unzip telnet nmap nc psmisc dos2unix bash-completion bash-completion-extras sysstat rsync nfs-utils httpd-tools -y

        #3.關閉防火牆firewalld
			systemctl disable firewalld
			systemctl stop firewalld

        #4.關閉selinux
			sed -i '/^SELINUX=/c SELINUX=disabled' /etc/selinux/config


        #5.調整單個進程最大能打開文件的數量
			echo '* - nofile 65535' >> /etc/security/limits.conf
#修改系統主機名稱
[root@zabbix-server ~]# cat /etc/centos-release
CentOS Linux release 7.6.1804 (Core) 
[root@zabbix-server ~]# uname -r
3.10.0-862.el7.x86_64
[root@monitor01 ~]# hostnamectl set-hostname zabbix-server
[root@monitor01 ~]# bash
[root@zabbix-server ~]# 

yum clean all
yum makecache
1.配置yum倉庫
[root@zabbix-server ~]# rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

2.安裝zabbix相關功能組件
[root@zabbix-server ~]# yum install zabbix-server-mysql zabbix-web-mysql httpd mariadb-server -y

3.創建數據庫
[root@zabbix-server ~]# systemctl start mariadb
[root@zabbix-server ~]# systemctl enable mariadb
[root@zabbix-server ~]# mysql -uroot -e "create database zabbix character set utf8 collate utf8_bin;"
[root@zabbix-server ~]# mysql -uroot -e "grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';"

4.導入數據至數據庫中
[root@zabbix-server ~]# zcat /usr/share/doc/zabbix-server-mysql-4.0.19/create.sql.gz |mysql -uroot zabbix

5.配置zabbix-server指向數據庫
[root@zabbix-server ~]# grep '^D' /etc/zabbix/zabbix_server.conf 
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

6.啟動 Zabbix server 進程
[root@zabbix-server ~]# systemctl enable zabbix-server
[root@zabbix-server ~]# systemctl start zabbix-server

7.配置Zabbix 前端web頁面
[root@zabbix-server ~]# vim /etc/httpd/conf.d/zabbix.conf
	.....
# 修改時間
	php_value date.timezone Asia/Shanghai
	....
[root@zabbix-server ~]# systemctl restart httpd
[root@zabbix-server ~]# systemctl enable httpd


8.通過url訪問zabbix-server


   10.8.3.47/zabbix/
	1.根據提示填寫信息即可
	2.默認的用戶名和密碼是
		username: Admin
		password: zabbix
		
		
#注意:物理機虛擬出來的虛擬機yum源有時候有問題,使用清華源鏡像即可解決問題,如果yum還是報錯,請替換DNS

5、zabbix使用過程

5.1、瀏覽器訪問10.8.3.47/zabbix/出現下圖所示界面表示zabbix4.0安裝成功

5.2直接點擊界面下一步安裝即可-----(除了填寫密碼一個步驟之外其余均下一步)

5.3上一步點擊finish最終安裝成功輸入賬號密碼登錄成功界面如下圖所示

2.默認的用戶名和密碼是
	username: Admin
	password: zabbix

5.4修改zabbix登錄密碼為----xxx

5.5設置為中文----漢化


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM