Centos7部署:
一,安装zabbix-release包,关闭防火墙;
rpm -ivh zabbix-release-3.4-2.el7.noarch.rpm
systemctl stop firewalld
setenforce 0
二,安装zabbix环境;
yum -y install zabbix-web-mysql zabbix-agent zabbix-server-mysql mariadb-server
三,启动mysql,进入msyql,创建zabbix库,和用户以及密码;
systemctl restart mariadb
systemctl enable mariadb
Mysql
create database zabbix charset utf8;
grant all on zabbix.* to zabbix@'localhost' identified by '123456';
flush privileges;
exit;
四,建立zabbix和数据库的连接;
zcat /usr/share/doc/zabbix-server-mysql-3.4.15/create.sql.gz | mysql -uzabbix -p123456 zabbix
五,修改时区,并启动;
vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
systemctl restart httpd
systemctl enable httpd
六,修改zabbix-server配置文件,并启动;
vim /etc/zabbix/zabbix_server.conf
systemctl restart zabbix-server
systemctl enable zabbix-server
七,修改zabbix-agent配置文件,并启动;
vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.40.111
#ServerActive=127.0.0.1 注释掉
systemctl restart zabbix-agent
systemctl enable zabbix-agent
八,访问页面:
九,安装grafana,并启动;
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.4.3-1.x86_64.rpm
rpm -ivh grafana-4.4.3-1.x86_64.rpm
报错
解决
yum install -y urw-fonts
再次安装启动
rpm -ivh grafana-4.4.3-1.x86_64.rpm
十,测试访问页面是否成功:
十一,登录grafana 用户:admin,密码:admin,下载zabbix插件
grafana-cli plugins install alexanderzobnin-zabbix-app
在启动grafana
systemctl restart grafana-server
再次访问frafana,并设置启动zabbix
进入zabbix页面:成功监控数据(修改监控IP)
刷新连接数据成功
访问zabbix数据
至此一个简单的监控搭建完成!