Middleware service monitoring method and device, equipment, medium and program product
By converting the original monitoring data of the middleware into a preset monitoring format and writing it to the monitoring system, the problems of complex and costly monitoring methods in the traditional middleware service are solved, and a simplified monitoring process and reduced development costs are achieved.
Patent Information
- Application Number
- CN202510133827.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-06-17
AI Technical Summary
Traditional middleware service monitoring methods require cumbersome secondary development, which increases development complexity and cost.
By obtaining the original monitoring data of the middleware, converting its format into the preset monitoring format required by the monitoring system, obtaining the target monitoring data, and writing it to the monitoring system to monitor the working status of the middleware.
There is no need to perform secondary development of middleware, which reduces the difficulty and development cost of service monitoring and realizes effective interaction between middleware and monitoring system.
Smart Images

Figure CN120162212A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of middleware, and particularly to a service monitoring method, device, equipment, medium, and program product for middleware. Background Art
[0002] Middleware plays a key role in modern distributed system architectures, making application development and deployment more flexible, reliable, and scalable. When more and more middleware is used in services, effective monitoring of middleware becomes particularly important.
[0003] In traditional methods, in order to incorporate the running status of middleware products into the monitoring system, cumbersome secondary development work often needs to be carried out and connected to the monitoring system. This process not only increases the complexity of development work but also raises the development cost. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a service monitoring method, device, equipment, medium, and program product for middleware that reduces the development difficulty of middleware and the cost required for development.
[0005] In a first aspect, this application provides a service monitoring method for middleware, including:
[0006] Obtaining the original monitoring data of the middleware;
[0007] Converting the format of the original monitoring data into a preset monitoring format to obtain target monitoring data;
[0008] Writing the target monitoring data into the monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data.
[0009] In one embodiment, converting the format of the original monitoring data into a preset monitoring format to obtain target monitoring data includes: obtaining the current format of the original monitoring data; determining the target conversion mode required to convert the current format into the preset monitoring format; and converting the original monitoring data into the preset monitoring format according to the target conversion mode to obtain target monitoring data.
[0010] In one embodiment, determining the target conversion mode required to convert the current format into the preset monitoring format includes: converting the original monitoring data from the current format into a reference format to obtain reference monitoring data; determining the target conversion mode required to convert the reference format into the preset monitoring format; correspondingly, converting the original monitoring data into the preset monitoring format according to the target conversion mode to obtain target monitoring data includes: converting the reference monitoring data into the preset monitoring format according to the target conversion mode to obtain target monitoring data.
[0011] In one embodiment, the reference format is obtained through the following steps: obtaining sample monitoring data with different preset reference formats; for the sample monitoring data of each preset reference format, obtaining conversion performance data corresponding to converting the sample monitoring data into a preset monitoring format; and selecting a reference format from different preset reference formats according to the conversion performance data.
[0012] In one embodiment, obtaining the original monitoring data of the middleware includes: executing a timing task, and generating a data acquisition instruction when the timing task is completed; in response to the data acquisition instruction, obtaining the original monitoring data of the middleware based on the monitoring interface of the middleware.
[0013] In one embodiment, obtaining the original monitoring data of the middleware based on the monitoring interface includes: generating an error log when the original monitoring data of the middleware has not been obtained within a preset time period; after a set time, repeatedly obtaining the original monitoring data of the middleware until the number of repeated acquisitions reaches a preset number of repetitions or the original monitoring data of the middleware is successfully obtained; when the number of repeated acquisitions reaches the preset number of repetitions, obtaining the connection status of the monitoring interface; and when the connection status is a connected state, re-obtaining the original monitoring data of the middleware.
[0014] In a second aspect, the present application further provides a service monitoring device for middleware, including:
[0015] A first acquisition module for obtaining the original monitoring data of the middleware;
[0016] A conversion module for converting the format of the original monitoring data into a preset monitoring format to obtain target monitoring data;
[0017] A writing module for writing the target monitoring data into the monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data.
[0018] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0019] Obtaining the original monitoring data of the middleware;
[0020] Converting the format of the original monitoring data into a preset monitoring format to obtain target monitoring data;
[0021] Writing the target monitoring data into the monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data.
[0022] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0023] Obtain the original monitoring data of the middleware;
[0024] Convert the format of the original monitoring data into a preset monitoring format to obtain target monitoring data;
[0025] Write the target monitoring data into the monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data.
[0026] In a fifth aspect, the present application also provides a computer program product, including a computer program, which when executed by a processor implements the following steps:
[0027] Obtain the original monitoring data of the middleware;
[0028] Convert the format of the original monitoring data into a preset monitoring format to obtain target monitoring data;
[0029] Write the target monitoring data into the monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data.
[0030] The above service monitoring method, device, equipment, medium and program product of the middleware break the inherent thinking bondage of secondary development of the middleware in the traditional thinking, and blaze a new trail to establish an interactive bridge between the middleware and the monitoring system. By obtaining the original monitoring data of the middleware, converting the original monitoring data into the preset monitoring format required by the monitoring system to obtain the target monitoring data, and then writing the target monitoring data into the monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data. Based on the above steps, there is no need to perform secondary development on the middleware, which reduces the difficulty of service monitoring for the middleware and also reduces the development cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained without creative efforts based on these drawings.
[0032] Figure 1 It is a schematic flowchart of the service monitoring method of the middleware in an embodiment;
[0033] Figure 2 It is a schematic flowchart of the format conversion step of the original monitoring data in an embodiment;
[0034] Figure 3Schematic flowchart of the determination steps for the reference format in an embodiment;
[0035] Figure 4 Schematic flowchart of the service monitoring method for middleware in another embodiment;
[0036] Figure 5 Block diagram of the service monitoring device for middleware in an embodiment;
[0037] Figure 6 Internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0038] In order to make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] In one embodiment, as Figure 1 shown, a service monitoring method for middleware is provided. In this embodiment, it is exemplified that the method is applied to a terminal. It can be understood that the method can also be applied to a server and can also be applied to a system including a terminal and a server and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0040] S110. Obtain the original monitoring data of the middleware.
[0041] Among them, middleware can be understood as a type of computer software that connects software components and applications. It uses the basic services or functions provided by the system software to connect various parts of the application system on the network or different applications, and can achieve the purpose of resource sharing and function sharing. Middleware can be configured on the operating system to manage computing resources and network communication and provide an operating and development environment for upper-layer application software.
[0042] Among them, the original monitoring data can be understood as the data obtained by real-time monitoring and recording the operating status, performance, and resource usage of the middleware.
[0043] In an optional embodiment, the original monitoring data can be obtained from the middleware. In another optional embodiment, the middleware can also be configured with a data exporter, so that the original monitoring data can be obtained from the data exporter of the middleware.
[0044] In an optional embodiment, obtaining the original monitoring data of the middleware includes: executing a timing task, and generating a data acquisition instruction when the timing task is completed; in response to the data acquisition instruction, obtaining the original monitoring data of the middleware based on the monitoring interface of the middleware.
[0045] Optionally, the timing task can be set according to actual requirements. For example, the timing task can include at least one of the following tasks: when the current time reaches the timing time, start a timed response; start a timed response at a preset frequency. Among them, the preset frequency can be set by technicians according to needs or experience, and the present application does not make any limitation thereto. In the above steps, by configuring the timing task, the automatic acquisition of the original monitoring data is achieved through the timed response.
[0046] Optionally, based on the monitoring interface of the middleware, obtaining the original monitoring data of the middleware can include the following steps: when the original monitoring data of the middleware is not obtained within a preset time period, generate an error log; after a set time, repeatedly obtain the original monitoring data of the middleware until the number of repeated acquisitions reaches a preset number of repeated acquisitions or the original monitoring data of the middleware is successfully obtained; among them, the preset time period, the set time, and the preset number of repeated acquisitions can be set by technicians according to needs or experience, and the present application does not make any limitation thereto.
[0047] Optionally, when the number of repeated acquisitions reaches the preset number of repeated acquisitions, the connection status with the monitoring interface can be obtained; when the connection status is a connected state, re-obtain the original monitoring data of the middleware. Thereby, multiple invalid data extraction operations are avoided, and resource occupation is reduced.
[0048] In the above steps, by generating an error log when the original monitoring data of the middleware is not obtained within a preset time period, it is convenient for later review or sorting out the error cause, so as to perform optimization and adjustment. By repeatedly obtaining the original monitoring data of the middleware after a set time, on the one hand, a certain response time can be given to the middleware, and on the other hand, the automatic repeated acquisition method is adopted, which is beneficial to improving work efficiency.
[0049] S120. Convert the format of the original monitoring data into a preset monitoring format to obtain target monitoring data.
[0050] Among them, the preset monitoring format can be understood as a format that can be recognized by the monitoring system. The preset monitoring format can be set according to actual requirements.
[0051] In particular, the monitoring system can be a Prometheus monitoring system. The Prometheus monitoring system can be understood as an open-source monitoring and alarm system, which can be used in cloud-native and distributed environments. On this basis, the monitoring system can also be paired with the Grafana platform to further visually monitor and analyze the working status of the middleware. The Grafana platform can be understood as an open-source data visualization and dashboard platform.
[0052] Correspondingly, the preset monitoring format can be the OTel (OpenTelemetry) format. The OTel format is an open-source network protocol mainly used for data transmission and network services and is applicable to monitoring systems.
[0053] S130. Write the target monitoring data into the monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data.
[0054] In an alternative embodiment, the write address of the monitoring system can be obtained, and based on the write address, the target monitoring data is written into the monitoring system.
[0055] The service monitoring method for the middleware provided by the embodiments of the present application breaks the inherent thinking constraint of secondary development of the middleware in the traditional idea, and finds a new way to build an interactive bridge between the middleware and the monitoring system. This interactive bridge can be understood as a general monitoring agent. By obtaining the original monitoring data of the middleware, converting the original monitoring data into the preset monitoring format required by the monitoring system to obtain the target monitoring data, and then writing the target monitoring data into the monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data. In the above steps, there is no need to perform secondary development on the middleware, which reduces the difficulty of service monitoring for the middleware and also reduces the development cost.
[0056] Based on the technical solutions of the above embodiments, the present application also provides an alternative embodiment, in which the format conversion step of the original monitoring data is refined.
[0057] See Figure 2 The format conversion step of the original monitoring data shown includes:
[0058] S210. Obtain the current format of the original monitoring data.
[0059] Among them, the current format can be understood as the original data format of the original monitoring data obtained from the middleware. For example, it can be the Prometheus format or the json (JavaScript Object Notation) format, etc. The present application does not make any limitation on the specific format type of the current format.
[0060] S220. Determine the target conversion mode required to convert the current format into the preset monitoring format.
[0061] In an alternative embodiment, different preset reference formats can be selected in advance, and for each preset reference format, a conversion mode for converting the preset reference format into the preset monitoring format is formulated.
[0062] Exemplarily, the preset reference formats include the Prometheus format and the json format. Correspondingly, the preset conversion modes may include a first conversion mode and a second conversion mode. Among them, the first conversion mode is used to convert the Prometheus format into the OTel format, and the second conversion mode is used to convert the json format into the OTel format. In addition, according to actual requirements, the required conversion modes can be added or updated. This application does not make any limitations on the preset conversion modes.
[0063] S230. Convert the original monitoring data into a preset monitoring format according to the target conversion mode to obtain the target monitoring data.
[0064] In an alternative embodiment, in the case where the required target conversion mode is not determined, the current format can also be converted into a reference format, so that based on the corresponding conversion mode, the reference format is converted into a preset monitoring format. Among them, determining the target conversion mode required to convert the current format into a preset monitoring format includes: converting the original monitoring data from the current format into a reference format to obtain reference monitoring data; determining the target conversion mode required to convert the reference format into a preset monitoring format. Correspondingly, converting the original monitoring data into a preset monitoring format according to the target conversion mode to obtain the target monitoring data includes: converting the reference monitoring data into a preset monitoring format according to the target conversion mode to obtain the target monitoring data.
[0065] In the embodiments provided in this application, in the case where the target conversion mode cannot be determined, converting the current format into a reference format enables the determination of the target conversion mode from the preset conversion modes, so that according to the target conversion mode, the reference monitoring data is converted into a preset monitoring format to obtain the target monitoring data, improving the adaptability of the service monitoring method for the middleware.
[0066] Based on the technical solutions of the above embodiments, this application also provides an alternative embodiment, in which the determination steps of the reference format are refined.
[0067] See Figure 3 The determination steps of the reference format shown include:
[0068] S310. Obtain sample monitoring data with different preset reference formats.
[0069] Among them, the preset reference formats may include at least one of the Prometheus format, the json format, etc. The sample monitoring data can be obtained from the historical monitoring data of the middleware.
[0070] S320. For the sample monitoring data of each preset reference format, obtain the conversion performance data corresponding to converting the sample monitoring data into the preset monitoring format.
[0071] Among them, the conversion performance data may include at least one of conversion speed, conversion accuracy, etc. The present application does not make any limitation on the specific data type of the conversion performance data.
[0072] S330. Select a reference format from different preset reference formats according to the conversion performance data.
[0073] In an optional embodiment, there may be multiple pieces of sample monitoring data for each preset reference format. Selecting a reference format from different preset reference formats according to the conversion performance data may include: determining the average conversion performance data of the corresponding preset reference format for the conversion performance data of each preset reference format; selecting a reference format from different preset reference formats according to the average conversion performance data. Among them, the average conversion performance data may include at least one of average conversion speed, average conversion accuracy, etc.
[0074] Exemplarily, selecting a reference format from different preset reference formats according to the average conversion performance data may include: determining the maximum average conversion speed from the average conversion speeds corresponding to all preset reference formats; using the preset reference format corresponding to the maximum average conversion speed as the reference format.
[0075] Exemplarily, selecting a reference format from different preset reference formats according to the average conversion performance data may include: obtaining the first index weight value of the average conversion speed and the second index weight value of the average conversion accuracy; for each preset reference format, determining the comprehensive score of the preset reference format according to the average conversion speed, average conversion accuracy, first index weight value, and second index weight value corresponding to the preset reference format; determining the maximum comprehensive score from all comprehensive scores; using the preset reference format corresponding to the maximum comprehensive score as the reference format.
[0076] In the embodiments provided by the present application, by obtaining the conversion performance data corresponding to converting each preset reference format into the preset monitoring format, the preset reference format corresponding to the optimal conversion performance data can be used as the reference format according to actual needs. Through the above steps, the conversion performance of converting the format of the original monitoring data into the preset monitoring format is improved, and the optimization of the conversion process is realized.
[0077] Based on the technical solutions of the above embodiments, the present application also provides an optional embodiment, in which a specific implementation manner of another middleware service monitoring method is provided.
[0078] See Figure 4Another service monitoring method for middleware, comprising:
[0079] S401. Execute a timing task, and generate a data acquisition instruction when the timing task is completed.
[0080] S402. In response to the data acquisition instruction, obtain the original monitoring data of the middleware based on the monitoring interface of the middleware.
[0081] S403. Generate an error log when the original monitoring data of the middleware is not obtained within a preset time period.
[0082] S404. After a set time, repeatedly obtain the original monitoring data of the middleware until the number of repeated acquisitions reaches a preset number of repetitions or the original monitoring data of the middleware is successfully obtained.
[0083] S405. When the number of repeated acquisitions reaches the preset number of repetitions, obtain the connection status with the monitoring interface.
[0084] S406. When the connection status is a connected state, re-obtain the original monitoring data of the middleware.
[0085] S407. Obtain the current format of the original monitoring data.
[0086] S408. Determine the target conversion mode required to convert the current format to a preset monitoring format.
[0087] S409. Convert the original monitoring data to the preset monitoring format according to the target conversion mode to obtain the target monitoring data.
[0088] S410. Write the target monitoring data into the monitoring system so that the monitoring system can monitor the working status of the middleware according to the target monitoring data.
[0089] The detailed technical content of the above steps S401 - S410 has been recorded in the above example and will not be elaborated here.
[0090] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0091] Based on the same inventive concept, an embodiment of the present application also provides a service monitoring device for a middleware for implementing the service monitoring method of the middleware involved above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the service monitoring device for the middleware provided below can refer to the limitations on the service monitoring method of the middleware in the above text, and will not be repeated here.
[0092] In an exemplary embodiment, as Figure 5 shown, a service monitoring device for a middleware is provided, including: a first acquisition module 510, a conversion module 520, and a writing module 530, where:
[0093] The first acquisition module 510 is configured to acquire the original monitoring data of the middleware.
[0094] The conversion module 520 is configured to convert the format of the original monitoring data into a preset monitoring format to obtain target monitoring data.
[0095] The writing module 530 is configured to write the target monitoring data into the monitoring system so that the monitoring system monitors the working state of the middleware according to the target monitoring data.
[0096] In an embodiment, the conversion module 520 includes: a first acquisition unit configured to acquire the current format of the original monitoring data; a first determination unit configured to determine the target conversion mode required to convert the current format into a preset monitoring format; and a first conversion unit configured to convert the original monitoring data into a preset monitoring format according to the target conversion mode to obtain target monitoring data.
[0097] In one embodiment, the first determination unit includes: a first conversion subunit, configured to convert the original monitoring data from the current format to a reference format to obtain reference monitoring data; a first determination subunit, configured to determine a target conversion mode required to convert the reference format to a preset monitoring format. Correspondingly, the first conversion unit includes: a second conversion subunit, configured to convert the reference monitoring data to the preset monitoring format according to the target conversion mode to obtain target monitoring data.
[0098] In one embodiment, it further includes: a second acquisition module, configured to acquire sample monitoring data with different preset reference formats; a third acquisition module, configured to, for the sample monitoring data of each preset reference format, acquire conversion performance data corresponding to converting the sample monitoring data to the preset monitoring format; a selection module, configured to select a reference format from different preset reference formats according to the conversion performance data.
[0099] In one embodiment, the first acquisition module 510 includes: a first processing unit, configured to execute a timing task and generate a data acquisition instruction when the timing task is completed; a second acquisition unit, configured to, in response to the data acquisition instruction, acquire the original monitoring data of the middleware based on the monitoring interface of the middleware.
[0100] In one embodiment, the second acquisition unit includes: a first generation subunit, configured to generate an error log when the original monitoring data of the middleware has not been acquired within a preset time period; a third acquisition unit, configured to, after a set time, repeatedly acquire the original monitoring data of the middleware until the repeated acquisition times reach a preset repeated number or the original monitoring data of the middleware is successfully acquired; a fourth acquisition unit, configured to, when the repeated acquisition times reach the preset repeated number, acquire the connection status with the monitoring interface; a fifth acquisition unit, configured to, when the connection status is a connected status, re-acquire the original monitoring data of the middleware.
[0101] Each module in the above service monitoring device of the middleware can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above respective modules.
[0102] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 6As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it realizes a service monitoring method for middleware. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse, etc.
[0103] Those skilled in the art can understand that Figure 6 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0104] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:
[0105] Obtain the original monitoring data of the middleware;
[0106] Convert the format of the original monitoring data into a preset monitoring format to obtain target monitoring data;
[0107] Write the target monitoring data into the monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data.
[0108] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtaining the current format of the original monitoring data; determining the target conversion mode required to convert the current format into a preset monitoring format; and converting the original monitoring data into the preset monitoring format according to the target conversion mode to obtain the target monitoring data.
[0109] In one embodiment, when the processor executes the computer program, the following steps are further implemented: converting the original monitoring data from the current format into a reference format to obtain reference monitoring data; determining the target conversion mode required to convert the reference format into a preset monitoring format; and converting the reference monitoring data into the preset monitoring format according to the target conversion mode to obtain the target monitoring data.
[0110] In one embodiment, when the processor executes the computer program, the following steps are further implemented: obtaining sample monitoring data with different preset reference formats; for the sample monitoring data of each preset reference format, obtaining the conversion performance data corresponding to converting the sample monitoring data into the preset monitoring format; and selecting a reference format from different preset reference formats according to the conversion performance data.
[0111] In one embodiment, when the processor executes the computer program, the following steps are further implemented: executing a timing task, and generating a data acquisition instruction when the timing task is completed; and in response to the data acquisition instruction, obtaining the original monitoring data of the middleware based on the monitoring interface of the middleware.
[0112] In one embodiment, when the processor executes the computer program, the following steps are further implemented: generating an error log when the original monitoring data of the middleware is not obtained within a preset time period; after a set time, repeatedly obtaining the original monitoring data of the middleware until the number of repeated acquisitions reaches a preset number of repetitions or the original monitoring data of the middleware is successfully obtained; obtaining the connection status with the monitoring interface when the number of repeated acquisitions reaches the preset number of repetitions; and re-obtaining the original monitoring data of the middleware when the connection status is a connected state.
[0113] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0114] Obtaining the original monitoring data of the middleware;
[0115] Converting the format of the original monitoring data into a preset monitoring format to obtain target monitoring data;
[0116] Writing the target monitoring data into the monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data.
[0117] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining the current format of the original monitoring data; determining a target conversion mode required to convert the current format into a preset monitoring format; and converting the original monitoring data into the preset monitoring format according to the target conversion mode to obtain target monitoring data.
[0118] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: converting the original monitoring data from the current format into a reference format to obtain reference monitoring data; determining a target conversion mode required to convert the reference format into a preset monitoring format; and converting the reference monitoring data into the preset monitoring format according to the target conversion mode to obtain target monitoring data.
[0119] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining sample monitoring data with different preset reference formats; for the sample monitoring data of each preset reference format, obtaining conversion performance data corresponding to converting the sample monitoring data into a preset monitoring format; and selecting a reference format from different preset reference formats according to the conversion performance data.
[0120] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: executing a timing task, and generating a data acquisition instruction when the timing task is completed; and in response to the data acquisition instruction, obtaining the original monitoring data of the middleware based on the monitoring interface of the middleware.
[0121] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: generating an error log when the original monitoring data of the middleware is not obtained within a preset time period; after a set time, repeatedly obtaining the original monitoring data of the middleware until the repeated acquisition times reach a preset number of repeated acquisitions or the original monitoring data of the middleware is successfully obtained; obtaining the connection status with the monitoring interface when the repeated acquisition times reach the preset number of repeated acquisitions; and re-obtaining the original monitoring data of the middleware when the connection status is a connected state.
[0122] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor, implements the following steps:
[0123] Obtaining the original monitoring data of the middleware;
[0124] Converting the format of the original monitoring data into a preset monitoring format to obtain target monitoring data;
[0125] Writing the target monitoring data into a monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data.
[0126] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining the current format of the original monitoring data; determining a target conversion mode required to convert the current format into a preset monitoring format; and converting the original monitoring data into the preset monitoring format according to the target conversion mode to obtain target monitoring data.
[0127] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining the current format of the original monitoring data; determining a target conversion mode required to convert the current format into a preset monitoring format; and converting the original monitoring data into the preset monitoring format according to the target conversion mode to obtain target monitoring data.
[0128] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: converting the original monitoring data from the current format into a reference format to obtain reference monitoring data; determining a target conversion mode required to convert the reference format into a preset monitoring format; and converting the reference monitoring data into the preset monitoring format according to the target conversion mode to obtain target monitoring data.
[0129] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: obtaining sample monitoring data with different preset reference formats; for the sample monitoring data of each preset reference format, obtaining conversion performance data for converting the sample monitoring data into the corresponding preset monitoring format; and selecting a reference format from different preset reference formats according to the conversion performance data.
[0130] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: executing a timing task, and generating a data acquisition instruction when the timing task is completed; and in response to the data acquisition instruction, obtaining the original monitoring data of the middleware based on the monitoring interface of the middleware.
[0131] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: generating an error log when the original monitoring data of the middleware is not obtained within a preset time period; after a set time, repeatedly obtaining the original monitoring data of the middleware until the repeated acquisition times reach a preset repeated number or the original monitoring data of the middleware is successfully obtained; when the repeated acquisition times reach the preset repeated number, obtaining the connection status with the monitoring interface; and when the connection status is a connected state, re-obtaining the original monitoring data of the middleware.
[0132] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0133] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in the present application.
[0134] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A service monitoring method for middleware, characterized in that: The method comprises: Get the original monitoring data of the middleware; Converting the format of the original monitoring data into a preset monitoring format to obtain target monitoring data; The target monitoring data is written into a monitoring system, so that the monitoring system monitors the working status of the middleware according to the target monitoring data.
2. The method according to claim 1, characterized in that: The converting the format of the original monitoring data into a preset monitoring format to obtain target monitoring data includes: Obtaining the current format of the original monitoring data; Determining a target conversion mode required to convert the current format into a preset monitoring format; According to the target conversion mode, the original monitoring data is converted into a preset monitoring format to obtain target monitoring data.
3. The method according to claim 2, characterized in that The determining of the target conversion mode required to convert the current format into the preset monitoring format includes: Converting the original monitoring data from the current format to a reference format to obtain reference monitoring data; Determining a target conversion mode required to convert the reference format into the preset monitoring format; Accordingly, the original monitoring data is converted into a preset monitoring format according to the target conversion mode to obtain target monitoring data, including: According to the target conversion mode, the reference monitoring data is converted into a preset monitoring format to obtain target monitoring data.
4. The method according to claim 3, characterized in that The reference format is obtained by the following steps: Obtaining sample monitoring data in different preset reference formats; For each sample monitoring data in a preset reference format, obtaining conversion performance data corresponding to converting the sample monitoring data into the preset monitoring format; A reference format is selected from different preset reference formats according to the conversion performance data.
5. The method according to any one of claims 1 to 4, characterized in that: The obtaining of the original monitoring data of the middleware includes: Execute a scheduled task, and generate a data acquisition instruction when the scheduled task is completed; In response to the data acquisition instruction, original monitoring data of the middleware is acquired based on the monitoring interface of the middleware.
6. The method according to claim 5, characterized in that The obtaining of original monitoring data of the middleware based on the monitoring interface includes: If the original monitoring data of the middleware is not obtained within a preset time period, an error log is generated; After a set time, repeatedly obtain the original monitoring data of the middleware until the number of repeated acquisitions reaches a preset number of repeated acquisitions or the original monitoring data of the middleware is successfully obtained; When the number of repeated acquisitions reaches a preset number of repeated acquisitions, acquiring a connection status with the monitoring interface; When the connection state is a connected state, the original monitoring data of the middleware is reacquired.
7. A service monitoring device for middleware, characterized in that: The device comprises: The first acquisition module is used to acquire the original monitoring data of the middleware; A conversion module, used to convert the format of the original monitoring data into a preset monitoring format to obtain target monitoring data; The writing module is used to write the target monitoring data into the monitoring system so that the monitoring system monitors the working status of the middleware according to the target monitoring data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.