zabbix

1. 安装

环境

centos7.4

zabbix3.0

 

安装页,参考

https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages/repository_installation

https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages/server_installation_with_mysql

 

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

 

yum install zabbix-server-mysql zabbix-web-mysql

 

shell> mysql -uroot -p<root_password>
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
mysql> quit;
修改use zabbix
zcat /usr/share/doc/zabbix-server-mysql-3.0.*/create.sql.gz | mysql -uzabbix -p zabbix

修改配置

# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=<password>
# systemctl start zabbix-server
# systemctl enable zabbix-server

 启动后监听10051端口

 

http配置/etc/httpd/conf.d/zabbix.conf.

php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
# php_value date.timezone Europe/Riga
systemctl start httpd

 

网页配置安装

http://ip/zabbix/
默认
用户名Admin
密码zabbix

 

agent配置项

root@s1:~# cat /etc/zabbix/zabbix_agentd.conf | grep -v ^# | grep -v ^$
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix-agent/zabbix_agentd.log
LogFileSize=0
Server=115.159.76.225
StartAgents=3
ServerActive=115.159.76.225
Hostname=Zabbix_client
Include=/etc/zabbix/zabbix_agentd.conf.d/*.conf

说明:
可以兼容主动/被动模式。
其中被动模式相关项为 Server=115.159.76.225 StartAgents=3
主动模式相关项为
ServerActive=115.159.76.225
 

 开通agent端防火墙tcp 10050端口


 2. 监控项配置

posted @ 2018-04-26 17:40  EngineTang  阅读(160)  评论(0编辑  收藏  举报