Disclosure of Invention
The invention aims to solve the problem that the existing Zabbix monitoring system cannot give consideration to both the monitoring object data and the monitoring data storage time because the system adopts a single-machine database.
In order to achieve the purpose, the invention provides a zabbix monitoring system based on a distributed relational database.
The invention discloses a distributed relational database-based zabbix monitoring system, which comprises:
the system comprises a preset number of zabbix proxy servers, wherein the zabbix proxy servers are used for acquiring target data corresponding to monitored ends;
a predetermined number of web ends;
a distributed relational database;
and the zabbix server is used for receiving the acquired target data of the monitored end, displaying the received data through a corresponding web end, and writing the received data into the distributed relational database.
Preferably, the zabbix proxy server is configured in an active mode.
Preferably, the zabbix monitoring system further comprises:
the system comprises a preset number of zabbix server agents, wherein the zabbix server agents are used for receiving target data of a monitored end collected by the corresponding zabbix proxy servers and sending the received data to the zabbix servers.
Preferably, the data received by the zabbix server is from the zabbix server proxy;
alternatively, the data received by the zabbix server comes from the zabbix server proxy and the zabbix proxy server.
Preferably, the zabbix server proxy is configured in an active mode.
Preferably, the history cache entry of the zabbix server is configured as a maximum value.
Preferably, the zabbix server assigns a unique identity to each user.
Preferably, the zabbix monitoring system further comprises:
and the alarm trigger is used for sending alarm information to the corresponding alarm information receiving end when the preset alarm mechanism is triggered.
Preferably, the alarm mode of the alarm trigger comprises WeChat, short message and mail.
Preferably, the alarm trigger is configured in a false alarm prevention mode.
The invention has the beneficial effects that:
according to the Zabbix monitoring system based on the distributed relational database, the stand-alone database of the existing Zabbix monitoring system is replaced by the distributed relational database, and the problem that the existing Zabbix monitoring system cannot give consideration to monitoring object data and monitoring data storage time due to the fact that the stand-alone database is adopted is solved.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Detailed Description
Preferred embodiments of the present invention will be described in more detail below. While the following describes preferred embodiments of the present invention, it should be understood that the present invention may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Example (b): fig. 1 shows an architecture diagram of a distributed relational database-based zabbix monitoring system of the present embodiment. Referring to fig. 1, the zabbix monitoring system based on the distributed relational database of the present embodiment includes:
the four zabbix proxy servers are used for acquiring target data corresponding to the monitored end;
two web ends;
a distributed relational database;
and the zabbix server is used for receiving the acquired target data of the monitored end, displaying the received data through a corresponding web end, and writing the received data into the distributed relational database.
In this embodiment, the zabbix proxy server is configured in an active mode.
The zabbix monitoring system based on the distributed relational database of the embodiment further includes:
the zabbix server agent is used for receiving target data of the monitored end acquired by the corresponding zabbix proxy server and sending the received data to the zabbix server.
In this embodiment, the data received by the zabbix server comes from the zabbix server proxy and the zabbix proxy server.
In this embodiment, the zabbix server proxy is configured in an active mode.
In this embodiment, the history cache entry of the zabbix server is configured as a maximum value.
In this embodiment, the zabbix server allocates a unique identity to each user.
The zabbix monitoring system based on the distributed relational database of the embodiment further includes:
and the alarm trigger is used for sending alarm information to the corresponding alarm information receiving end when the preset alarm mechanism is triggered.
In this embodiment, the alarm mode of the alarm trigger includes WeChat, short message and email.
In this embodiment, the alarm trigger is configured to be in an anti-false alarm mode.
The zabbix monitoring system based on the distributed relational database of the embodiment is described in more detail as follows:
the distributed relational database combines the optimal characteristics of the traditional RDBMS and NoSQL, is compatible with Mysql, supports infinite horizontal extension, and has strong consistency and high availability. From the functionality and characteristics of the distributed relational database itself:
is highly compatible with Mysql. The Mysql can be easily migrated to the distributed relational database used by the method without modifying codes, and the Mysql cluster after being sorted and tabulated can also be migrated in real time through a distributed relational database tool used by the method.
Horizontal elastic expansion. Horizontal expansion of the distributed relational database can be realized by simply adding new nodes, throughput or storage is expanded as required, and high-concurrency and mass data scenes are easily coped with.
A distributed transaction. The distributed relational database used in the method supports standard ACID transactions, and guarantees atomicity, isolation, durability and consistency of data on the basis of a distributed architecture.
The true financial level is highly available. Compared with the traditional master-slave (M-S) replication scheme, the distributed relational database used in the method can provide strong data consistency guarantee of financial level based on the majority election protocol of the Raft, and can realize automatic recovery of faults without manual intervention on the premise of not losing most of replicas.
One-stop HTAP solutions. The distributed relational database used in the method is taken as a typical OLTP row storage database, has strong OLAP performance, can provide a one-stop HTAP solution, and simultaneously processes OLTP and OLAP by one part of storage without the traditional complicated ETL process.
A cloud native SQL database. The distributed relational database used in the method supports public cloud, private cloud and mixed cloud, and automatic operation and maintenance can be realized through the packet manager module, so that deployment, configuration and maintenance become very simple.
The distributed relational database used in the method has no invasion to services, and can elegantly replace fragmented sub-database sub-tables such as traditional database middleware, database sub-tables and the like. Meanwhile, development, operation and maintenance personnel do not need to pay attention to detailed problems such as database expansion and the like, and are concentrated on business development, so that the research and development productivity is greatly improved.
From the aspect of architectural design and using method:
proxy is not used for load balancing in the Zabbix monitoring system immediately after the replacement. Although Zabbix supports the use of proxy on the primary Server to achieve load balancing, its immediate use after replacement adds complexity. Under the condition of a single Zabbix Server, after a distributed relational database is deployed, the performance index of the Zabbix monitoring system is greatly improved, and proxy can be used subsequently along with data increase and service expansion.
By selecting the active mode, the pressure of the Server is reduced. The Agent end of the Zabbix system adopts an active mode, namely Zabbixagent active, which can effectively reduce the pressure of the ZabbixServer. Because in the passive mode, the performance of the Zabbix Server is consumed more, and in the active mode, the load pressure is pushed down to the acquisition end of the Zabbix Agent, and the pressure is very little for a single server; however, if the stack is pressurized to the Server, the Server side has a problem of an excessive load.
The instability of the hardware can be compensated by setting the HistoryCache Size of the configuration item in Zabbix to the maximum value of 2G. Compared with the monitoring data volume which grows exponentially, hardware resources are always limited, which can cause some unstable factors of the distributed structured database, sometimes, data writing is slow, and the data can be backlogged in a cache, and the cache is set to be as large as possible to ensure that the data is not lost to a certain extent. Although data backlog may occur, data may be rewritten as performance is restored, and only a certain delay is generated, but data is not lost.
Different users are identified using multiple Session IDs. Because the permission check in the API calling process needs to frequently check and write the same row data of the same table, serious transaction conflict can be generated, and particularly under optimistic transactions, the serious transaction conflict can bring huge influence on a database. The Session ID is the minimum unit for permission check, and this can be avoided to some extent by multiple read-write lock authentication mechanisms.
And the API is flexibly used. As the amount of data increases, some operations of the Web fail, requiring flexible use of the API. The failure is mainly due to the fact that the database transaction is large and the front end is overtime, so that when the data volume is large, the API needs to be used flexibly.
The zabbix monitoring system based on the distributed relational database of the embodiment realizes a monitoring data staging scheme. The technical use and the architecture design related in the method are a middle-platform scheme used for monitoring data, so that the problem of massive data acquisition, storage and query is solved, a larger amount of historical data monitored for a longer time can be provided, and data analysis, query and positioning of some complex problems are facilitated. The method realizes the calling of rich API, can flexibly call data through the API, and ensures the usability of Web. The distributed structured database is good in lateral expansion capability and extremely high in usability. By increasing the capacity and performance of the database through horizontal expansion, more data can be obtained and the storage time is longer.
The Zabbix monitoring system based on the distributed relational database of the embodiment is used for researching and realizing the problems of the Zabbix monitoring system in the aspects of use, management, performance and the like caused by the fact that monitoring data in the traditional Zabbix monitoring system continuously increase, monitoring items continuously increase, performance bottleneck of a database in the traditional monitoring system architecture and the like, and by means of high performance, flexible elastic expansion, convenient use and operation modes of the Zabbix monitoring system, the storable monitoring data amount of the Zabbix monitoring system is improved, the performance of reading and writing bottom layer data of the Zabbix monitoring system is improved, the usability of the Zabbix monitoring system in the management aspect is improved, and therefore large-scale, high-performance and operation Zabbix monitoring is achieved.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments.