Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zabbix 3.0 distributed Monitoring [9]

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Zabbix 3.0 distributed Monitoring [9]

Zabbix 3.0 distributed Monitoring [9]

October 11, 2016

Zabbix

Author QQ:381493251

Zabbix Proxy is a proxy-like service that can obtain zabbix-agent information instead of Zabbix-server. The data is saved locally (Proxy has its own database) and then sent to Server, which ensures that the data is not lost.

Zabbix-server-> Zabbix-Proxy-> Zabbix-Server

Address: https://www.zabbix.com/documentation/3.0/manual/distributed_monitoring/proxies

Zabbix Proxy usage scenario

Often used in multiple computer rooms or monitoring hosts are especially many, about thousands. Using Zabbix Proxy at this time can reduce the pressure on the server server and also reduce the maintenance of Zabbix.

The most commonly used feature is suitable for multiple computer rooms, when the network is unstable, because if the message is sent directly by Zabbix-server, agent may not receive it, but directly using Zabbix-Proxy will not encounter this problem.

Official description of Zabix (distributed monitoring)

Proxy has the following functions

Address: https://www.zabbix.com/documentation/3.0/manual/distributed_monitoring

NO-Chinese explanation

1. No Web interface

two。 Do not make any alarm notification (all alarm notifications are done by Server)

Summary:

There can be multiple Zabbix Proxy, which can be used to run the proxy Zabbix server. Proxy temporarily stores all data locally and then forwards it to Zabbix Server at the same time.

Proxy only needs a TCP link, which can be connected to Zabbix-server. So we only need to add a Zabbix Proxy to the firewall. We can refer to the Zabbix Proxy diagram above.

Proxy requires a separate database, so you cannot put Server and Agent together

Proxy description: https://www.zabbix.com/documentation/3.0/manual/distributed_monitoring/proxies

Installation documentation: https://www.zabbix.com/documentation/3.0/manual/installation/install

Official documentation uses source code installation, because it is convenient for us to use yum installation, because we only have 2 sets, so we use agent as Proxy

[root@linux-node2 ~] # yum install-y zabbix-proxy zabbix-proxy-mysql mariadb-server We need to start MySQL [root @ linux-node2 ~] # systemctl start mariadb.service

We also need to create a library

Mysqlcreate database zabbix_proxy character set utf8;grant all on zabbix_proxy.* to zabbix_proxy@localhost identified by 'zabbix_proxy'

We need to import data.

[root@linux-node2 ~] # cd / usr/share/doc/zabbix-proxy-mysql-3.0.5/ [root@linux-node2 zabbix-proxy-mysql-3.0.5] # zcat schema.sql.gz | mysql- uzabbix_proxy-p zabbix_proxyEnter password: # password is: zabbix_proxy is the password authorized by our database

Check the database

Mysqlshow databases;use zabbix_proxy;show tables;# to see if it contains data

We need to modify the configuration file of proxy

[root@linux-node2 zabbix-proxy-mysql-3.0.5] # vim / etc/zabbix/zabbix_proxy.conf Server=192.168.56.11Hostname=Zabbix proxyDBName=zabbix_proxy# database name DBUser=zabbix_proxy# username DBPassword=zabbix_proxy# user password configuration file is not configured as follows: (can be configured if necessary) # time for ProxyLocalBuffer=0# data retention (in hours) # ProxyOfflineBuffer=1# cannot connect to Server, and how long the data should be retained (in hours) The default is 1 hour) # the interval between sending DataSenderFrequency=1# data (default is 1 second) # the number of threads started by StartPollers=5# # the number of threads started by StartIPMIPollers=0# is the performance monitoring from here to down, which is not explained once. There are Chinese notes on it.

Filter the modified configuration as follows:

[root@linux-node2 zabbix-proxy-mysql-3.0.5] # grep'^ [Amurz]'/ etc/zabbix/zabbix_proxy.confServer=192.168.56.11Hostname=Zabbix proxyLogFile=/var/log/zabbix/zabbix_proxy.logLogFileSize=0PidFile=/var/run/zabbix/zabbix_proxy.pidDBName=zabbix_proxyDBUser=zabbix_proxyDBPassword=zabbix_proxySNMPTrapperFile=/var/log/snmptrap/snmptrap.logTimeout=4ExternalScripts=/usr/lib/zabbix/externalscriptsLogSlowQueries=3000

Start

[root@linux-node2 ~] # systemctl start zabbix-proxy

View proxy processes

[root@linux-node2] # netstat-lntupActive Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0 0 lntupActive Internet connections 3306 0.0.0 0 * LISTEN 15685/mysqld tcp 0 0 0.0.0 0 22 0.0 .0.0: * LISTEN 1073/sshd tcp 00 127.0.0.1 LISTEN 15924/zabbix_proxy tcp6 25 0.0.0.0 LISTEN 2498/master tcp 00 0.0.0.0 LISTEN 15924/zabbix_proxy tcp6 10051 0.0.0.0 0: 44589: * LISTEN 9052/java tcp6 0 0: 8080: * LISTEN 9052/java tcp6 0 0: 22:: * LISTEN 1073/sshd tcp6 0 0: 8888: * LISTEN 9052/java tcp6 0 0:: 1:25:: * LISTEN 2498/master tcp6 0 0: 39743 : * LISTEN 9052/java tcp6 00: 10051: * LISTEN 15924/zabbix_proxy tcp6 00 127.0.1 LISTEN 9052/java tcp6 8005: * 00:: 8009: * LISTEN 9052/java

Zabbix-proxy monitors port 10051. Because it is an agent, it must be the same as the port of Server. For Agent Proxy, it is Server.

Zabbix Web add

Just click Add.

We need to set the Server of this host to Proxy

To edit the host 192.168.56.12, you need to change the IP address of Server to your own.

Since it is active mode now, we only need to modify the Server of active mode.

[root@linux-node2 ~] # vim / etc/zabbix/zabbix_agentd.conf ServerActive=192.168.56.12# configuration file needs to be restarted after modification [root@linux-node2 ~] # systemctl restart zabbix-agent

At this time, we can see that the proxy manages those machines and achieves a mechanism that is convenient for management.

The simple understanding of proxy is a Server

Finish it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report