lab environment
Part on this blog undertake zabbix monitoring service --httpd, nginx, mysql, java
Host computer | ip | surroundings |
---|---|---|
server4 | 172.25.62.4 | zabbix monitoring client |
server3 | 172.25.62.3 | Monitored host |
server2 | 172.25.62.2 | Monitored host |
1. Modify server3 host named proxy, as the proxy host, and install related software
[root@server3 ~]# yum install -y fping-3.10-1.el7.x86_64.rpm
[root@server3 ~]# yum install -y zabbix-proxy-mysql-4.0.5-1.el7.x86_64.rpm
Installation zabbix-proxy.
2. Edit the content of the database, import data
[root@server3 ~]# mysql -p
Enter password:
MariaDB [(none)]> create database zabbix_proxy character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix_proxy.* to zabbix@localhost identified by 'redhat';
Authorization.
[root@server3 mysql]# cd /usr/share/doc/zabbix-proxy-mysql-4.0.5/
[root@server3 zabbix-proxy-mysql-4.0.5]# zcat schema.sql.gz | mysql -p zabbix_proxy
Enter password:
Enter the password database, importing data.
[root@server3 zabbix-proxy-mysql-4.0.5]# vim /etc/zabbix/zabbix_proxy.conf
30 Server=172.25.62.4
39 ServerPort=10051
49 Hostname=proxy
173 DBName=zabbix_proxy
188 DBUser=zabbix
196 DBPassword=redhat
329 JavaGateway=172.25.62.4
337 JavaGatewayPort=10052
345 StartJavaPollers=5
Modify the configuration file.
2. Add the proxy server in the web browser, the proxy host server2 proxy
settings server2 host detection by the agent for the proxy.
[root@server2 ~]# vim /etc/zabbix/zabbix_agentd.conf
98 Server=172.25.62.3
139 ServerActive=172.25.62.3
To modify ip ip proxy host.
[root@server4 4.0]# systemctl restart zabbix-server
[root@proxy ~]# systemctl restart zabbix-proxy
Qidong proxy re-end and server4 service, after reviewing the log proxy host.
Note that because server3 changed the host named proxy, so to modify the resolution.
[root@proxy ~]# vim /etc/hosts