zabbix监控mysql

Zabbix安装

1、配置YUM源wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

2、wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

3、rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

Yum clean allYum makecache2、安装zabbix、初始化mysql、zabbix数据库yum install zabbix-server-mysql zabbix-web-mysql mariadb-server zabbix-agent -y

systemctl start mariadbsystemctl enable mariadb

mysql_secure_installation

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.4/create.sql.gz|mysql -uzabbix -p123456 zabbix3、配置zabbix

vim /etc/httpd/conf.d/zabbix.confphp_value date.timezone Asia/Shanghai

systemctl start httpdsystemctl enable httpd

vim /etc/zabbix/zabbix_server.conf

DBPassword=123456

systemctl start zabbix-serversystemctl enable zabbix-server

vim /etc/zabbix/zabbix_agentd.conf

Server=192.168.100.110ServerActive=192.168.100.110 #主动模式的server IP地址

systemctl start zabbix-agentsystemctl enable zabbix-agent

Zabbix监控mysql

Zabbix搭建完成后zabbix默认账号是Admin 密码是zabbix


###由于zabbix自带有mysql模块所以在一台机子做即可


点击


勾选mysql

这样mysql模块就添加完成了下边修该一下mysql


重启一下zabbix-agent

Systemctl restart zabbix-agent


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容