CN116302796A - Process monitoring method and device, electronic equipment and storage medium - Google Patents

Process monitoring method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116302796A
CN116302796A CN202310119300.0A CN202310119300A CN116302796A CN 116302796 A CN116302796 A CN 116302796A CN 202310119300 A CN202310119300 A CN 202310119300A CN 116302796 A CN116302796 A CN 116302796A
Authority
CN
China
Prior art keywords
monitoring
monitored
task
abnormal
condition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310119300.0A
Other languages
Chinese (zh)
Inventor
肖燕珍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Si Tech Information Technology Co Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN202310119300.0A priority Critical patent/CN116302796A/en
Publication of CN116302796A publication Critical patent/CN116302796A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3017Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is implementing multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses a process monitoring method, a process monitoring device, electronic equipment and a storage medium. The process monitoring method comprises the following steps: acquiring a monitoring task list when a timing event is triggered, and acquiring a task to be monitored from the monitoring task list; determining a process to be monitored according to the task to be monitored, and carrying out abnormal monitoring on the process to be monitored to obtain an abnormal monitoring result; and under the condition that the abnormal monitoring result meets the preset process restarting condition, restarting the process to be monitored. The technical scheme of the embodiment of the invention can automatically monitor the process to be monitored for abnormality, thereby reducing the cost of manual operation and maintenance and improving the stability and high availability of the process to be monitored.

Description

Process monitoring method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a process monitoring method and device, electronic equipment and a storage medium.
Background
With the development of technology, more and more processes run in the same data platform, such as java processes of data collection class in the data platform, redis (Remote Dictionary Server, remote dictionary service) in the data platform, kafka (distributed publish-subscribe messaging system), zookeeper (reliable coordination system of distributed system) and other cluster processes.
Currently, the process in the data platform is monitored by a monitoring system to monitor the state of the process, but when a problem occurs in the process, the process is usually required to be manually processed, so that a great deal of manual operation and maintenance are required.
Disclosure of Invention
The embodiment of the invention provides a process monitoring method, a device, electronic equipment and a storage medium, which can automatically monitor the process to be monitored for abnormality, thereby reducing the cost of manual operation and maintenance and improving the stability and high availability of the process to be monitored.
According to an aspect of the present invention, there is provided a process monitoring method, including:
acquiring a monitoring task list when a timing event is triggered, and acquiring a task to be monitored from the monitoring task list;
determining a process to be monitored according to the task to be monitored, and carrying out abnormal monitoring on the process to be monitored to obtain an abnormal monitoring result;
and under the condition that the abnormal monitoring result meets the preset process restarting condition, restarting the process to be monitored.
According to another aspect of the present invention, there is provided a process monitoring apparatus including:
the monitoring task acquisition module is used for acquiring a monitoring task list when the timing event is triggered, and acquiring a task to be monitored in the monitoring task list;
the process monitoring module is used for determining a process to be monitored according to the task to be monitored and carrying out abnormal monitoring on the process to be monitored to obtain an abnormal monitoring result;
and the process restarting module is used for restarting the process to be monitored under the condition that the abnormal monitoring result meets the preset process restarting condition.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the process monitoring method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a process monitoring method according to any one of the embodiments of the present invention.
According to the technical scheme, the monitoring task list is obtained when the timing event is triggered, the task to be monitored is obtained in the monitoring task list, the process to be monitored is determined according to the task to be monitored, and the process to be monitored is subjected to abnormal monitoring to obtain the abnormal monitoring result, so that the process to be monitored is restarted under the condition that the abnormal monitoring result is determined to meet the preset process restarting condition, the problem of high manual operation and maintenance cost caused by the fact that the existing process monitoring needs manual processing is solved, the process to be monitored can be automatically subjected to abnormal monitoring, the manual operation and maintenance cost is reduced, and the stability and the high availability of the process to be monitored are improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a process monitoring method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a process monitoring method according to a second embodiment of the present invention;
FIG. 3 is a flowchart illustrating a process monitoring method according to a second embodiment of the present invention;
FIG. 4 is a schematic diagram of a process monitoring device according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing a process monitoring method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It is noted that the terms "comprises" and "comprising," and any variations thereof, in the description and claims of the present invention and in the foregoing figures, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a process monitoring method provided in an embodiment of the present invention, where the embodiment is applicable to automatically monitoring a process to be monitored, and the method may be performed by a process monitoring device, where the device may be implemented by software and/or hardware, and may generally be directly integrated into an electronic device for executing the method, where the electronic device may be a terminal device or a server device, and the embodiment of the present invention does not limit a type of electronic device for executing the process monitoring method. Specifically, as shown in fig. 1, the process monitoring method specifically includes the following steps:
s110, acquiring a monitoring task list when the timing event is triggered, and acquiring a task to be monitored from the monitoring task list.
Wherein the event may be a process monitoring event. The timed event may be a pre-set time execution process monitoring event. The monitoring task may be a task that monitors a process. It will be appreciated that one monitoring task may correspond to one process and that different monitoring tasks may correspond to different processes. The monitoring task list may be a list of monitoring tasks. The task to be monitored may be a monitoring task waiting to be executed. It will be appreciated that there may be one or more tasks to be monitored in the monitoring task list, and embodiments of the present invention are not limited in this regard.
In the embodiment of the invention, the monitoring task list can be acquired when the timing event is triggered so as to acquire the task to be monitored in the monitoring task list. It may be understood that the timing event triggering may be triggering a process monitoring event when the time interval reaches a preset time threshold, that is, starting to perform process monitoring on the task to be monitored in the monitored task list.
S120, determining a process to be monitored according to the task to be monitored, and carrying out anomaly monitoring on the process to be monitored to obtain an anomaly monitoring result.
The process to be monitored may be a process waiting to be monitored. The process to be monitored may be an arbitrary linux process, a data acquisition process, or a cluster node process, which is not limited in the embodiment of the present invention. The anomaly monitoring may be monitoring the process to be monitored to determine whether the process to be monitored is anomalous. It may be understood that the exception may be that the process cannot run normally, for example, the process may hang up during the running process, or the process is not started, which is not limited in the embodiment of the present invention. The exception monitoring result may be a result of whether the process to be monitored is abnormal, for example, whether there is an abnormality or no abnormality exists, which is not limited in the embodiment of the present invention.
In the embodiment of the invention, after the task to be monitored is obtained from the monitoring task list, the process to be monitored can be further determined according to the task to be monitored so as to perform abnormal monitoring on the process to be monitored, thereby obtaining an abnormal monitoring result.
S130, restarting the process to be monitored under the condition that the abnormal monitoring result meets a preset process restarting condition.
The preset process restart condition may be a preset condition for restarting a process. The preset process restart condition may be, for example, that an abnormality exists in the process to be monitored, which is not limited in the embodiment of the present invention. The restart process may be a restart process.
In the embodiment of the invention, after the process to be monitored is determined according to the task to be monitored and the process to be monitored is subjected to abnormal monitoring to obtain the abnormal monitoring result, whether the abnormal monitoring result meets the preset process restarting condition or not can be further determined, and when the abnormal monitoring result meets the preset process restarting condition, the process to be monitored is restarted.
For example, assuming that the preset process restart condition is that the process to be monitored is abnormal, and the abnormal monitoring result is that the process to be monitored is abnormal, it is indicated that the abnormal monitoring result meets the preset process restart condition, the process to be monitored can be restarted.
According to the technical scheme, the monitoring task list is obtained when the timing event is triggered, the task to be monitored is obtained in the monitoring task list, the process to be monitored is determined according to the task to be monitored, and the process to be monitored is subjected to abnormal monitoring to obtain an abnormal monitoring result, so that under the condition that the abnormal monitoring result is determined to meet the preset process restarting condition, the process to be monitored is restarted, the problem of high manual operation and maintenance cost caused by the fact that the existing process monitoring needs manual processing is solved, the process to be monitored can be automatically subjected to abnormal monitoring, and therefore the manual operation and maintenance cost is reduced, and the stability and the high availability of the process to be monitored are improved.
Example two
Fig. 2 is a flowchart of a process monitoring method according to a second embodiment of the present invention, where the foregoing technical solutions are further refined, and various specific alternative implementations of performing exception monitoring on the process to be monitored to obtain an exception monitoring result, and performing restarting processing on the process to be monitored are provided. The technical solution in this embodiment may be combined with each of the alternatives in one or more embodiments described above. As shown in fig. 2, the method may include the steps of:
s210, acquiring a monitoring task list when the timing event is triggered, and acquiring a task to be monitored from the monitoring task list.
Optionally, before the triggering of the timing event, the method may further include: determining task information to be configured corresponding to a monitoring task to be configured; the task information to be configured comprises at least one of task process information, task link information and task resource information; task configuration is carried out on the monitoring task to be configured according to the task information to be configured; and storing the monitoring task to be configured into a monitoring task list under the condition that the task configuration is completed.
The monitoring task to be configured may be a monitoring task to be configured. It will be appreciated that each monitoring task may be performed after the configuration is completed. The task information to be configured may be task information corresponding to a monitoring task to be configured. The task process information may be any information of a process corresponding to the monitoring task, for example, may be a process name, a process monitoring command, or a process starting command, which is not limited in the embodiment of the present invention. The task link information may be link information where a process corresponding to the monitoring task is located, for example, may be a process included in the link, or an arrangement sequence of processes in the link, which is not limited in the embodiment of the present invention. The task resource information may be resource information used for monitoring the process operation corresponding to the task, for example, may be server information of the process operation, or memory information occupied by the process operation, which is not limited in the embodiment of the present invention. The task configuration may be to configure a monitoring task to be configured.
Specifically, before the timing event is triggered, task information to be configured corresponding to the monitoring task to be configured can be determined, so that task configuration is performed on the monitoring task to be configured according to the task information to be configured, and the monitoring task to be configured is stored in a monitoring task list when the task configuration is completed. Specifically, the task information to be configured may include at least one of task process information, task link information, and task resource information. It may be appreciated that the task information to be configured may further include other information, for example, a monitoring task name, monitoring task description information, monitoring task status information, and process status information, which is not limited in this embodiment of the present invention.
Optionally, after the monitoring task to be configured is stored in the monitoring task list, operations such as modification, checking, deletion and the like can be performed on the configured monitoring task, so as to update the configured monitoring task.
S220, determining a process to be monitored according to the task to be monitored, and carrying out anomaly monitoring on the process to be monitored to obtain an anomaly monitoring result.
Optionally, performing anomaly monitoring on the process to be monitored to obtain an anomaly monitoring result may include: determining a process monitoring command corresponding to the process to be monitored according to the process to be monitored; and determining a monitoring command result according to the process monitoring command, and determining an abnormal monitoring result according to the monitoring command result.
The process monitoring command may be a command for monitoring a process to be monitored. It may be understood that the process monitoring command may be information that is configured when the task to be monitored is configured, and the process to be monitored may be started to be monitored by executing the process monitoring command. The monitor command result may be a result after the process monitor command is executed. It is understood that the monitoring command result may be a result of the system performing the monitoring command according to the execution of the process monitoring command feedback.
Specifically, after the process to be monitored is determined according to the task to be monitored, a process monitoring command corresponding to the process to be monitored can be further determined according to the process to be monitored, so that a monitoring command result is determined according to the process monitoring command, and an abnormal monitoring result is determined according to the monitoring command result. It can be understood that, according to the process to be monitored, the process monitoring command corresponding to the process to be monitored may be determined by acquiring the process monitoring command in the configuration information corresponding to the process to be monitored. And determining a monitoring command result according to the process monitoring command, which can be a monitoring command result fed back by a system by executing the process monitoring command.
Optionally, determining the abnormal monitoring result according to the monitoring command result may include: under the condition that the monitoring command result does not meet the preset state threshold value, determining that the abnormal monitoring result is abnormal; and under the condition that the monitoring command result meets the preset state threshold value, determining that the abnormal monitoring result is that no abnormality exists.
The preset state threshold may be a preset threshold of a process state. It will be appreciated that different process state thresholds may be preset for different processes.
Specifically, after determining the monitoring command result according to the process monitoring command, it may be further determined whether the monitoring command result meets the preset state threshold, and when the monitoring command result does not meet the preset state threshold, it is determined that the abnormality monitoring result is abnormal, and when the monitoring command result meets the preset state threshold, it is determined that the abnormality monitoring result is not abnormal. For example, assuming that the monitoring command result is 1 and the preset state threshold is 2, it may be determined that the abnormality monitoring result is abnormal. Assuming that the monitoring command result is 2 and the preset state threshold is 2, it may be determined that the abnormality monitoring result is that no abnormality exists.
Optionally, the method may further include: and under the condition that the abnormal monitoring result is that no abnormality exists, returning to execute the operation of acquiring the task to be monitored in the monitoring task list until the task to be monitored does not exist in the monitoring task list.
It is understood that the monitoring task list may include a plurality of tasks to be monitored. And determining that the abnormal monitoring result is that no abnormality exists, and indicating that the process state corresponding to the task to be monitored in the current execution monitoring is normal, acquiring the next task to be monitored from the monitoring task list so as to execute process monitoring on the newly acquired task to be monitored until all the tasks to be monitored in the monitoring task list complete execution of the monitoring task.
For example, assuming that the monitoring task list includes the monitoring task a and the monitoring task B, when it is determined that the abnormal monitoring result of the monitoring task a is that no abnormality exists, the monitoring task B may be acquired to perform process monitoring on the monitoring task B.
S230, restarting the process to be monitored under the condition that the abnormal monitoring result meets a preset process restarting condition.
Optionally, determining that the abnormal monitoring result meets the preset process restart condition may include: and under the condition that the abnormal monitoring result is determined to be abnormal, determining that the abnormal monitoring result meets the preset process restarting condition.
Specifically, when it is determined that the abnormality monitoring result is abnormal, it may be determined that the abnormality monitoring result meets a preset process restart condition, so that the process to be monitored may be further restarted. It can be appreciated that if the abnormality monitoring result is that there is no abnormality, it may be determined that the abnormality monitoring result does not satisfy the preset process restart condition. That is, when the abnormal monitoring result does not meet the preset process restarting condition, the operation of executing the task to be monitored in the monitoring task list may be returned until the task to be monitored does not exist in the monitoring task list.
Optionally, restarting the process to be monitored may include: and determining a process restarting command corresponding to the process to be monitored according to the process to be monitored, and executing the process restarting command.
The process restart command may be a command to restart a process. It will be appreciated that the process restart command may be information that is configured to be completed when the task to be monitored is configured.
Specifically, when it is determined that the abnormal monitoring result meets the preset process restarting condition, a process restarting command corresponding to the process to be monitored can be further determined according to the process to be monitored, so as to execute the process restarting command. It will be appreciated that the process to be monitored for which an exception exists may be restarted by executing a process restart command.
S240, carrying out anomaly monitoring on the process to be monitored to obtain an anomaly monitoring result, and generating alarm prompt information under the condition that the anomaly monitoring result meets the preset alarm condition.
The preset alarm condition may be a preset condition for generating an alarm. The alarm prompt information may be alarm information prompting an operation and maintenance person.
In the embodiment of the invention, after restarting the process to be monitored, the operation of carrying out abnormal monitoring on the process to be monitored to obtain the abnormal monitoring result can be executed again so as to further determine whether the abnormal monitoring result meets the preset alarm condition or not, thereby generating alarm prompt information when the abnormal monitoring result meets the preset alarm condition.
Optionally, determining that the abnormal monitoring result meets the preset alarm condition may include: and under the condition that the abnormal monitoring result is determined to be abnormal, determining that the abnormal monitoring result meets the preset alarm condition. It can be appreciated that if the anomaly monitoring result is that there is no anomaly, it can be determined that the anomaly monitoring result does not meet the preset alarm condition. That is, when the abnormal monitoring result does not meet the preset alarm condition, the operation of executing the task to be monitored in the monitoring task list may be returned until the task to be monitored does not exist in the monitoring task list.
Optionally, after the process to be monitored is restarted, the operation of performing the abnormal monitoring on the process to be monitored to obtain the abnormal monitoring result may be executed again when the restart processing result is received.
Optionally, after the alarm prompt information is generated, the alarm prompt information may be further stored and sent to an operation and maintenance person. It may be appreciated that the alert prompt may be in log form, may be stored in a database, etc., and the embodiments of the present invention are not limited in this regard.
Optionally, the method may further include generating a monitoring record result to record the monitoring record result.
In a specific example of the embodiment of the present invention, fig. 3 is an example flowchart of a process monitoring method provided in the second embodiment of the present invention, and as shown in fig. 3, the method may specifically include:
s310, acquiring files (namely a monitoring task list) from the SCP at fixed time.
S320, determining the first piece of data (namely, the task to be monitored) in the monitoring task list.
S330, executing a monitoring command (namely, performing abnormal monitoring on the process to be monitored).
S340, judging whether abnormality is monitored; if yes, execution is S350, otherwise execution is S390.
S350, updating working state parameters in a basic information table, and setting the working state parameters to 0 (namely, an abnormality monitoring result is that abnormality exists); executing the starting command, simultaneously updating the starting state parameter in the starting information table, and setting the starting state parameter to be 2; the monitoring command is executed again.
S360, judging whether abnormality is monitored; if yes, execution is S370, otherwise execution is S380.
S370, updating a starting state parameter in a starting information table, and setting the starting state parameter to be 2 (namely, an abnormality monitoring result is that abnormality exists); and inserting alarm information into the alarm short message list.
S380, updating a starting state parameter in a starting information table, and setting the starting state parameter to be 1 (namely, the abnormal monitoring result is that no abnormality exists); and updating the working state parameters in the basic information table, and setting the working state parameters to 1 (namely, the abnormality monitoring result is that no abnormality exists).
S390, updating the working state parameter in the basic information table, and setting the working state parameter to be 1.
S3110, determining whether traversing of the monitoring task list is completed, and if not, returning to acquire the next piece of data in the monitoring task list; and if the traversal is completed, ending the monitoring of the process.
According to the technical scheme, the automatic monitoring script is added into the system by configuring the monitoring task and placing the automatic monitoring script in the appointed directory, so that the operation and maintenance cost can be reduced, the response speed of operation and maintenance personnel of the real-time stream processing platform can be improved, and the operation and maintenance pressure can be reduced; when the index of the process or the cluster node is abnormal, the cluster resource abnormality can be reported and reacted at the first time, so that the influence on the service is avoided.
According to the technical scheme, the monitoring task list is obtained when the timing event is triggered, the task to be monitored is obtained in the monitoring task list, the process to be monitored is determined according to the task to be monitored, and the process to be monitored is subjected to abnormal monitoring to obtain an abnormal monitoring result, so that when the abnormal monitoring result meets the preset process restarting condition, the process to be monitored is restarted, the operation of carrying out abnormal monitoring on the process to be monitored to obtain the abnormal monitoring result is executed again, and further, alarm prompt information is generated when the abnormal monitoring result meets the preset alarm condition, the problem that the manual operation and maintenance cost is high due to the fact that the existing process monitoring needs manual processing is solved, the process to be monitored can be automatically subjected to abnormal monitoring, and therefore the manual operation and maintenance cost is reduced, and the stability and the high availability of the process to be monitored are improved.
Example III
Fig. 4 is a schematic diagram of a process monitoring device according to a third embodiment of the present invention, as shown in fig. 4, where the device includes: a monitor task acquisition module 410, a process monitor module 420, and a process restart module 430, wherein:
the monitoring task acquisition module 410 is configured to acquire a monitoring task list when triggered by a timing event, and acquire a task to be monitored in the monitoring task list;
the process monitoring module 420 is configured to determine a process to be monitored according to the task to be monitored, and perform anomaly monitoring on the process to be monitored to obtain an anomaly monitoring result;
and a process restarting module 430, configured to restart the process to be monitored when it is determined that the abnormal monitoring result meets a preset process restarting condition.
According to the technical scheme, the monitoring task list is obtained when the timing event is triggered, the task to be monitored is obtained in the monitoring task list, the process to be monitored is determined according to the task to be monitored, and the process to be monitored is subjected to abnormal monitoring to obtain an abnormal monitoring result, so that under the condition that the abnormal monitoring result is determined to meet the preset process restarting condition, the process to be monitored is restarted, the problem of high manual operation and maintenance cost caused by the fact that the existing process monitoring needs manual processing is solved, the process to be monitored can be automatically subjected to abnormal monitoring, and therefore the manual operation and maintenance cost is reduced, and the stability and the high availability of the process to be monitored are improved.
Optionally, the process restart module 430 may be specifically configured to: and executing the operation of carrying out abnormal monitoring on the process to be monitored again to obtain an abnormal monitoring result, and generating alarm prompt information under the condition that the abnormal monitoring result meets the preset alarm condition.
Optionally, the monitoring task obtaining module 410 may be specifically configured to: determining task information to be configured corresponding to a monitoring task to be configured; the task information to be configured comprises at least one of task process information, task link information and task resource information; task configuration is carried out on the monitoring task to be configured according to the task information to be configured; and storing the monitoring task to be configured into a monitoring task list under the condition that the task configuration is completed.
Alternatively, the process monitoring module 420 may be specifically configured to: determining a process monitoring command corresponding to the process to be monitored according to the process to be monitored; and determining a monitoring command result according to the process monitoring command, and determining an abnormal monitoring result according to the monitoring command result.
Optionally, the process monitoring module 420 may be further configured to: under the condition that the monitoring command result does not meet the preset state threshold value, determining that the abnormal monitoring result is abnormal; accordingly, the process restart module 430 may be further configured to: under the condition that the abnormal monitoring result is determined to be abnormal, determining that the abnormal monitoring result meets the preset process restarting condition; and under the condition that the abnormal monitoring result is determined to be abnormal, determining that the abnormal monitoring result meets the preset alarm condition.
Optionally, the process monitoring module 420 may be further configured to: under the condition that the monitoring command result meets the preset state threshold value, determining that the abnormal monitoring result is that no abnormality exists; and under the condition that the abnormal monitoring result is that no abnormality exists, returning to execute the operation of acquiring the task to be monitored in the monitoring task list until the task to be monitored does not exist in the monitoring task list.
Optionally, the process restart module 430 may be specifically configured to: and determining a process restarting command corresponding to the process to be monitored according to the process to be monitored, and executing the process restarting command.
The process monitoring device provided by the embodiment of the invention can execute the process monitoring method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a process monitoring method.
In some embodiments, the process monitoring method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the process monitoring method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the process monitoring method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A process monitoring method, comprising:
acquiring a monitoring task list when a timing event is triggered, and acquiring a task to be monitored from the monitoring task list;
determining a process to be monitored according to the task to be monitored, and carrying out abnormal monitoring on the process to be monitored to obtain an abnormal monitoring result;
and under the condition that the abnormal monitoring result meets the preset process restarting condition, restarting the process to be monitored.
2. The method of claim 1, further comprising, after the restarting the process to be monitored:
and executing the operation of carrying out abnormal monitoring on the process to be monitored to obtain an abnormal monitoring result again, and generating alarm prompt information under the condition that the abnormal monitoring result meets the preset alarm condition.
3. The method of claim 1, further comprising, prior to the triggering of the timed event:
determining task information to be configured corresponding to a monitoring task to be configured; the task information to be configured comprises at least one of task process information, task link information and task resource information;
performing task configuration on the monitoring task to be configured according to the task information to be configured;
and under the condition that the task configuration is completed, storing the monitoring task to be configured into the monitoring task list.
4. The method according to claim 1 or 2, wherein the performing anomaly monitoring on the process to be monitored to obtain an anomaly monitoring result includes:
determining a process monitoring command corresponding to the process to be monitored according to the process to be monitored;
and determining a monitoring command result according to the process monitoring command, and determining the abnormal monitoring result according to the monitoring command result.
5. The method of claim 4, wherein determining the exception monitor result based on the monitor command result comprises:
under the condition that the monitoring command result does not meet a preset state threshold value, determining that the abnormal monitoring result is abnormal;
the determining that the abnormal monitoring result meets the preset process restarting condition comprises the following steps:
under the condition that the abnormal monitoring result is determined to be abnormal, determining that the abnormal monitoring result meets a preset process restarting condition;
the determining that the abnormal monitoring result meets the preset alarm condition comprises the following steps:
and under the condition that the abnormal monitoring result is determined to be abnormal, determining that the abnormal monitoring result meets a preset alarm condition.
6. The method of claim 4, wherein determining the exception monitor result based on the monitor command result comprises:
under the condition that the monitoring command result meets a preset state threshold value, determining that the abnormal monitoring result is that no abnormality exists;
the method further comprises the steps of:
and under the condition that the abnormal monitoring result is determined to be that no abnormality exists, returning to execute the operation of acquiring the task to be monitored in the monitoring task list until the task to be monitored does not exist in the monitoring task list.
7. The method of claim 1, wherein restarting the process to be monitored comprises:
and determining a process restarting command corresponding to the process to be monitored according to the process to be monitored, and executing the process restarting command.
8. A process monitoring device, comprising:
the monitoring task acquisition module is used for acquiring a monitoring task list when the timing event is triggered, and acquiring a task to be monitored in the monitoring task list;
the process monitoring module is used for determining a process to be monitored according to the task to be monitored and carrying out abnormal monitoring on the process to be monitored to obtain an abnormal monitoring result;
and the process restarting module is used for restarting the process to be monitored under the condition that the abnormal monitoring result meets the preset process restarting condition.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the process monitoring method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the process monitoring method of any one of claims 1-7.
CN202310119300.0A 2023-02-07 2023-02-07 Process monitoring method and device, electronic equipment and storage medium Pending CN116302796A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310119300.0A CN116302796A (en) 2023-02-07 2023-02-07 Process monitoring method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310119300.0A CN116302796A (en) 2023-02-07 2023-02-07 Process monitoring method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116302796A true CN116302796A (en) 2023-06-23

Family

ID=86836962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310119300.0A Pending CN116302796A (en) 2023-02-07 2023-02-07 Process monitoring method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116302796A (en)

Similar Documents

Publication Publication Date Title
CN115396289B (en) Fault alarm determining method and device, electronic equipment and storage medium
CN116010220A (en) Alarm diagnosis method, device, equipment and storage medium
CN113656252B (en) Fault positioning method, device, electronic equipment and storage medium
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN115426287B (en) System monitoring and optimizing method and device, electronic equipment and medium
CN116521573A (en) Automatic test method, device, equipment and storage medium
CN116431313A (en) Scheduling method, device, equipment and medium for polling task
CN115509714A (en) Task processing method and device, electronic equipment and storage medium
CN116302796A (en) Process monitoring method and device, electronic equipment and storage medium
CN115629903A (en) Task delay monitoring method, device, equipment and storage medium
CN115130112A (en) Quick start-stop method, device, equipment and storage medium
CN113656239A (en) Monitoring method and device for middleware and computer program product
CN117608925A (en) Application restarting method and device, electronic equipment and storage medium
CN116450120B (en) Method, device, equipment and medium for analyzing kernel of real-time operating system
CN117290179A (en) Method, device, equipment and storage medium for determining event timeout state
CN117314068A (en) Tobacco shred task scheduling method and device, electronic equipment and storage medium
CN117149894A (en) Display method and device for call link, electronic equipment and storage medium
CN114418429A (en) Monitoring method and device for batch operation, mobile terminal and medium
CN116795260A (en) Full selection method, device, equipment and medium based on elementUI
CN115951921A (en) Service processing method, device and storage medium
CN118018405A (en) Upgrading method and device of Internet of things equipment, server and storage medium
CN117171270A (en) Product fault tracing method and device, electronic equipment and storage medium
CN117093274A (en) Application running stack analysis method, device, equipment and storage medium
CN115658341A (en) Method, device, equipment and medium for reading and writing data by Freeswitch
CN117611138A (en) Abnormality detection method and device for operation and maintenance equipment and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination