Deployment method and device of monitoring component, computer equipment and storage medium

文档序号:1798224 发布日期:2021-11-05 浏览:20次 中文

阅读说明:本技术 监控组件的部署方法、装置、计算机设备以及存储介质 (Deployment method and device of monitoring component, computer equipment and storage medium ) 是由 刘建宇 宓志明 张智慧 于 2021-08-04 设计创作,主要内容包括:本发明提供了一种监控组件的部署方法、装置、计算机设备以及存储介质,该方法包括:服务端根据接收到的创建指令创建收集器,其中,收集器用于收集监控组件的信息;服务端接收收集器上传的监控组件的信息;服务端根据监控组件的信息针对监控组件生成部署指令;服务端将部署指令同步至客户端,其中,客户端执行部署指令对监控组件进行部署,其中,监控组件用于对软件系统的运行状况进行监控。解决了现有的软件系统的监控方案中需要用户通过客户端来多次手动修改不同的监控组件,导致软件系统监控效率低的技术问题。(The invention provides a deployment method, a deployment device, computer equipment and a storage medium of a monitoring component, wherein the method comprises the following steps: the server side creates a collector according to the received creating instruction, wherein the collector is used for collecting information of the monitoring component; the server receives the information of the monitoring component uploaded by the collector; the server generates a deployment instruction for the monitoring component according to the information of the monitoring component; and the server synchronizes the deployment instruction to the client, wherein the client executes the deployment instruction to deploy the monitoring component, and the monitoring component is used for monitoring the operating condition of the software system. The technical problem that in the existing monitoring scheme of the software system, a user needs to manually modify different monitoring components for multiple times through a client, so that the monitoring efficiency of the software system is low is solved.)

1. A method of deploying a monitoring component, the method comprising:

the server side creates a collector according to the received creating instruction, wherein the collector is used for collecting information of the monitoring component;

the server receives the information of the monitoring component uploaded by the collector;

the server generates a deployment instruction for the monitoring component according to the information of the monitoring component;

the server side synchronizes the deployment instruction to a client side, wherein the client side executes the deployment instruction to deploy the monitoring component, and the monitoring component is used for monitoring the running condition of the software system.

2. The method according to claim 1, wherein the deployment instructions comprise at least: and adding an alarm index instruction and an alarm rule instruction.

3. The method of claim 1, wherein before the server synchronizes the deployment instructions to a client, the method further comprises:

and the server side performs database backup on the deployment instruction.

4. The method of claim 1, wherein after the client executes the deployment instruction to deploy the monitoring component, the method further comprises:

and the client sends the deployment result of the monitoring component to the server for displaying.

5. The method of claim 1, wherein after the client executes the deployment instruction to deploy the monitoring component, the method comprises:

and the client sends the monitoring result of the monitoring component to the server for displaying, wherein the monitoring result is used for representing the running condition of the software system.

6. A deployment apparatus for monitoring components, the apparatus comprising:

the creating unit is used for creating a collector according to the received creating instruction, wherein the collector is used for collecting information of the monitoring component;

the receiving unit is used for receiving the information of the monitoring component uploaded by the collector;

the deployment unit is used for generating a deployment instruction for the monitoring component according to the information of the monitoring component;

and the synchronization unit is used for synchronizing the deployment instruction to a client, wherein the client executes the deployment instruction to deploy the monitoring component.

7. The apparatus of claim 6, wherein the deployment instructions comprise at least: and adding an alarm index instruction and an alarm rule instruction.

8. The apparatus of claim 7, further comprising:

and the backup unit is used for carrying out database backup on the deployment instruction.

9. A computer device comprising a memory and a processor, the memory having stored thereon a computer program that, when executed by the processor, causes the method of any of claims 1 to 5 to be performed.

10. A non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, causes the method of any one of claims 1 to 5 to be performed.

Technical Field

The present invention relates to the field of software monitoring, and in particular, to a method and an apparatus for deploying a monitoring component, a computer device, and a storage medium.

Background

In the running process of the software system, the running state of the software system needs to be monitored in real time, and under the condition that the software system breaks down, the software system can give an alarm in real time, the establishment of a software monitoring system can help operation and maintenance personnel to obtain notification of the software system breakdown in the first time, and meanwhile, some important indexes of the system in the running process can be recorded, so that the operation and maintenance personnel or developers can analyze the cause of the breakdown through the change of the indexes, and the breakdown can be processed more conveniently and rapidly.

The existing monitoring system has numerous components, and all functions of collecting indexes, displaying graphs and finally monitoring and alarming cannot be realized simultaneously through a single component. In the process of integrating multiple monitoring components, in conjunction with fig. 1, an operator is required to learn a large amount of relevant knowledge and then operate on configuration information of the multiple monitoring components, for example, the operator is required to manually deploy all the components, manually request registration of collector addresses, and manually modify configuration information of the multiple monitoring components.

It should be noted that, in the existing monitoring scheme of the software system, a user needs to manually modify different monitoring components through a client many times, which results in low monitoring efficiency of the software system.

Disclosure of Invention

The invention provides a deployment method and device of monitoring components, computer equipment and a storage medium, which are used for solving the technical problem of low monitoring efficiency of a software system caused by the fact that a user needs to manually modify different monitoring components for many times through a client in the monitoring scheme of the existing software system.

According to a first aspect of the present invention, there is provided a method of deploying a monitoring component, the method comprising: the server side creates a collector according to the received creating instruction, wherein the collector is used for collecting information of the monitoring component; the server receives the information of the monitoring component uploaded by the collector; the server generates a deployment instruction for the monitoring component according to the information of the monitoring component; and the server synchronizes the deployment instruction to the client, wherein the client executes the deployment instruction to deploy the monitoring component, and the monitoring component is used for monitoring the operating condition of the software system.

Further, the deployment instructions include at least: and adding an alarm index instruction and an alarm rule instruction.

Further, before the server synchronizes the deployment instruction to the client, the method further includes: and the server side performs database backup on the deployment instruction.

Further, after the client executes the deployment instruction to deploy the monitoring component, the method further includes: and the client sends the deployment result of the monitoring component to the server for displaying.

Further, after the client executes the deployment instruction to deploy the monitoring component, the method includes: and the client sends the monitoring result of the monitoring component to the server for displaying, wherein the monitoring result is used for representing the running condition of the software system.

According to a second aspect of the present invention, there is provided a deployment apparatus for a monitoring assembly, the apparatus comprising: the creating unit is used for creating a collector according to the received creating instruction, wherein the collector is used for collecting the information of the monitoring component; the receiving unit is used for receiving the information of the monitoring component uploaded by the collector; the deployment unit is used for generating a deployment instruction for the monitoring component according to the information of the monitoring component; and the synchronization unit is used for synchronizing the deployment instruction to the client, wherein the client executes the deployment instruction to deploy the monitoring component.

Further, the deployment instructions include at least: and adding an alarm index instruction and an alarm rule instruction.

Further, the apparatus further comprises: and the backup unit is used for carrying out database backup on the deployment instruction.

According to a third aspect of the invention, there is provided a computer device comprising a memory and a processor, the memory having stored thereon a computer program which, when executed by the processor, causes the method of any of the above to be performed.

According to a fourth aspect of the invention, there is provided a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, causes the method of any of the above to be performed.

The invention provides a deployment method, a deployment device, computer equipment and a storage medium of a monitoring component, wherein the method comprises the following steps: the server side creates a collector according to the received creating instruction, wherein the collector is used for collecting information of the monitoring component; the server receives the information of the monitoring component uploaded by the collector; the server generates a deployment instruction for the monitoring component according to the information of the monitoring component; and the server synchronizes the deployment instruction to the client, wherein the client executes the deployment instruction to deploy the monitoring component, and the monitoring component is used for monitoring the operating condition of the software system. The technical problem that in the existing monitoring scheme of the software system, a user needs to manually modify different monitoring components for multiple times through a client, so that the monitoring efficiency of the software system is low is solved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.

FIG. 1 is a schematic diagram of a prior art deployment method of a monitoring assembly;

FIG. 2 is a schematic diagram of a deployment method of a monitoring component according to an embodiment of the invention;

FIG. 3 is a schematic diagram of an alternative monitoring component deployment method of an embodiment of the present invention; and

FIG. 4 is a schematic diagram of an alternative monitoring component deployment apparatus according to an embodiment of the present invention.

Detailed Description

In order to make the above and other features and advantages of the present invention more apparent, the present invention is further described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are for purposes of illustration only and are not intended to be limiting.

In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the specific details need not be employed to practice the present invention. In other instances, well-known steps or operations are not described in detail to avoid obscuring the invention.

Example one

As shown in fig. 2, the present application provides a deployment method of a monitoring component, which may include:

step S301, the server side creates a collector according to the received creation instruction, wherein the collector is used for collecting information of the monitoring component.

Specifically, in the scheme, a collector can be created in a page of a server (server), that is, a page can be provided at the server, a user can input a creation instruction through operating the page to create a plurality of collectors, the plurality of collectors are used for collecting information of monitoring components, the monitoring components can be Prometheus components, Grafana components and alert components, the plurality of monitoring components are used for monitoring the progress status of a software system, and the plurality of monitoring components can perform early warning when the software system is abnormal.

Step S302, the server receives the information of the monitoring component uploaded by the collector.

Step S303, the server generates a deployment instruction for the monitoring component according to the information of the monitoring component.

Specifically, in the present scheme, after the server creates the collectors, the server may acquire information of all monitoring components uploaded by the plurality of collectors, and then generate a deployment instruction for the plurality of monitoring components.

Step S304, the server synchronizes the deployment instruction to the client, wherein the client executes the deployment instruction to deploy the monitoring component, and the monitoring component is used for monitoring the operating condition of the software system.

Specifically, in the present solution, a deployment instruction is created on a page of a server, then the server may use a rest manner to invoke a client (client), that is, synchronize the generated deployment instruction to the client, then the client executes the deployment instruction generated at the server, and after executing the deployment instruction, the client sends a result of executing the deployment instruction to the server. For example, a deployment instruction for creating an index graph may be generated on a server page, the server may invoke a client in a rest manner, the client then executes the deployment instruction to create the graph, and meanwhile, collects a graph page of the client and then sends a graph page address to the server, for example, a deployment instruction for creating a monitoring alarm index may be generated on the server page, the server may invoke the client in the rest manner, and then the client executes the deployment instruction to create the alarm index. When the monitoring index fails, the client synchronizes the alarm information to the server.

It should be noted that, as seen from the foregoing steps S301 to S304, all operations of deploying instructions by the client are to generate instructions at the server, and then invoke the client to actually complete the instructions, the user does not need to configure the monitoring components at the client one by one, only needs to operate at the server, and the client automatically deploys the monitoring components, so that the technical problem that the monitoring efficiency of the software system is low because the user needs to manually modify different monitoring components multiple times through the client in the existing monitoring scheme of the software system is solved.

Optionally, with reference to fig. 3, before step S301, the present solution may provide basic information parameters for configuring the monitoring component, such as monitored index information, a page configuration template, and alarm index information, on a page of the server. Most basic information can be built in the server, and a user can selectively configure the monitoring component in a personalized way according to the most basic information, so that a monitoring center is established at the server, after the monitoring center is established at the server through a server page, the page can generate a deployment command, and the command can be executed to monitor one-key deployment of the component. It should be noted that, before step S301, in the present solution, a monitoring agent (i.e., a client is created) may be created on a page of the server, after the creation is completed, a deployment command of the agent is generated, and the deployment command is copied to the server to be directly executed, where the agent, i.e., the client, and the client, after being started, automatically reports an address to the server. Then, the collector is created on the page in step 301, after the creation is completed, a deployment command is also generated, a copy command is started on the server, and then the page is online, and the information of the collector is reported to the server.

Optionally, the deployment instruction at least includes: and adding an alarm index instruction and an alarm rule instruction.

Specifically, in the scheme, the alarm index can be added in the server page, the server calls the client in a rest mode, then the client executes the alarm index adding instruction, then the graphical page address of the client is collected and uploaded to the client, and namely the alarm index adding instruction is automatically synchronized to the client after the alarm index is added by the server page. The method comprises the steps that an alarm rule can be added to a server page, the server can call a client in a rest mode, then the client executes an alarm rule adding instruction, and when a monitored index fails, the client synchronizes alarm information to the server.

Optionally, before the server synchronizes the deployment instruction to the client in step S304, the method may further include:

step S3031, the server performs database backup on the deployment instruction.

Specifically, in the present solution, all operations for the client are executed by adding instructions at the server and then synchronizing to the client. The user does not need to care about the client except for the very first deployment. When adding the instruction operation of each step, the server side backups the data in the database of the server side before calling the client side to execute the command. If the data of the follow-up monitoring component is lost, the data only needs to be synchronized from the server side to the client side. In the prior art, the problem of data loss is easily caused only by adding the deployment instruction through the client, so that the technical effect that data can be backed up only by operating on a page without configuring any component can be realized.

It should be noted that, the server performs database backup on the deployment instruction, and may also complete the database backup while the client executes the instruction.

Optionally, after the client executes the deployment instruction to deploy the monitoring component in step S304, the method may further include:

step S305, the client sends the deployment result of the monitoring component to the server for displaying.

Specifically, in the scheme, after the client executes the deployment instruction, the deployment result can be sent to the server in real time for display, so that the server can know the deployment process in time.

Optionally, after the client executes the deployment instruction to deploy the monitoring component in step S304, the method provided in this scheme may further include:

and S306, the client sends the monitoring result of the monitoring component to the server for displaying, wherein the monitoring result is used for representing the running state of the software system.

Specifically, the overall architecture of the scheme can be divided into a client and a server. The client is responsible for carrying out interactive operation with the monitoring component, simultaneously keeps contact with the service, reports health information status and address information to the server, and the server is also responsible for centrally managing the health status of all the components and simultaneously carries out persistent operation on all operation data, thereby facilitating the migration of subsequent data.

Example two

As shown in fig. 4, the present disclosure provides a deployment apparatus of a monitoring component, where the deployment apparatus may be run in a server, and may also be configured to perform the method of one of the foregoing embodiments, and the deployment apparatus may include: a creating unit 50 configured to create a collector according to the received creating instruction, wherein the collector is configured to collect information of the monitoring component; a receiving unit 52, configured to receive information of the monitoring component uploaded by the collector; a deployment unit 54, configured to generate a deployment instruction for the monitoring component according to the information of the monitoring component; and a synchronization unit 56, configured to synchronize the deployment instruction to the client, where the client executes the deployment instruction to deploy the monitoring component.

Specifically, in the scheme, a collector can be created in a page of a server (server), that is, a page can be provided at the server, a user can input a creation instruction through operating the page to create a plurality of collectors, the plurality of collectors are used for collecting information of monitoring components, the monitoring components can be Prometheus components, Grafana components and alert components, the plurality of monitoring components are used for monitoring the progress status of a software system, and the plurality of monitoring components can perform early warning when the software system is abnormal. After the collector is created, the server may acquire information of all the monitoring components uploaded by the plurality of collectors, and then generate a deployment instruction for the plurality of monitoring components. The deployment instruction is created on a page of the server, then the server can call the client in a rest mode, namely, the generated deployment instruction is synchronized to the client, then the client executes the deployment instruction generated at the server, and after the deployment instruction is executed, the client sends the result of executing the deployment instruction to the server. For example, a deployment instruction for creating an index graph may be generated on a server page, the server may invoke a client in a rest manner, the client then executes the deployment instruction to create the graph, and meanwhile, collects a graph page of the client and then sends a graph page address to the server, for example, a deployment instruction for creating a monitoring alarm index may be generated on the server page, the server may invoke the client in the rest manner, and then the client executes the deployment instruction to create the alarm index. When the monitoring index fails, the client synchronizes the alarm information to the server.

It should be noted that, as a result, all operations of deploying instructions by the client are to generate instructions at the server, and then the client is called to actually complete the instructions, the user does not need to configure the monitoring components at the client one by one, and only needs to operate at the server, and the client automatically deploys the monitoring components, so that the technical problem that in the existing monitoring scheme of the software system, the user needs to manually modify different monitoring components through the client for many times, which results in low monitoring efficiency of the software system, is solved.

Optionally, the deployment instruction at least includes: and adding an alarm index instruction and an alarm rule instruction.

Optionally, the apparatus further comprises: and the backup unit is used for carrying out database backup on the deployment instruction.

The present application further provides a computer device comprising a memory and a processor, the memory having stored thereon a computer program that, when executed by the processor, causes the method of any one of the embodiments to be performed.

The present application also provides a non-transitory computer-readable storage medium having stored thereon a computer program that, when executed by a processor, causes the method of any one of the embodiment to be performed.

It will be understood that the specific features, operations and details described herein above with respect to the method of the present invention may be similarly applied to the apparatus and system of the present invention, or vice versa. In addition, each step of the method of the present invention described above may be performed by a respective component or unit of the device or system of the present invention.

It should be understood that the various modules/units of the apparatus of the present invention may be implemented in whole or in part by software, hardware, firmware, or a combination thereof. The modules/units may be embedded in the processor of the computer device in the form of hardware or firmware or independent from the processor, or may be stored in the memory of the computer device in the form of software for being called by the processor to execute the operations of the modules/units. Each of the modules/units may be implemented as a separate component or module, or two or more modules/units may be implemented as a single component or module.

In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored thereon computer instructions executable by the processor, the computer instructions, when executed by the processor, instructing the processor to perform the steps of the method of the invention. The computer device may broadly be a server, a terminal, or any other electronic device having the necessary computing and/or processing capabilities. In one embodiment, the computer device may include a processor, memory, a network interface, a communication interface, etc., connected by a system bus. The processor of the computer device may be used to provide the necessary computing, processing and/or control capabilities. The memory of the computer device may include non-volatile storage media and internal memory. An operating system, a computer program, and the like may be stored in or on the non-volatile storage medium. The internal memory may provide an environment for the operating system and the computer programs in the non-volatile storage medium to run. The network interface and the communication interface of the computer device may be used to connect and communicate with an external device through a network. Which when executed by a processor performs the steps of the method for charging a battery of the invention.

The invention may be implemented as a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, causes the steps of the method of the invention to be performed. In one embodiment, the computer program is distributed across a plurality of computer devices or processors coupled by a network such that the computer program is stored, accessed, and executed by one or more computer devices or processors in a distributed fashion. A single method step/operation, or two or more method steps/operations, may be performed by a single computer device or processor or by two or more computer devices or processors. One or more method steps/operations may be performed by one or more computer devices or processors, and one or more other method steps/operations may be performed by one or more other computer devices or processors. One or more computer devices or processors may perform a single method step/operation, or perform two or more method steps/operations.

It will be appreciated by those of ordinary skill in the art that the method steps of the present invention may be directed to associated hardware, such as a computer device or processor, for performing the steps of the present invention by a computer program, which may be stored in a non-transitory computer readable storage medium, which when executed causes the steps of the present invention to be performed. Any reference herein to memory, storage, databases, or other media may include non-volatile and/or volatile memory, as appropriate. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (prom), electrically programmable ROM (eprom), electrically erasable programmable ROM (eeprom), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, hard disk, solid state disk, and the like. Examples of volatile memory include Random Access Memory (RAM), external cache memory, and the like.

The respective technical features described above may be arbitrarily combined. Although not all possible combinations of features are described, any combination of features should be considered to be covered by the present specification as long as there is no contradiction between such combinations.

Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:推理服务平台的运行方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!