centos7 mysql读写监控_Centos7 Zabbix监控mysql
Yum -y install zabbix-server-mysql zabbix-web-mysql mariadb-server zabbix-agent
啟動數據庫并設置為開機自啟
systemctl start mariadb
systemctl enable mariadb
修改mysql密碼
mysql_secure_installation
進入mysql
Mysql -p123456
創建數據庫和授權刷新
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by '123456';
解壓包
zcat /usr/share/doc/zabbix-server-mysql-4.0.5/create.sql.gz|mysql -uzabbix -p123456 zabbix
配置zabbix修改時間
vim /etc/httpd/conf.d/zabbix.conf
啟動httpd并設置為開機自啟
systemctl start httpd
systemctl enable httpd
改zabbix-server配置文件添加密碼
vim /etc/zabbix/zabbix_server.conf
啟動zabbix-server并設置為開機自啟
systemctl start zabbix-server
systemctl enable zabbix-server
改zabbix-agent配置文件ip
vim /etc/zabbix/zabbix_agentd.conf
訪問http://192.168.10.157/zabbix進入zabbix頁面
在另外一臺虛擬機安裝zabbix-agent 和mysql
yum -y install zabbix-agent mariadb-server
改zabbix-agent配置文件中的ip(要寫zabbix-server的ip)
vim /etc/zabbix/zabbix_agentd.conf
啟動zabbix-agent并設置為開機自啟
systemctl start zabbix-agent
systemctl enable zabbix-agent
啟動數據庫并設置為開機自啟
systemctl start mariadb
systemctl enable mariadb
訪問zabbix頁面創建主機群組
創建主機
創建監控項
創建觸發器
創建圖形
總結
以上是生活随笔為你收集整理的centos7 mysql读写监控_Centos7 Zabbix监控mysql的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python管理图片_Django 管理
- 下一篇: MySQL数据库https接口_第三章