Process monitoring method and device, equipment and medium
By automating the generation and management of monitoring scripts, abnormal core processes can be monitored and restarted in real time, solving the problems of low efficiency and high cost in traditional process monitoring solutions, and achieving efficient and accurate core process monitoring and abnormal recovery.
Patent Information
- Application Number
- CN202511604093.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-03-03
AI Technical Summary
Traditional process monitoring solutions rely on manually written monitoring scripts, which leads to low efficiency, susceptibility to human error, high development costs, and difficulty in effectively monitoring and protecting core processes, especially in the inability to recover in a timely manner under abnormal circumstances.
A process monitoring method is provided, which generates monitoring conditions based on the selected monitoring condition template and parameters by displaying a monitoring template generation page, automatically generates and sends monitoring scripts to the target server, monitors core processes in real time, and automatically restarts core processes in abnormal situations.
It improves the efficiency and accuracy of monitoring core processes, reduces development costs, ensures that core processes can recover in a timely manner under abnormal conditions, and reduces human error and maintenance difficulty.
Smart Images

Figure CN121597512A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network security, specifically to a process monitoring method, apparatus, device, and medium. Background Technology
[0002] With the rapid development of information technology, servers are playing an increasingly important role in various business scenarios. Core processes, as the key to server operation, directly affect the performance and user experience of the entire system. However, in actual operation, due to various unforeseen factors such as hardware failures, software defects, and network fluctuations, core processes may malfunction, leading to service interruptions or performance degradation. Therefore, how to effectively monitor and protect core processes to ensure timely recovery in abnormal situations has become a pressing issue for the industry.
[0003] Traditional process monitoring solutions typically rely on manually written monitoring scripts. Furthermore, technical personnel may need to write different monitoring scripts for different core processes and server environments. Therefore, this approach suffers from problems such as low efficiency, susceptibility to human error, and high development costs. Summary of the Invention
[0004] This application provides a process monitoring method, apparatus, device, and medium to improve the accuracy of monitoring scripts, increase the monitoring efficiency of core processes, and reduce development costs.
[0005] Firstly, this application provides a process monitoring method, the method comprising:
[0006] In response to a process monitoring command for a target server, a page for generating a monitoring template is displayed, wherein the monitoring template includes multiple monitoring condition templates;
[0007] In response to each first selection instruction triggered on the generation page, the selected monitoring condition template and the parameters corresponding to the monitoring condition template are determined based on the first selection instruction, and monitoring conditions are generated based on the monitoring condition template and the parameters corresponding to the monitoring condition template.
[0008] In response to the completion command, process monitoring task information is generated based on at least one monitoring condition;
[0009] Based on the monitoring condition template of the process monitoring task information, a target monitoring condition template that is the same as the monitoring condition template of the process monitoring task information is determined in the set monitoring script template. Based on the parameters in the process monitoring task information, the parameters corresponding to the target monitoring condition template of the set monitoring script template are updated to obtain the target monitoring script.
[0010] The target monitoring script is sent to the target server so that the target server can monitor its core processes by executing the target monitoring script.
[0011] In this embodiment, in response to a process monitoring instruction for a target server, a generation page including multiple monitoring condition templates is displayed. Based on each first selection instruction triggered on the generation page, monitoring conditions are generated based on the selected monitoring condition template and corresponding parameters. Based on at least one monitoring condition, process monitoring task information for the target server is generated. Based on the process monitoring task information and the set monitoring script template, the target monitoring script is determined and sent to the target server. This eliminates the need for manual writing of monitoring scripts, ensures the accuracy of monitoring scripts, improves the efficiency and accuracy of monitoring core processes, and reduces development costs.
[0012] In one possible embodiment, after generating the process monitoring task information, the method further includes:
[0013] In response to a modification instruction for process monitoring task information of the target server, a modification page for each monitoring condition, including the process monitoring task information, is displayed.
[0014] In response to each second selection instruction triggered on the modification page, based on the second selection instruction, the selected monitoring condition template and the parameters corresponding to the monitoring condition template are determined, and based on the selected monitoring condition template and the parameters corresponding to the monitoring condition template, the corresponding monitoring conditions in the process monitoring task information are modified.
[0015] In response to the modification completion instruction, the modified process monitoring task information is obtained based on the process monitoring task information and at least one modified monitoring condition.
[0016] In one possible embodiment, after generating the process monitoring task information, the method further includes:
[0017] In response to the deletion instruction for the process monitoring task information of the target server, the process monitoring task information of the target server is deleted.
[0018] In one possible embodiment, after sending the target monitoring script to the target server, the method further includes:
[0019] Receive process exception information sent by the target server, wherein the process exception information is sent by the target server after it detects an abnormal core process during the execution of the target monitoring script;
[0020] Based on the process exception information and the established correspondence, the retry strategy for the exception core process is determined, wherein the established correspondence includes the correspondence between each core process and each retry strategy.
[0021] Send the retry policy of the abnormal core process to the target server so that the target server restarts the abnormal core process based on the retry policy of the abnormal core process;
[0022] If a restart success message is received from the target server, it is determined that the abnormal core process has restarted successfully. The restart success message is sent by the target server after determining that the number of restarts of the abnormal core process within a set time period is less than or equal to a set threshold, and the abnormal core process has restarted successfully.
[0023] In one possible embodiment, after sending the retry policy for the abnormal core process to the target server, the method further includes:
[0024] If a restart failure message is received from the target server, it is determined that the abnormal core process has failed to restart. The restart failure message is sent by the target server after it determines that the number of restarts of the abnormal core process within the set time period is greater than a set threshold and the abnormal core process has failed to restart.
[0025] The restart failure message is sent to the client so that the user can handle the abnormal core process.
[0026] Secondly, this application provides a process monitoring device, the device comprising:
[0027] The display module is used to respond to a process monitoring command for the target server and display a generation page including a monitoring template, wherein the monitoring template includes multiple monitoring condition templates.
[0028] The first generation module is configured to respond to each first selection instruction triggered on the generation page, determine the selected monitoring condition template and the parameters corresponding to the monitoring condition template based on the first selection instruction, and generate monitoring conditions based on the monitoring condition template and the parameters corresponding to the monitoring condition template.
[0029] The second generation module is used to generate process monitoring task information based on at least one monitoring condition in response to the generation completion instruction.
[0030] The update module is used to determine, based on the monitoring condition template of the process monitoring task information, a target monitoring condition template in the set monitoring script template that is the same as the monitoring condition template of the process monitoring task information, and update the parameters corresponding to the target monitoring condition template of the set monitoring script template based on the parameters in the process monitoring task information to obtain the target monitoring script.
[0031] The sending module is used to send the target monitoring script to the target server, so that the target server can monitor the core processes of the target server by executing the target monitoring script.
[0032] Thirdly, this application provides an electronic device, comprising:
[0033] Memory, used to store program instructions;
[0034] A processor is configured to invoke program instructions stored in the memory and execute the steps of the method described in any one of the first aspects according to the obtained program instructions.
[0035] Fourthly, this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in any one of the first aspects.
[0036] Fifthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of the first aspects. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;
[0038] Figure 2 A flowchart illustrating a process monitoring method provided in this application embodiment;
[0039] Figure 3 A detailed flowchart of a process monitoring method provided in an embodiment of this application;
[0040] Figure 4 A schematic diagram of a process monitoring task information management page provided in an embodiment of this application;
[0041] Figure 5 This is a schematic diagram of a process monitoring task information generation page provided in an embodiment of this application;
[0042] Figure 6This is a schematic diagram of the generated page after the user has finished editing, provided in an embodiment of this application.
[0043] Figure 7 This is a schematic diagram of another process monitoring task information management page provided in an embodiment of this application;
[0044] Figure 8 A flowchart illustrating a method for modifying process monitoring task information of a target server, provided in an embodiment of this application;
[0045] Figure 9 This is a schematic diagram of the process monitoring task information modification page provided in an embodiment of this application;
[0046] Figure 10 This is a schematic diagram of the modified page for process monitoring task information provided in an embodiment of this application;
[0047] Figure 11 A schematic diagram of the display page for process monitoring task information of server B provided in an embodiment of this application;
[0048] Figure 12 This is a schematic diagram of the process monitoring task information management page after deleting the process monitoring task information of server C, as provided in an embodiment of this application.
[0049] Figure 13 A flowchart illustrating an abnormal core process restart method provided in this application embodiment;
[0050] Figure 14 A structural diagram of a process monitoring device provided in an embodiment of this application;
[0051] Figure 15 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0053] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and the embodiments of this application do not impose limitations.
[0054] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that in the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0055] The acquisition, transmission, storage, and use of data in this application all comply with relevant national laws and regulations.
[0056] Before introducing the process monitoring method provided in the embodiments of this application, for ease of understanding, the technical background of the embodiments of this application will be described in detail below.
[0057] With the rapid development of information technology, servers are playing an increasingly important role in various business scenarios. Core processes, as the key to server operation, directly affect the performance and user experience of the entire system. However, in actual operation, due to various unforeseen factors such as hardware failures, software defects, and network fluctuations, core processes may malfunction, leading to service interruptions or performance degradation. Therefore, how to effectively monitor and protect core processes to ensure timely recovery in abnormal situations has become a pressing issue for the industry.
[0058] Traditional process monitoring solutions typically rely on manually written monitoring scripts, which are then deployed on servers running core processes. These scripts are designed to run in real-time to continuously monitor the running status of core processes. However, if the monitoring scripts themselves are flawed or improperly configured, they can lead to false positives or false negatives, placing additional workload and psychological pressure on operators. Furthermore, technical personnel may need to write different monitoring scripts for different core processes and server environments. Therefore, this approach suffers from inefficiency, susceptibility to human error, and high development costs.
[0059] To address the aforementioned issues, this application proposes a process monitoring method, apparatus, device, and medium to improve the accuracy of monitoring scripts, enhance the monitoring efficiency of core processes, and reduce development costs.
[0060] First refer to Figure 1 This is a schematic diagram illustrating an application scenario of this application, including a user device 11, a script manager 12, and a target server 13. The user device 11 and the script manager 12 communicate via a network, which can be a local area network (LAN), a wide area network (WAN), etc. The user device 11 can be a portable device (e.g., a mobile phone, tablet, laptop computer), or a personal computer (PC). The script manager 12 and the target server 13 communicate via a network. There can be one or more target servers 13, which are servers whose core processes need to be monitored. The process monitoring method provided in this application is applied to the script manager 12. The script manager 12 can be a server, which can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and big data and artificial intelligence platforms. User 10 logs into script manager 12 through a client installed on user device 11. The client can be a web browser or an application client installed on a mobile user device, such as a mobile phone or tablet.
[0061] In this embodiment, as an optional implementation, the script manager 12, in response to a process monitoring instruction for the target server 13 triggered by the user 10's client on the user device 11, displays a generation page including a monitoring template, wherein the monitoring template includes multiple monitoring condition templates; in response to each first selection instruction triggered by the user 10's client on the user device 11, it determines the selected monitoring condition template and the parameters corresponding to the monitoring condition template based on the first selection instruction, and generates monitoring conditions based on the monitoring condition template and the parameters corresponding to the monitoring condition template; in response to a generation completion instruction triggered by the user 10's client on the user device 11, it generates process monitoring task information based on at least one monitoring condition; based on the monitoring condition template of the process monitoring task information, it determines a target monitoring condition template in the set monitoring script template that is the same as the monitoring condition template of the process monitoring task information, and updates the parameters corresponding to the target monitoring condition template of the set monitoring script template based on the parameters in the process monitoring task information to obtain a target monitoring script; and sends the target monitoring script to the target server 13. The target server 13 receives the target monitoring script sent by the script manager 12, executes the target monitoring script, and monitors the core processes of the target server 13.
[0062] The following is for reference. Figure 2 The flowchart shown illustrates a process monitoring method, which clarifies the technical solution provided in the embodiments of this application.
[0063] Step 201: In response to a process monitoring command for the target server, display a page that includes the generation of a monitoring template.
[0064] The monitoring templates include multiple monitoring condition templates, such as server name, server description, core process name, monitoring frequency, communication method, monitoring indicators, and alarm thresholds. The aforementioned process monitoring instructions can be used to generate process monitoring task information, instructing the generation of process monitoring task information for the target server.
[0065] Step 202: In response to each first selection instruction triggered on the generation page, determine the selected monitoring condition template and the parameters corresponding to the monitoring condition template based on the first selection instruction, and generate monitoring conditions based on the monitoring condition template and the parameters corresponding to the monitoring condition template.
[0066] Each monitoring condition includes a monitoring condition template and corresponding parameters. For example, a monitoring condition might include {core process name, core process A}, where the monitoring condition template is the core process name and the corresponding parameter is core process A.
[0067] Step 203: In response to the completion command, generate process monitoring task information based on at least one monitoring condition.
[0068] Step 204: Based on the monitoring condition template of the process monitoring task information, determine the target monitoring condition template in the set monitoring script template that is the same as the monitoring condition template of the process monitoring task information, and update the parameters corresponding to the target monitoring condition template of the set monitoring script template based on the parameters in the process monitoring task information to obtain the target monitoring script.
[0069] The monitoring script templates are set according to the actual situation.
[0070] Step 205: Send the target monitoring script to the target server so that the target server can monitor the core processes of the target server by executing the target monitoring script.
[0071] In this embodiment, the script manager can send the target monitoring script to the target server using a set communication method. The script manager can also send the target monitoring script to the target server using the communication method specified in the target monitoring script.
[0072] In this embodiment, in response to a process monitoring instruction for a target server, a generation page including multiple monitoring condition templates is displayed. Based on each first selection instruction triggered on the generation page, monitoring conditions are generated based on the selected monitoring condition template and corresponding parameters. Based on at least one monitoring condition, process monitoring task information for the target server is generated. Based on the process monitoring task information and the set monitoring script template, the target monitoring script is determined and sent to the target server. This eliminates the need for manually writing monitoring scripts, improving the efficiency and accuracy of monitoring core processes and reducing development costs.
[0073] The following will provide a detailed explanation of the specific steps involved in the process monitoring method described above, such as... Figure 3 As shown:
[0074] Step 301: In response to a process monitoring command for the target server, display a page that includes the generation of monitoring templates.
[0075] The monitoring templates include multiple monitoring condition templates. In response to a user-triggered process monitoring command for the target server, this application can open a pop-up window to display a generation page containing multiple monitoring condition templates.
[0076] Step 302: In response to each first selection instruction triggered on the generation page, determine the selected monitoring condition template and the parameters corresponding to the monitoring condition template based on the first selection instruction, and generate monitoring conditions based on the monitoring condition template and the parameters corresponding to the monitoring condition template.
[0077] In this embodiment of the application, a monitoring condition can be obtained by manually setting the parameters corresponding to the monitoring condition template by the user, based on the monitoring condition template and the parameters corresponding to the monitoring condition template.
[0078] In this embodiment of the application, at least one monitoring condition can also be obtained by using a file imported by the user, which includes at least one monitoring condition template and the parameters corresponding to the monitoring condition template, based on the at least one monitoring condition template and the parameters corresponding to the monitoring condition template in the file.
[0079] In this embodiment, users can set parameters corresponding to basic monitoring condition templates, such as monitoring frequency and alarm thresholds. These parameters directly affect the monitoring effectiveness and response speed of core processes. Users need to set these monitoring condition template parameters reasonably according to actual needs and system environment to ensure that the script manager can effectively protect core processes.
[0080] Additionally, users can define parameters for monitoring condition templates related to the core processes that need protection. These parameters will reflect which processes are critical and require special attention and protection. By clearly defining the parameters for monitoring condition templates related to the core processes that need protection, the script manager can more accurately monitor and protect these processes, avoiding wasting resources on non-core processes.
[0081] Users can also configure the communication method between the script manager and the target server. This includes selecting a suitable communication protocol, setting the communication port, and authentication method. Only by ensuring unimpeded communication between the script manager and the target server can the script manager successfully dispatch target monitoring scripts to the target server and receive the target server's status information in real time.
[0082] Step 303: In response to the completion command, process monitoring task information is generated based on at least one monitoring condition.
[0083] The process monitoring task information includes at least one monitoring condition, and each monitoring condition includes a monitoring condition template and the parameters corresponding to the monitoring condition template.
[0084] Step 304: Based on the monitoring condition template of the process monitoring task information, determine the target monitoring condition template that is the same as the monitoring condition template of the process monitoring task information in the set monitoring script template.
[0085] The monitoring script template can be set according to the actual situation.
[0086] Since the process monitoring task information includes at least one monitoring condition template, determining the target monitoring condition template in the set monitoring script template that is identical to the monitoring condition template in the process monitoring task information, based on the monitoring condition template in the process monitoring task information, includes: matching each monitoring condition template with the set monitoring script template to determine the target monitoring condition template in the set monitoring script template that is identical to each monitoring condition template. The number of monitoring condition templates included in the process monitoring task information in this application is the same as the number of target monitoring condition templates in the set monitoring script templates. If the process monitoring task information includes one monitoring condition template, the number of target monitoring condition templates is one. If the process monitoring task information includes multiple monitoring condition templates, the number of target monitoring condition templates is multiple.
[0087] Step 305: Based on the parameters in the process monitoring task information, update the parameters corresponding to the target monitoring condition template of the set monitoring script template to obtain the target monitoring script.
[0088] In this embodiment of the application, updating the parameters corresponding to the target monitoring condition template of the set monitoring script template based on the parameters in the process monitoring task information to obtain the target monitoring script includes: updating the parameters corresponding to the target monitoring condition template of the set monitoring script template to the parameters in the process monitoring task information to obtain the target monitoring script.
[0089] In this embodiment of the application, if the parameters corresponding to the target monitoring condition template of the set monitoring script template are the same as the parameters in the process monitoring task information, then the parameters corresponding to the target monitoring condition template of the set monitoring script template remain unchanged.
[0090] For example, the process monitoring task information includes a monitoring condition template of monitoring frequency, with a parameter of 20 seconds / time. This monitoring condition template is matched against a set monitoring script template to determine the target monitoring condition template in the set monitoring script template that matches this monitoring condition template as the monitoring frequency. If the parameter corresponding to the monitoring frequency of the set monitoring script template is 30 seconds / time, then based on the parameter corresponding to the monitoring frequency in the process monitoring task information, the parameter corresponding to the monitoring frequency of the set monitoring script template is updated to 20 seconds / time. If the parameter corresponding to the monitoring frequency of the set monitoring script template is 20 seconds / time, then the parameter corresponding to the monitoring frequency of the set monitoring script template remains unchanged at 20 seconds / time.
[0091] Step 306: Send the target monitoring script to the target server so that the target server can monitor the core processes of the target server by executing the target monitoring script.
[0092] The target monitoring script is crucial for monitoring core processes. It typically includes functions such as core process detection, status reporting, and exception handling. Through these functions, the target monitoring script can monitor the running status of core processes in real time, promptly identifying and addressing potential problems. To ensure the target monitoring script runs correctly on the target server, the script manager grants it the appropriate execution permissions. This is a necessary step because without proper permissions, the target monitoring script will be unable to access or modify the state of the core processes, nor will it be able to perform the necessary operations to protect them.
[0093] After receiving the target monitoring script from the script manager, the script manager will run it in real time on the target server, starting to monitor the status of the core processes. This means that the script manager will continuously check key indicators such as the existence, normal operation, and resource usage of the core processes. If any anomalies or problems are found, the script manager will immediately record the relevant information and report the status information to the script manager, so that users can understand the running status of the core processes in a timely manner and take appropriate measures to protect the security and stability of the core processes when necessary.
[0094] For example, Figure 4 This is a schematic diagram of a process monitoring task information management page provided in an embodiment of this application, such as... Figure 4 As shown, this is a schematic diagram of the process monitoring task information management page. This page displays process monitoring task information for server A, server B, server C, and server D. Each server's process monitoring task information includes server name, server description, core process name, monitoring frequency, communication method, monitoring indicators, alarm thresholds, and other monitoring condition templates and corresponding parameters. Users can access different subpages to manage the process monitoring task information for each server by clicking the "Modify," "Delete," and "Detailed Query" buttons. Users can also generate new server process monitoring task information by clicking the "Add" button. Furthermore, users can search for corresponding server process monitoring task information based on the parameters of the monitoring condition template, or filter for server process monitoring task information that meets set conditions.
[0095] Figure 5 This is a schematic diagram of a process monitoring task information generation page provided in an embodiment of this application. When the user... Figure 4 Clicking the "Add" button on the displayed page triggers a process monitoring task information generation command for the target server or a process monitoring command for the target server. The generated page displayed is as follows: Figure 5As shown, the generation page displays multiple monitoring condition templates, including server name, server description, core process name, monitoring frequency, communication method, monitoring metrics, and alarm thresholds. Users can set the corresponding parameters based on the monitoring condition templates on this generation page to obtain at least one monitoring condition for the target server. Figure 6 This is a schematic diagram of the generated page after the user has finished editing, as provided in the embodiments of this application. Figure 6 As shown, the user sets the server name parameter to Server E, the communication method to Communication Method 1, the core process name parameter to Core Process d1, and the monitoring frequency parameter to 15 seconds / time, thus obtaining multiple monitoring conditions. After confirming the editing, clicking the "Save" button triggers a completion command, generating process monitoring task information for Server E based on multiple monitoring conditions. The user can also click the "Save and Continue" button to save at least one edited monitoring condition and continue setting parameters for at least one monitoring condition template. The user can also click the "Cancel" button to cancel the generation of process monitoring task information for Server E. Figure 7 This is a schematic diagram of another process monitoring task information management page provided in an embodiment of this application, such as... Figure 7 As shown, the user is Figure 6 After clicking the "Save" button on the displayed page, the newly generated process monitoring task information for server E will be displayed on the process monitoring task information management page.
[0096] In this embodiment, in response to a user-triggered instruction to generate process monitoring task information for a target server, at least one monitoring condition is obtained based on the user's editing operation on the generation page, which includes multiple monitoring condition templates. Based on the at least one monitoring condition, process monitoring task information for the target server is generated. This eliminates the need for manual coding by technical personnel, thereby enabling flexible management of process monitoring task information, improving the efficiency of generating process monitoring task information for the target server, and reducing workload.
[0097] Traditional process monitoring solutions typically rely on manually written monitoring scripts, which are then deployed on servers running core processes. These monitoring programs are designed to run in real-time to continuously monitor the operational status of core processes. Furthermore, deploying customized monitoring scripts requires custom development for different core processes and server environments, which not only increases initial development costs but also raises the difficulty of subsequent maintenance. As business grows and technology evolves, the monitoring scripts may need frequent adjustments and optimizations to ensure they accurately monitor the status of core processes and respond promptly to anomalies.
[0098] To address the aforementioned problems, embodiments of this application provide a method for modifying process monitoring task information of a target server. After generating process monitoring task information, this application allows modification of that information. Figure 8 A flowchart illustrating a method for modifying process monitoring task information of a target server, as provided in this application embodiment, is shown below. Figure 8 As shown, it includes at least the following steps 801-803:
[0099] Step 801: In response to the instruction to modify the process monitoring task information for the target server, display a page for modifying each monitoring condition, including the process monitoring task information.
[0100] The process monitoring task information includes at least one monitoring condition, and each monitoring condition includes a monitoring condition template and the parameters corresponding to the monitoring condition template.
[0101] Step 802: In response to each second selection instruction triggered on the modification page, based on the second selection instruction, determine the selected monitoring condition template and the parameters corresponding to the monitoring condition template, and based on the selected monitoring condition template and the parameters corresponding to the monitoring condition template, modify the corresponding monitoring conditions in the process monitoring task information.
[0102] In this embodiment of the application, the second selection instruction triggered by the user on the modification page can be an instruction to delete some monitoring conditions in the process monitoring task information, an instruction to add new monitoring conditions, or an instruction to update the parameters corresponding to the monitoring condition template in the process monitoring task information.
[0103] Step 803: In response to the modification completion instruction, obtain the modified process monitoring task information based on the process monitoring task information and at least one modified monitoring condition.
[0104] Specifically, based on process monitoring task information and at least one modified monitoring condition, modified process monitoring task information is obtained, including: based on unmodified monitoring conditions in the process monitoring task information and at least one modified monitoring condition, modified process monitoring task information is obtained.
[0105] In this embodiment, based on the monitoring conditions modified by the user, the process monitoring task information of the target server is modified to obtain the modified process monitoring task information, thereby realizing the modification of the process monitoring task information of the target server and realizing flexible management of the process monitoring task information, improving modification efficiency, reducing development costs, and reducing workload and maintenance difficulty.
[0106] For example, Figure 9 This is a schematic diagram of the process monitoring task information modification page provided in the embodiments of this application. When the user... Figure 4When the "Modify" button corresponding to server A is clicked on the displayed page, a command to modify the process monitoring task information for server A is triggered, and the modification page displayed is as follows: Figure 9 As shown, this page displays multiple monitoring conditions included in the process monitoring task information for server A. Users can modify, add, and delete these monitoring conditions. Figure 10 This is a schematic diagram of the modified page for process monitoring task information provided in an embodiment of this application, such as... Figure 10 As shown, the user changes the monitoring frequency in the process monitoring task information of server A from "10" to "15"; adds a server description as "Description of Server A"; and deletes the number 2, the monitoring indicator A2, and the alarm threshold a2. Based on each second selection instruction triggered by the user on the modification page, the selected monitoring condition template and its corresponding parameters are determined, and the corresponding monitoring conditions in the process monitoring task information are modified accordingly. After the user confirms the modification, they can click the "Save" button to trigger the modification completion instruction, obtaining the modified process monitoring task information based on the process monitoring task information and at least one modified monitoring condition. The user can also click the "Save and Continue" button to save the current monitoring conditions and continue modifying the process monitoring task information of server A. The user can also click the "Cancel" button to cancel the current modification of the process monitoring task information of server A.
[0107] In this embodiment of the application, after generating process monitoring task information, the method further includes: displaying the process monitoring task information of the target server in response to a process monitoring task information display instruction for the target server.
[0108] For example, such as Figure 4 As shown, this page displays process monitoring task information for server A, server B, server C, and server D. When the user clicks the "Details Inquiry" button for server B, the process monitoring task information for server B is displayed. Figure 11 This is a schematic diagram of the display page for process monitoring task information of server B provided in an embodiment of this application, as shown below. Figure 11 As shown, this page displays process monitoring task information for server B. This process monitoring task information includes multiple monitoring conditions, namely monitoring condition templates and corresponding parameters.
[0109] In this embodiment of the application, after generating process monitoring task information, the method further includes deleting the process monitoring task information of the target server in response to a deletion instruction for process monitoring task information of the target server.
[0110] For example, such as Figure 4 As shown, this page displays process monitoring task information for server A, server B, server C, and server D. When the user clicks the "Delete" button corresponding to server C, a deletion command is triggered for the process monitoring task information of server C, thus deleting the process monitoring task information of server C. Figure 12 This is a schematic diagram of the process monitoring task information management page after deleting the process monitoring task information of server C, as provided in this embodiment of the application. The page displayed after deleting the process monitoring task information of server C is as follows: Figure 12 As shown, this page displays process monitoring task information for servers A, B, and D.
[0111] In this embodiment of the application, in response to the deletion instruction for the process monitoring task information of the target server, the process monitoring task information of the target server is deleted, thereby realizing flexible management of process monitoring task information, improving development efficiency, reducing development costs, and reducing workload and maintenance difficulty.
[0112] Traditional process monitoring solutions typically rely on manually written monitoring scripts, deployed on servers running core processes. These scripts are designed to run in real-time, continuously monitoring the core processes' operational status. They assess the health of the core processes by collecting and analyzing server performance metrics, log information, and core process behavior data. Once any anomalies that might affect the normal operation of the core processes are detected, such as process crashes, performance degradation, or resource exhaustion, the monitoring scripts immediately log relevant information. This information typically includes the time, type, scope of impact, and possible causes of the anomaly, providing crucial clues for subsequent problem analysis and resolution.
[0113] Besides recording anomaly information, monitoring scripts can also notify operators of abnormal situations in several ways. A common method is through reporting, sending anomaly information to a unified management platform or monitoring system. These platforms can aggregate, analyze, and display anomaly information, helping technicians quickly understand the overall system's operational status. Another method is through monitoring platform retrieval, where the monitoring platform proactively requests the latest status information from the monitoring script. This method allows for more flexible and real-time monitoring, ensuring technicians can obtain critical anomaly information immediately. Regardless of the method used, once an anomaly alarm is received, technicians need to intervene manually as soon as possible to restore the normal operation of core processes and prevent further deterioration of the problem.
[0114] The above-mentioned process monitoring method is inefficient and poses a risk of service interruption and data loss due to abnormal core processes.
[0115] To address the aforementioned technical problems, this application provides a method for restarting an abnormal core process. In this method, after sending the target monitoring script to the target server, the script continuously monitors the running status of the core process as it runs in real-time on the target server. This includes checking key indicators such as process existence, normal operation, and resource usage. Upon detecting an anomaly, such as process crash or performance degradation, the target monitoring script immediately records relevant information, obtaining process anomaly information. The script manager receives the process anomaly information sent by the target server via a preset communication method and triggers a restart program to attempt to restart the abnormal core process. Figure 13 A flowchart of an abnormal core process restart method provided in this application embodiment is shown below. Figure 13 As shown, it includes at least the following steps 131-134:
[0116] Step 131: Receive process exception information sent by the target server.
[0117] The process exception information is sent by the target server after detecting an abnormal core process during the execution of the target monitoring script. The target server can send the process exception information to the script manager using a configured communication method. Alternatively, the target server can use the communication method specified in the target monitoring script to send the process exception information to the script manager.
[0118] Step 132: Based on the process exception information and the set correspondence, determine the retry strategy for the abnormal core process.
[0119] The defined correspondences include the relationships between each core process and each retry policy. These correspondences can be set according to actual needs. The retry policies for each core process can be the same or different. Each core process's retry policy includes a set threshold, which represents the maximum number of restarts allowed for that core process within a defined time period.
[0120] In this embodiment of the application, the process exception information includes at least one exception core process. Based on the process exception information and the set correspondence, the retry strategy of the exception core process is determined, including: for any exception core process, based on any exception core process in the process exception information and the set correspondence, the retry strategy of any exception core process is determined.
[0121] Step 133: Send the retry policy of the abnormal core process to the target server so that the target server can restart the abnormal core process based on the retry policy of the abnormal core process.
[0122] In this embodiment, the script manager can send the retry policy of the abnormal core process to the target server using a set communication method. The script manager can also send the retry policy of the abnormal core process to the target server using the communication method in the target monitoring script.
[0123] Optionally, after sending the retry policy for the abnormal core process to the target server, the method further includes: if a restart failure message is received from the target server, it is determined that the abnormal core process has failed to restart, wherein the restart failure message is sent by the target server after determining that the number of restarts of the abnormal core process within a set time period is greater than a set threshold and the abnormal core process has failed to restart; and the restart failure message is sent to the client so that the user can handle the abnormal core process.
[0124] The retry strategy for abnormal core processes includes setting thresholds. Restart failure information includes the name of the abnormal core process and the reason for the error.
[0125] Step 134: If a restart success message is received from the target server, it is determined that the abnormal core process has restarted successfully.
[0126] The restart success message is sent by the target server after determining that the number of restarts of the abnormal core process within a set time period is less than or equal to a set threshold, and the abnormal core process restarts successfully. The restart success message includes information such as the name of the abnormal core process, a restart success identifier, and the restart success time.
[0127] In this embodiment, as the target monitoring script runs in real time on the target server, the running status of each core process is continuously monitored. This includes checking key indicators such as process existence, normal operation, and resource usage. Once the target server detects an abnormal core process during the execution of the target monitoring script, it generates process exception information and reports it to the script manager. This ensures that technical personnel can promptly understand the running status of the core processes and take appropriate measures to protect their security and stability when necessary. The script manager receives the process exception information from the target server, determines the retry strategy for the abnormal core process based on the process exception information and the established correspondence, and sends the retry strategy to the target server so that the target server attempts to restart the core process. This application can quickly take action when a core process malfunctions, attempting to restore its normal operation, thereby reducing the possibility of human intervention and improving the efficiency and accuracy of monitoring. If the restart fails, the script manager receives the restart failure information from the target server and sends it to the client. This way, even if the restart operation fails, technical personnel can promptly understand the abnormal situation through the client and further analyze and handle it. This automated processing mechanism improves system stability and reliability, and reduces the risk of service interruption and data loss due to core process anomalies.
[0128] Based on the same inventive concept, embodiments of this application provide a process monitoring device, please refer to... Figure 14 The device includes:
[0129] Display module 141 is used to display a generation page including a monitoring template in response to a process monitoring command for a target server, wherein the monitoring template includes multiple monitoring condition templates.
[0130] The first generation module 142 is configured to respond to each first selection instruction triggered on the generation page, determine the selected monitoring condition template and the parameters corresponding to the monitoring condition template based on the first selection instruction, and generate monitoring conditions based on the monitoring condition template and the parameters corresponding to the monitoring condition template.
[0131] The second generation module 143 is used to generate process monitoring task information based on at least one monitoring condition in response to the generation completion instruction.
[0132] The update module 144 is used to determine, based on the monitoring condition template of the process monitoring task information, a target monitoring condition template in the set monitoring script template that is the same as the monitoring condition template of the process monitoring task information, and update the parameters corresponding to the target monitoring condition template of the set monitoring script template based on the parameters in the process monitoring task information to obtain the target monitoring script.
[0133] The sending module 145 is used to send the target monitoring script to the target server so that the target server can monitor the core processes of the target server by executing the target monitoring script.
[0134] As an optional implementation, after generating the process monitoring task information, the second generation module 143 is further configured to:
[0135] In response to a modification instruction for process monitoring task information of the target server, a modification page for each monitoring condition, including the process monitoring task information, is displayed.
[0136] In response to each second selection instruction triggered on the modification page, based on the second selection instruction, the selected monitoring condition template and the parameters corresponding to the monitoring condition template are determined, and based on the selected monitoring condition template and the parameters corresponding to the monitoring condition template, the corresponding monitoring conditions in the process monitoring task information are modified.
[0137] In response to the modification completion instruction, the modified process monitoring task information is obtained based on the process monitoring task information and at least one modified monitoring condition.
[0138] As an optional implementation, after generating the process monitoring task information, the second generation module 143 is further configured to:
[0139] In response to the deletion instruction for the process monitoring task information of the target server, the process monitoring task information of the target server is deleted.
[0140] As an optional implementation, after sending the target monitoring script to the target server, the sending module 145 is further configured to:
[0141] Receive process exception information sent by the target server, wherein the process exception information is sent by the target server after it detects an abnormal core process during the execution of the target monitoring script;
[0142] Based on the process exception information and the established correspondence, the retry strategy for the exception core process is determined, wherein the established correspondence includes the correspondence between each core process and each retry strategy.
[0143] Send the retry policy of the abnormal core process to the target server so that the target server restarts the abnormal core process based on the retry policy of the abnormal core process;
[0144] If a restart success message is received from the target server, it is determined that the abnormal core process has restarted successfully. The restart success message is sent by the target server after determining that the number of restarts of the abnormal core process within a set time period is less than or equal to a set threshold, and the abnormal core process has restarted successfully.
[0145] As an optional implementation, after sending the retry policy of the abnormal core process to the target server, the sending module 145 is further configured to:
[0146] If a restart failure message is received from the target server, it is determined that the abnormal core process has failed to restart. The restart failure message is sent by the target server after it determines that the number of restarts of the abnormal core process within the set time period is greater than a set threshold and the abnormal core process has failed to restart.
[0147] The restart failure message is sent to the client so that the user can handle the abnormal core process.
[0148] Based on the same inventive concept, this application provides an electronic device that can realize the function of the process monitoring device described above. Please refer to... Figure 15 The device includes a processor 151 and a memory 152, wherein the memory 152 is used to store program instructions;
[0149] The processor 151 calls the program instructions stored in the memory and executes the program instructions to achieve the following steps:
[0150] In response to a process monitoring command for a target server, a page for generating a monitoring template is displayed, wherein the monitoring template includes multiple monitoring condition templates;
[0151] In response to each first selection instruction triggered on the generation page, the selected monitoring condition template and the parameters corresponding to the monitoring condition template are determined based on the first selection instruction, and monitoring conditions are generated based on the monitoring condition template and the parameters corresponding to the monitoring condition template.
[0152] In response to the completion command, process monitoring task information is generated based on at least one monitoring condition;
[0153] Based on the monitoring condition template of the process monitoring task information, a target monitoring condition template that is the same as the monitoring condition template of the process monitoring task information is determined in the set monitoring script template. Based on the parameters in the process monitoring task information, the parameters corresponding to the target monitoring condition template of the set monitoring script template are updated to obtain the target monitoring script.
[0154] The target monitoring script is sent to the target server so that the target server can monitor its core processes by executing the target monitoring script.
[0155] The processor 151 calls the program instructions stored in the memory and executes the program instructions to implement the process monitoring method provided in the above embodiments.
[0156] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium. The computer program product includes computer program code, which, when executed on a computer, causes the computer to perform any of the process monitoring methods discussed above. Since the principle by which the above-described computer-readable storage medium solves the problem is similar to that of the process monitoring methods, the implementation of the above-described computer-readable storage medium can be found in the implementation of the methods, and repeated details will not be elaborated further.
[0157] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute any of the process monitoring methods discussed above. Since the principle by which the above computer program product solves the problem is similar to that of the process monitoring method, the implementation of the above computer program product can be referred to the implementation of the method, and repeated details will not be described again.
[0158] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0159] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0160] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0161] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of user-operated steps to be executed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0162] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A process monitoring method, characterized in that, The method includes: In response to a process monitoring command for a target server, a page for generating a monitoring template is displayed, wherein the monitoring template includes multiple monitoring condition templates; In response to each first selection instruction triggered on the generation page, the selected monitoring condition template and the parameters corresponding to the monitoring condition template are determined based on the first selection instruction, and monitoring conditions are generated based on the monitoring condition template and the parameters corresponding to the monitoring condition template. In response to the completion command, process monitoring task information is generated based on at least one monitoring condition; Based on the monitoring condition template of the process monitoring task information, a target monitoring condition template that is the same as the monitoring condition template of the process monitoring task information is determined in the set monitoring script template. Based on the parameters in the process monitoring task information, the parameters corresponding to the target monitoring condition template of the set monitoring script template are updated to obtain the target monitoring script. The target monitoring script is sent to the target server so that the target server can monitor its core processes by executing the target monitoring script.
2. The method as described in claim 1, characterized in that, After generating the process monitoring task information, it also includes: In response to a modification instruction for process monitoring task information of the target server, a modification page for each monitoring condition, including the process monitoring task information, is displayed. In response to each second selection instruction triggered on the modification page, based on the second selection instruction, the selected monitoring condition template and the parameters corresponding to the monitoring condition template are determined, and based on the selected monitoring condition template and the parameters corresponding to the monitoring condition template, the corresponding monitoring conditions in the process monitoring task information are modified. In response to the modification completion instruction, the modified process monitoring task information is obtained based on the process monitoring task information and at least one modified monitoring condition.
3. The method as described in claim 1, characterized in that, After generating the process monitoring task information, it also includes: In response to the deletion instruction for the process monitoring task information of the target server, the process monitoring task information of the target server is deleted.
4. The method as described in claim 1, characterized in that, After sending the target monitoring script to the target server, the process further includes: Receive process exception information sent by the target server, wherein the process exception information is sent by the target server after it detects an abnormal core process during the execution of the target monitoring script; Based on the process exception information and the established correspondence, the retry strategy for the exception core process is determined, wherein the established correspondence includes the correspondence between each core process and each retry strategy. Send the retry policy of the abnormal core process to the target server so that the target server restarts the abnormal core process based on the retry policy of the abnormal core process; If a restart success message is received from the target server, it is determined that the abnormal core process has restarted successfully. The restart success message is sent by the target server after determining that the number of restarts of the abnormal core process within a set time period is less than or equal to a set threshold, and the abnormal core process has restarted successfully.
5. The method as described in claim 4, characterized in that, After sending the retry policy for the abnormal core process to the target server, the method further includes: If a restart failure message is received from the target server, it is determined that the abnormal core process has failed to restart. The restart failure message is sent by the target server after it determines that the number of restarts of the abnormal core process within the set time period is greater than a set threshold and the abnormal core process has failed to restart. The restart failure message is sent to the client so that the user can handle the abnormal core process.
6. A process monitoring device, characterized in that, The device includes: The display module is used to respond to a process monitoring command for the target server and display a generation page including a monitoring template, wherein the monitoring template includes multiple monitoring condition templates. The first generation module is configured to respond to each first selection instruction triggered on the generation page, determine the selected monitoring condition template and the parameters corresponding to the monitoring condition template based on the first selection instruction, and generate monitoring conditions based on the monitoring condition template and the parameters corresponding to the monitoring condition template. The second generation module is used to generate process monitoring task information based on at least one monitoring condition in response to the generation completion instruction. The update module is used to determine, based on the monitoring condition template of the process monitoring task information, a target monitoring condition template in the set monitoring script template that is the same as the monitoring condition template of the process monitoring task information, and update the parameters corresponding to the target monitoring condition template of the set monitoring script template based on the parameters in the process monitoring task information to obtain the target monitoring script. The sending module is used to send the target monitoring script to the target server, so that the target server can monitor the core processes of the target server by executing the target monitoring script.
7. The apparatus as claimed in claim 6, characterized in that, After generating the process monitoring task information, the second generation module is further used for: In response to a modification instruction for process monitoring task information of the target server, a modification page for each monitoring condition, including the process monitoring task information, is displayed. In response to each second selection instruction triggered on the modification page, based on the second selection instruction, the selected monitoring condition template and the parameters corresponding to the monitoring condition template are determined, and based on the selected monitoring condition template and the parameters corresponding to the monitoring condition template, the corresponding monitoring conditions in the process monitoring task information are modified. In response to the modification completion instruction, the modified process monitoring task information is obtained based on the process monitoring task information and at least one modified monitoring condition.
8. An electronic device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method according to any one of claims 1-5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-5.
10. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of claims 1-5.