Cluster deployment method and device for monitoring system

By dynamically generating configuration and startup files, the component deployment of the monitoring system and the collector deployment are automatically completed, solving the problems of complexity and low efficiency of the monitoring system cluster deployment, and achieving efficient automated cluster construction.

CN115914341BActive Publication Date: 2024-11-29BANK OF CHINA FINANCIAL TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202211194307.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2024-11-29
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

The cluster deployment of existing monitoring systems is complex and prone to errors, resulting in low deployment efficiency and lack of automated cluster building methods.

Method used

By determining the node information of the monitoring system, dynamically generating configuration files and startup files, automatically completing component deployment and collector deployment, and using architectures such as Ansible and Prometheus to achieve automated cluster construction.

Benefits of technology

It improves the deployment efficiency of monitoring clusters, reduces the possibility of errors, and realizes automatic custom dynamic construction of monitoring clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914341B_ABST
    Figure CN115914341B_ABST
Patent Text Reader

Abstract

The present invention provides a cluster deployment method and device for a monitoring system, the method comprising: determining the node information of each cluster to be deployed in the monitoring system; obtaining the component function installation media file of each node according to the node information of each cluster to be deployed, and sending the component function installation media file to the corresponding node; after the component function installation media file corresponding to each node is installed, starting the component function corresponding to each node to complete the cluster deployment in the monitoring system. The present invention dynamically generates configuration files and startup files matched by the cluster for cluster architectures with different numbers of nodes in each cluster, automatically completes the component deployment of the server side where each cluster is located and the collector deployment required by the client, realizes the dynamic construction of automatic customization of the monitoring cluster, and improves the deployment efficiency of the monitoring cluster of the server monitoring system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data monitoring deployment, and in particular to a cluster deployment method and device for a monitoring system. Background Art

[0002] In the current server monitoring system, with the emergence of more and more large-scale monitoring scenarios, the monitoring system has also become diversified. Due to the various component configurations in the monitoring system, there are problems such as complex cluster construction and prone to errors, and difficulty in troubleshooting, which increases the difficulty of deploying the monitoring system.

[0003] For the business systems currently developed by various parties, most deployed monitoring systems only provide stand-alone deployment methods and simple cluster deployment method descriptions. They need to be manually configured and installed according to the configuration method, and the installation architecture is relatively fixed. Cluster deployments of different architectures require manual modification and adjustment of connection configuration, deployment configuration and other information, resulting in low deployment efficiency of the server monitoring system.

[0004] Therefore, there is an urgent need for a cluster deployment method and device for a monitoring system to solve the above problems. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention provides a cluster deployment method and device for a monitoring system.

[0006] The present invention provides a cluster deployment method for a monitoring system, comprising:

[0007] Determine the node information of each cluster to be deployed in the monitoring system;

[0008] According to the node information of each cluster to be deployed, the component function installation media file of each node is obtained, and the component function installation media file is sent to the corresponding node;

[0009] After the component function installation media files corresponding to each node are installed, the component functions corresponding to each node are started to complete the cluster deployment in the monitoring system.

[0010] According to a cluster deployment method for a monitoring system provided by the present invention, determining the node information of each cluster to be deployed in the monitoring system includes:

[0011] Based on the preset deployment requirements of the monitoring system, cluster information corresponding to each cluster to be deployed is obtained, wherein the cluster information includes the number of clusters, the cluster name, the number of nodes in the cluster, and the node connection information;

[0012] Based on the node connection information, obtain the IP address information of each node in the cluster to be deployed;

[0013] Component function information of nodes in each to-be-deployed cluster is determined, and node information of each to-be-deployed cluster is generated according to the IP address information and the component function information.

[0014] According to a cluster deployment method for a monitoring system provided by the present invention, obtaining a component function installation media file of each node according to the node information of each cluster to be deployed, and sending the component function installation media file to the corresponding node, comprising:

[0015] According to the component function information, obtaining the component function installation media file of each node in the cluster to be deployed;

[0016] Generate a configuration file for each node in the cluster to be deployed based on a preset configuration file template and the node information;

[0017] Based on the IP address information, each component function installation media file and each configuration file are sent to a corresponding node.

[0018] According to a cluster deployment method for a monitoring system provided by the present invention, before obtaining the component function installation media file of each node according to the node information of each cluster to be deployed, and sending the component function installation media file to the corresponding node, the method further includes:

[0019] Generate a startup file for each node in the cluster to be deployed based on the preset startup template and the node information;

[0020] After acquiring the component function installation media file of each node according to the node information of each cluster to be deployed, and sending the component function installation media file to the corresponding node, the method further includes:

[0021] Each startup file is sent to the corresponding node so that the node can execute the corresponding component function according to the startup parameters in the startup file.

[0022] According to a cluster deployment method for a monitoring system provided by the present invention, after generating a startup file for each node in the to-be-deployed cluster based on a preset startup template and the node information, the method further includes:

[0023] The number of nodes in the cluster to be deployed and the node connection information are adjusted to obtain adjusted node information;

[0024] Based on the adjusted node information, generating adjusted startup parameters;

[0025] A new startup file is generated according to the adjusted startup parameters.

[0026] According to a cluster deployment method for a monitoring system provided by the present invention, after determining the node information of each cluster to be deployed in the monitoring system, the method further includes:

[0027] Based on the server information and preset monitoring tasks of each target to be monitored, the collector component is deployed to the corresponding target to be detected;

[0028] After the component function installation media files corresponding to each node are installed, the component functions corresponding to each node are started to complete the cluster deployment in the monitoring system, including:

[0029] The component functions corresponding to each node and the data collection function of the collector in each target to be monitored are started to complete the cluster deployment in the monitoring system.

[0030] The present invention also provides a cluster deployment device for a monitoring system, comprising:

[0031] The cluster information entry module is used to determine the node information of each cluster to be deployed in the monitoring system;

[0032] The cluster component function configuration module is used to obtain the component function installation media file of each node according to the node information of each cluster to be deployed, and send the component function installation media file to the corresponding node;

[0033] The cluster component function startup module is used to start the component function corresponding to each node after the component function installation media file corresponding to each node is installed, so as to complete the cluster deployment in the monitoring system.

[0034] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a cluster deployment method for a monitoring system as described in any one of the above is implemented.

[0035] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the cluster deployment method for a monitoring system as described in any one of the above is implemented.

[0036] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned cluster deployment methods for monitoring systems.

[0037] The cluster deployment method and device for a monitoring system provided by the present invention dynamically generate configuration files and startup files that match the clusters for cluster architectures with different numbers of nodes in each cluster, automatically complete the component deployment on the server side where each cluster is located and the collector deployment required by the client, realize automatic customized dynamic construction of the monitoring cluster, and improve the deployment efficiency of the monitoring cluster of the server monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 A schematic diagram of a flow chart of a cluster deployment method for a monitoring system provided by the present invention;

[0040] Figure 2 A schematic diagram of the Prometheus-based cluster architecture provided by the present invention;

[0041] Figure 3 A schematic diagram of cluster service construction of the monitoring system provided by the present invention;

[0042] Figure 4 A schematic diagram of the configuration flow of the collector component in the monitoring target provided by the present invention;

[0043] Figure 5 A schematic diagram of the structure of a cluster deployment device for a monitoring system provided by the present invention;

[0044] Figure 6 This is a schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] In the deployment process of the existing monitoring system, generally only a single-machine deployment method or a simple cluster deployment description is provided. When setting the cluster component function for the relevant server node, the method of adjusting the configuration or installation command is mainly manual deployment. Since the installation architecture of the current monitoring system is relatively fixed, when the architecture of the monitoring system is adjusted, its configuration or installation method also needs to be modified and adapted by relevant personnel, and the cluster deployment process of the monitoring system cannot be automatically completed. The present invention integrates Prometheus and Alertmanager architectures, combines MinIO and Thanos, and combines them into a complete set of monitoring architectures, and uses Ansible to compile an automatic cluster construction scheme, which supports cluster architectures with different numbers of nodes, dynamically generates matching configurations and startup scripts, automatically completes the deployment of server-side components and the collector deployment required by the client, and realizes the automatic customization of the dynamic construction of the monitoring cluster.

[0047] Figure 1 A schematic diagram of a cluster deployment method for a monitoring system provided by the present invention, such as Figure 1 As shown, the present invention provides a cluster deployment method for a monitoring system, comprising:

[0048] Step 101: determine the node information of each cluster to be deployed in the monitoring system.

[0049] In the present invention, Shell is used in combination with Ansible to compile scripts to achieve cluster information entry, cluster component distribution, configuration file generation, startup script generation and cluster component startup, as well as client collector component distribution, startup script generation (collector) and component startup (collector).

[0050] In one embodiment, a corresponding menu function is provided for cluster information entry through a compiled node information entry script. Through this menu function, developers can set the number of Prometheus clusters (for Prometheus clusters deployed in shards, a set of Prometheus clusters can be deployed in each shard), the number of Alertmanager clusters, the cluster name, the number of nodes in the cluster, the connection information of each node, and the data disk to be mounted; the number of MinIO cluster nodes, the connection information of each node, and the data disk to be mounted; the number of Thanos cluster nodes, the connection information of each node, and the data disk to be mounted.

[0051] In the present invention, the Prometheus server collects monitoring indicators of the target to be monitored (such as the target server), implements alarm management through Alertmanager, and stores the monitoring data through MinIO, so as to use Thanos to implement the query of the monitoring data.

[0052] Step 102: acquiring component function installation media files of each node according to the node information of each cluster to be deployed, and sending the component function installation media files to the corresponding node.

[0053] In the present invention, the IP address information of each node can be obtained through the node information obtained in the above embodiment. Then, based on the component function to be configured of each node, Ansible is used to send it to the node of the corresponding cluster according to the IP address information, and the relevant configuration file is also sent to the node, wherein the configuration file includes the node IP address and component function file (which can be obtained through the node information, determine the component function implemented by the node, and configure the component-related rule configuration file, such as monitoring rules, alarm rules, and query rules, etc.).

[0054] Step 103 , after the component function installation media files corresponding to each node are installed, the component functions corresponding to each node are started to complete the cluster deployment in the monitoring system.

[0055] In the present invention, a component startup script is compiled through Ansible, and a template plus node information automatic replacement method is adopted. When the component startup script is issued to each node, different startup script configurations can be generated according to the nodes with different component functions. Specifically, when the node receives the installation medium and configuration file and completes the component installation, the component startup script can be connected to each node through Ansible according to the component function association relationship between each node in the node information, so as to realize the parallel startup of each node. In one embodiment, through Ansible, verification steps such as URL verification and process verification can also be provided to ensure that the node is in a normal operating state after startup. Finally, after the components of the relevant nodes in each cluster are started, the deployment of the monitoring system is completed, so as to perform data monitoring on the monitoring target.

[0056] The cluster deployment method for a monitoring system provided by the present invention dynamically generates configuration files and startup files that match the clusters for cluster architectures with different numbers of nodes in each cluster, automatically completes the component deployment on the server side where each cluster is located and the collector deployment required by the client, realizes automatic customized dynamic construction of the monitoring cluster, and improves the deployment efficiency of the monitoring cluster of the server monitoring system.

[0057] Based on the above embodiment, the step of determining the node information of each cluster to be deployed in the monitoring system includes:

[0058] Based on the preset deployment requirements of the monitoring system, cluster information corresponding to each cluster to be deployed is obtained, wherein the cluster information includes the number of clusters, cluster name, number of nodes in the cluster, and node connection information; wherein the clusters to be deployed include Prometheus cluster, Alertmanager cluster, MinIO cluster, and Thanos cluster;

[0059] Based on the node connection information, obtain the IP address information of each node in the cluster to be deployed;

[0060] Component function information of nodes in each to-be-deployed cluster is determined, and node information of each to-be-deployed cluster is generated according to the IP address information and the component function information.

[0061] Figure 2 The Prometheus-based cluster architecture diagram provided by the present invention can be referenced Figure 2 As shown in the figure, P stands for Prometheus Server, A stands for Prometheus Alertmanager, and N stands for various types of client collectors. For more information, see Figure 2 As shown in FIG. 1 , after obtaining the node information of each cluster, the node information is generated according to the IP address information of the node and the component function to be run by the node, so as to implement the distribution of components and configuration files according to the node information, thereby automatically building a cluster architecture, wherein the number of Prometheus cluster nodes and the number of shards can be automatically adjusted according to the actual demand configuration. For example, in one embodiment, Figure 2 As shown, after the Thanos sidecar component is configured on the corresponding node, if the object storage function is turned on, the node will upload the data collected by the Promethues server to the specified storage system (such as through MinIO storage). The present invention avoids the developer from manually configuring and installing node components. It only needs to pre-set the personalized cluster structure and input the server information to be installed through the menu to automatically complete the cluster configuration generation and installation deployment, reducing the complexity of cluster construction and avoiding deployment errors.

[0062] Based on the above embodiment, the step of obtaining the component function installation media file of each node according to the node information of each cluster to be deployed, and sending the component function installation media file to the corresponding node includes:

[0063] According to the component function information, obtaining the component function installation media file of each node in the cluster to be deployed;

[0064] Generate a configuration file for each node in the cluster to be deployed based on a preset configuration file template and the node information;

[0065] Based on the IP address information, each component function installation media file and each configuration file are sent to a corresponding node.

[0066] In the present invention, Shell is used in combination with Ansible to compile scripts to realize cluster information entry, cluster component distribution, configuration file generation, startup script generation and component startup. Specifically, based on the component function information of each node defined in the early stage, the component function installation media file is distributed to the node of the corresponding cluster through Ansible. At the same time, the configuration file of each node is generated by using a preset configuration file template and automatic replacement of node information, wherein the preset configuration file template is written in Jinja2 mode, and the personalized configuration is defined with parameters, and then the required parameter values ​​are automatically generated by the entered node information for replacement, so that when Ansible distributes the configuration file, different configuration file contents can be generated according to different nodes, for example, according to the node information, the relevant parameter values ​​of IP address information and component function rules are generated in the configuration file. The present invention automatically completes the transmission of different installation media of each node through Ansible, without manually uploading the installation media, thereby avoiding the manual component installation process, and greatly improving the deployment efficiency of the monitoring system.

[0067] Based on the above embodiment, before obtaining the component function installation media file of each node according to the node information of each cluster to be deployed, and sending the component function installation media file to the corresponding node, the method further includes:

[0068] Generate a startup file for each node in the cluster to be deployed based on the preset startup template and the node information;

[0069] After acquiring the component function installation media file of each node according to the node information of each cluster to be deployed, and sending the component function installation media file to the corresponding node, the method further includes:

[0070] Each startup file is sent to the corresponding node so that the node can execute the corresponding component function according to the startup parameters in the startup file.

[0071] Figure 3 The cluster service construction diagram of the monitoring system provided by the present invention can be referred to Figure 3As shown, in the present invention, the developer inputs the server architecture and information to be built according to the input prompt menu, that is, determines the number of clusters, the node connection information within the cluster, the node IP address information, and the node component function information. Further, it is divided according to the component installation, including: Prometheus Alertmanager installation, Prometheus Server installation, MinIO installation, HA configuration load mode installation, Thanos Sidecar installation, Thanos Gateway installation, Thanos Query installation, ThanosCompact installation and monitoring target collector installation and configuration. After each node obtains the corresponding component installation medium, the automatically generated configuration file and startup script are sent to the node, thereby starting the component service in the node, and by checking the process and URL status, it is determined whether the node is running normally. In the present invention, cluster configuration and interconnection startup are automatically completed by scripts.

[0072] Furthermore, the installation and startup of each functional component, through Ansible customization of related processes, the generation method of the configuration file and startup script of each node, can adopt the template plus node information automatic replacement method, wherein the template is written in Jinja2 mode, the personalized configuration is defined by parameters, and then the required parameter values ​​are automatically generated by the entered node information for replacement, so that when Ansible issues the configuration file and startup script, different configuration files and startup script contents can be generated according to different nodes. The present invention automatically connects the components required by the cluster through scripts to form a complete monitoring system network to improve the efficiency of cluster deployment.

[0073] On the basis of the above embodiment, after generating the startup file of each node in the cluster to be deployed based on the preset startup template and the node information, the method further includes:

[0074] The number of nodes in the cluster to be deployed and the node connection information are adjusted to obtain adjusted node information;

[0075] Based on the adjusted node information, generating adjusted startup parameters;

[0076] A new startup file is generated according to the adjusted startup parameters.

[0077] In the present invention, the connection string information of the interconnection within the cluster can dynamically generate startup parameters of different node architectures according to the cluster node information and the number of nodes, so as to match the dynamic change mode of the architecture. When the developer adjusts the number of nodes or the functions of the relevant components of the nodes in the cluster, the cluster nodes can be dynamically adapted and adjusted according to the adjusted node information. Before installing the components on the relevant nodes, the cluster deployment of different node architectures can be completed according to the developer input of the adjusted number of nodes and node information, so as to generate a personalized cluster architecture according to different cluster requirements.

[0078] In the present invention, each node of the cluster is highly available, and the number of nodes can be horizontally expanded according to actual needs (the developer can manually modify the number of nodes). Shell scripts and Ansible are used to realize automatic cluster construction. The solution can support cluster architectures with different numbers of nodes, dynamically generate matching configurations and startup scripts, automatically complete the deployment of server-side components and the collector deployment required by the client, and realize automatic customized dynamic construction of the monitoring cluster.

[0079] Based on the above embodiment, after determining the node information of each cluster to be deployed in the monitoring system, the method further includes:

[0080] Based on the server information and preset monitoring tasks of each target to be monitored, the collector component is deployed to the corresponding target to be detected;

[0081] After the component function installation media files corresponding to each node are installed, the component functions corresponding to each node are started to complete the cluster deployment in the monitoring system, including:

[0082] The component functions corresponding to each node and the data collection function of the collector in each target to be monitored are started to complete the cluster deployment in the monitoring system.

[0083] Figure 4 The configuration flow diagram of the collector component in the monitoring target provided by the present invention can be referred to Figure 4 As shown, in the present invention, when the client collector component (Exporter component) is deployed, the script is also used for automatic execution. It only needs to configure the server information that needs to be installed (such as the IP address information of the target to be monitored in the preset monitoring task) and the relevant monitoring point information that needs to be monitored (such as log data). The Prometheus target discovery file can be automatically generated while the collector components are installed in batches. No other manual operations are required, which greatly improves the monitoring efficiency of the server.

[0084] The cluster deployment device for a monitoring system provided by the present invention is described below. The cluster deployment device for a monitoring system described below and the cluster deployment method for a monitoring system described above can be referred to each other.

[0085] Figure 5 A schematic diagram of the structure of a cluster deployment device for a monitoring system provided by the present invention, such as Figure 5 As shown, the present invention provides a cluster deployment device for a monitoring system, including a cluster information entry module 501, a cluster component function configuration module 502 and a cluster component function startup module 503, wherein the cluster information entry module 501 is used to determine the node information of each cluster to be deployed in the monitoring system; the cluster component function configuration module 502 is used to obtain the component function installation media file of each node according to the node information of each cluster to be deployed, and send the component function installation media file to the corresponding node; the cluster component function startup module 503 is used to start the component function corresponding to each node after the component function installation media file corresponding to each node is installed, so as to complete the cluster deployment in the monitoring system.

[0086] The cluster deployment device for a monitoring system provided by the present invention dynamically generates configuration files and startup files that match the clusters for cluster architectures with different numbers of nodes in each cluster, automatically completes the component deployment on the server side where each cluster is located and the collector deployment required by the client, realizes automatic customized dynamic construction of the monitoring cluster, and improves the deployment efficiency of the monitoring cluster of the server monitoring system.

[0087] On the basis of the above embodiment, the cluster information entry module includes an information entry unit, an information parsing unit and a node information generation unit, wherein the information entry unit is used to obtain the cluster information corresponding to each cluster to be deployed based on the preset deployment requirements of the monitoring system, and the cluster information includes the number of clusters, cluster name, number of nodes in the cluster and node connection information; the information parsing unit is used to obtain the IP address information of the nodes in each cluster to be deployed based on the node connection information; the node information generation unit is used to determine the component function information of the nodes in each cluster to be deployed, and generate the node information of each cluster to be deployed according to the IP address information and the component function information.

[0088] Based on the above embodiment, the cluster component function configuration module includes a component installation media acquisition unit, a configuration file generation unit and a sending unit, wherein the component installation media acquisition unit is used to obtain the component function installation media file of each node in the cluster to be deployed according to the component function information; the configuration file generation unit is used to generate the configuration file for each node in the cluster to be deployed based on a preset configuration file template and the node information; the sending unit is used to send each component function installation media file and each configuration file to the corresponding node based on the IP address information.

[0089] Based on the above embodiment, the device is also used for:

[0090] Generate a startup file for each node in the cluster to be deployed based on the preset startup template and the node information;

[0091] Each startup file is sent to the corresponding node so that the node can execute the corresponding component function according to the startup parameters in the startup file.

[0092] Based on the above embodiment, the device is also used for:

[0093] The number of nodes in the cluster to be deployed and the node connection information are adjusted to obtain adjusted node information;

[0094] Based on the adjusted node information, generating adjusted startup parameters;

[0095] A new startup file is generated according to the adjusted startup parameters.

[0096] On the basis of the above embodiment, the square device further includes a collector component deployment module, which is used to deploy the collector component to the corresponding target to be detected based on the server information of each target to be monitored and the preset monitoring task;

[0097] The cluster component function startup module is specifically used for:

[0098] The component functions corresponding to each node and the data collection function of the collector in each target to be monitored are started to complete the cluster deployment in the monitoring system.

[0099] The device provided by the present invention is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for the specific processes and detailed contents, which will not be repeated here.

[0100] Figure 6 A schematic diagram of the structure of an electronic device provided by the present invention, such as Figure 6As shown, the electronic device may include: a processor (Processor) 601, a communication interface (Communications Interface) 602, a memory (Memory) 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604. The processor 601 may call the logic instructions in the memory 603 to execute a cluster deployment method for a monitoring system, the method comprising: determining the node information of each cluster to be deployed in the monitoring system; obtaining the component function installation media file of each node according to the node information of each cluster to be deployed, and sending the component function installation media file to the corresponding node; after the component function installation media file corresponding to each node is installed, starting the component function corresponding to each node to complete the cluster deployment in the monitoring system.

[0101] In addition, the logic instructions in the above-mentioned memory 603 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0102] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the cluster deployment method for a monitoring system provided by the above methods, the method including: determining the node information of each cluster to be deployed in the monitoring system; according to the node information of each cluster to be deployed, obtaining the component function installation media file of each node, and sending the component function installation media file to the corresponding node; after the component function installation media file corresponding to each node is installed, starting the component function corresponding to each node to complete the cluster deployment in the monitoring system.

[0103] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the cluster deployment method for a monitoring system provided by the above-mentioned embodiments, the method comprising: determining the node information of each cluster to be deployed in the monitoring system; according to the node information of each cluster to be deployed, obtaining the component function installation media file of each node, and sending the component function installation media file to the corresponding node; after the component function installation media file corresponding to each node is installed, starting the component function corresponding to each node to complete the cluster deployment in the monitoring system.

[0104] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A cluster deployment method for monitoring system, It is characterized in that include: Determine the node information of each cluster to be deployed in the monitoring system; According to the node information of each cluster to be deployed, the component function installation media file of each node is obtained, and the component function installation media file is sent to the corresponding node; After the component function installation media files corresponding to each node are installed, the component functions corresponding to each node are started to complete the cluster deployment in the monitoring system; The step of determining the node information of each cluster to be deployed in the monitoring system includes: Based on the preset deployment requirements of the monitoring system, cluster information corresponding to each cluster to be deployed is obtained, wherein the cluster information includes the number of clusters, the cluster name, the number of nodes in the cluster, and the node connection information; Based on the node connection information, obtain the IP address information of each node in the cluster to be deployed; Determine component function information of nodes in each to-be-deployed cluster, and generate node information of each to-be-deployed cluster based on the IP address information and the component function information; The step of acquiring the component function installation media file of each node according to the node information of each cluster to be deployed, and sending the component function installation media file to the corresponding node includes: According to the component function information, obtaining the component function installation media file of each node in the cluster to be deployed; Generate a configuration file for each node in the cluster to be deployed based on a preset configuration file template and the node information; Based on the IP address information, each component function installation media file and each configuration file are sent to a corresponding node.

2. The cluster deployment method for monitoring system according to claim 1, It is characterized in that Before acquiring the component function installation media file of each node according to the node information of each cluster to be deployed, and sending the component function installation media file to the corresponding node, the method further includes: Generate a startup file for each node in the cluster to be deployed based on the preset startup template and the node information; After acquiring the component function installation media file of each node according to the node information of each cluster to be deployed, and sending the component function installation media file to the corresponding node, the method further includes: Each startup file is sent to the corresponding node so that the node can execute the corresponding component function according to the startup parameters in the startup file.

3. The cluster deployment method for monitoring system according to claim 2, It is characterized in that After generating the startup file of each node in the to-be-deployed cluster based on the preset startup template and the node information, the method further includes: The number of nodes in the cluster to be deployed and the node connection information are adjusted to obtain adjusted node information; Based on the adjusted node information, generating adjusted startup parameters; A new startup file is generated according to the adjusted startup parameters.

4. The cluster deployment method for a monitoring system according to any one of claims 1 to 3, It is characterized in that After determining the node information of each to-be-deployed cluster in the monitoring system, the method further includes: Based on the server information and preset monitoring tasks of each target to be monitored, the collector component is deployed to the corresponding target to be detected; After the component function installation media files corresponding to each node are installed, the component functions corresponding to each node are started to complete the cluster deployment in the monitoring system, including: The component functions corresponding to each node and the data collection function of the collector in each target to be monitored are started to complete the cluster deployment in the monitoring system.

5. A cluster deployment device for monitoring system, It is characterized in that include: The cluster information entry module is used to determine the node information of each cluster to be deployed in the monitoring system; The cluster component function configuration module is used to obtain the component function installation media file of each node according to the node information of each cluster to be deployed, and send the component function installation media file to the corresponding node; A cluster component function startup module, used to start the component function corresponding to each node after the component function installation media file corresponding to each node is installed, so as to complete the cluster deployment in the monitoring system; The cluster information entry module includes an information entry unit, an information parsing unit and a node information generation unit, wherein the information entry unit is used to obtain cluster information corresponding to each cluster to be deployed based on the preset deployment requirements of the monitoring system, and the cluster information includes the number of clusters, the cluster name, the number of nodes in the cluster and the node connection information; the information parsing unit is used to obtain the IP address information of the nodes in each cluster to be deployed based on the node connection information; the node information generation unit is used to determine the component function information of the nodes in each cluster to be deployed, and generate the node information of each cluster to be deployed according to the IP address information and the component function information; The cluster component function configuration module includes a component installation media acquisition unit, a configuration file generation unit and a sending unit, wherein the component installation media acquisition unit is used to obtain the component function installation media file of each node in the cluster to be deployed according to the component function information; the configuration file generation unit is used to generate the configuration file of each node in the cluster to be deployed based on a preset configuration file template and the node information; the sending unit is used to send each component function installation media file and each configuration file to the corresponding node based on the IP address information.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the cluster deployment method for a monitoring system as claimed in any one of claims 1 to 4 is implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the cluster deployment method for a monitoring system as claimed in any one of claims 1 to 4 is implemented.

8. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the cluster deployment method for a monitoring system as claimed in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Kafka cluster automatic deployment method and device based on Linux system

    CN108073402A

  • Cluster deployment method, system and device and computer readable storage medium

    CN110493028A

  • Task scheduling distribution method and device based on target application, equipment and medium

    CN113722079A

  • Big data service component deployment method and system, terminal and storage medium

    CN114443294A

  • Distributed test framework for clustered systems

    US7165189B1