CN116225834A - Alarm information sending method and device, storage medium and electronic device - Google Patents

Alarm information sending method and device, storage medium and electronic device Download PDF

Info

Publication number
CN116225834A
CN116225834A CN202211676124.2A CN202211676124A CN116225834A CN 116225834 A CN116225834 A CN 116225834A CN 202211676124 A CN202211676124 A CN 202211676124A CN 116225834 A CN116225834 A CN 116225834A
Authority
CN
China
Prior art keywords
preset
application
monitoring
application program
log
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
CN202211676124.2A
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202211676124.2A priority Critical patent/CN116225834A/en
Publication of CN116225834A publication Critical patent/CN116225834A/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/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application discloses a method and a device for sending alarm information, a storage medium and an electronic device, and relates to the technical field of smart families, wherein the method for sending the alarm information comprises the following steps: acquiring monitoring data obtained by monitoring the running process of a preset application program; analyzing the monitoring data to obtain operation log data and application log data; under the condition that the operation log data and the application log data indicate that the preset application program runs abnormally, alarm information is determined based on the operation log data and the application log data, and the alarm information is sent to a target object.

Description

Alarm information sending method and device, storage medium and electronic device
Technical Field
The application relates to the technical field of smart families, in particular to a method and a device for sending alarm information, a storage medium and an electronic device.
Background
At present, in the technical field of household appliances, the use field of household appliances is becoming wider and wider along with the continuous improvement of the technical level of the household appliances. In the related art, whether the household appliance has an abnormality is generally checked through the device log. Because the device logs are distributed on multiple nodes, the logs need to be checked one by one based on the understanding of a service by a developer, and because the time difference from the occurrence of the log problem to the discovery of the log problem exists, the speed of checking the log problem is very slow, and the efficiency of log alarming is very low.
Accordingly, the related art has a problem of how to improve the transmission efficiency of the alarm information.
Aiming at the problem of how to improve the sending efficiency of the alarm information in the related technology, no effective solution has been proposed yet.
Disclosure of Invention
The embodiment of the application provides a method, a device, a storage medium and an electronic device for sending alarm information, which are used for at least solving the problem of how to improve the sending efficiency of the alarm information in the related technology.
According to an embodiment of the present application, there is provided a method for sending alarm information, including: acquiring monitoring data obtained by monitoring the running process of a preset application program; analyzing the monitoring data to obtain operation log data and application log data; and under the condition that the operation log data and the application log data both indicate that the preset application program runs abnormally, determining alarm information based on the operation log data and the application log data, and sending the alarm information to a target object.
In one exemplary embodiment, determining that the oplog data indicates that the preset application is running abnormally includes: acquiring a control instruction for controlling the running of the preset application program; determining a first operation state of the preset application program indicated by the control parameter of the control instruction; acquiring a second operation state of the preset application program in operation from the operation log data; and under the condition that the first operation state is inconsistent with the second operation state, determining that the preset application program runs abnormally.
In one exemplary embodiment, determining that the oplog data indicates that the preset application is running abnormally includes: responding to a resource request instruction sent by the target object, wherein the resource request instruction is used for requesting operation resources required by the operation of the preset application program; determining whether a request routing path corresponding to the resource request instruction belongs to a preset routing path; and under the condition that the request routing path corresponding to the resource request instruction is determined not to belong to a preset routing path, determining that the preset application program runs abnormally.
In one exemplary embodiment, determining that the application log data indicates the preset application program is running abnormally includes: sequencing the application log data according to log levels to obtain a plurality of sequenced application logs; obtaining a target application log with the highest log level from the application logs; and under the condition that the log keyword of the target application log is identical to a preset keyword, determining that the preset application program runs abnormally, wherein the log keyword represents the application running state of the target application log.
In an exemplary embodiment, before acquiring the monitoring data obtained when monitoring the running process of the preset application, the method further includes: acquiring historical operation times of the preset application program, wherein the operation priority of the preset application program and the application function type corresponding to the preset application program; and determining a monitoring period for monitoring the running process of the preset application program according to the historical running times, the running priority and the application function type.
In an exemplary embodiment, according to the historical running times, the running priority and the application function type jointly determine a monitoring period for monitoring the running process of the preset application program, including: respectively determining a first weight value corresponding to the historical operation times, a second weight value corresponding to the operation priority and a third weight value corresponding to the application function type; setting the monitoring period as a first period when the historical operation times are determined to be larger than the preset operation times, the operation priority is larger than the preset priority, and the application function type is a preset function; and setting the monitoring period to be a second period when the historical operation times are determined to be larger than the preset operation times, the operation priority is larger than the preset priority, and the application function type is that any one of the preset functions is not established, wherein the first period is smaller than the second period.
In an exemplary embodiment, obtaining monitoring data obtained when monitoring a running process of a preset application program includes: executing a monitoring instruction sent by the target object; monitoring the operation process of the preset application program according to the monitoring instruction to obtain the operation time length of the operation process, the operation memory of the operation process, the operation state of the operation process and the operation business of the operation process; and obtaining the monitoring data according to the operation time length of the operation process, the operation memory of the operation process, the operation state of the operation process and the operation business of the operation process.
According to another embodiment of the present application, there is also provided a sending device of alarm information, including: the acquisition module is used for acquiring monitoring data obtained by monitoring the running process of the preset application program; the obtaining module is used for analyzing the monitoring data to obtain operation log data and application log data; and the sending module is used for determining alarm information based on the operation log data and the application log data and sending the alarm information to a target object under the condition that the operation log data and the application log data both indicate that the preset application program runs abnormally.
According to still another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-described method for sending alert information when running.
According to still another aspect of the embodiments of the present application, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the method for sending alert information described above through the computer program.
In the embodiment of the application, monitoring data obtained by monitoring the running process of a preset application program are obtained; analyzing the monitoring data to obtain operation log data and application log data; under the condition that the operation log data and the application log data indicate that the preset application program runs abnormally, determining alarm information based on the operation log data and the application log data, and sending the alarm information to a target object; by adopting the technical scheme, the problem of how to improve the sending efficiency of the alarm information is solved, and the sending efficiency of the alarm information is further improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of a method for sending alarm information according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of sending alert information according to an embodiment of the present application;
FIG. 3 is a flowchart (one) of a method for sending alert information according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for sending alert information according to an embodiment of the present application (II);
FIG. 5 is a flowchart of a method for sending alert information according to an embodiment of the present application (III);
fig. 6 is a block diagram of a sending device of alarm information according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, 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 but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the embodiment of the application, a method for sending alarm information is provided. The sending method of the alarm information is widely applied to full-house intelligent digital control application scenes such as intelligent Home (Smart Home), intelligent Home equipment ecology, intelligent Home (Intelligence House) ecology and the like. Alternatively, in the present embodiment, the above-described method of sending alert information may be applied to a hardware environment constituted by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be used to provide services (such as application services and the like) for a terminal or a client installed on the terminal, a database may be set on the server or independent of the server, for providing data storage services for the server 104, and cloud computing and/or edge computing services may be configured on the server or independent of the server, for providing data computing services for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent cooking range, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent sweeping robot, an intelligent window cleaning robot, an intelligent mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock, and the like.
In this embodiment, a method for sending alarm information is provided and applied to the computer terminal, and fig. 2 is a flowchart of a method for sending alarm information according to an embodiment of the present application, where the flowchart includes the following steps:
step S202, obtaining monitoring data obtained by monitoring the running process of a preset application program;
it should be noted that the preset application program may be, for example, an application program running in a distributed application environment.
Step S204, analyzing the monitoring data to obtain operation log data and application log data;
the operation log data may be, for example, an operation log recorded by a gateway or a load application, including recording basic data of a request: request path, time, in-parameter, out-parameter, request status, request unique identification, routing information, etc. The application log data may be, for example, an application log recorded by an application, including log recording time, a request unique identifier, task processing thread information, a log level, a position of a log output point in a source code file, abnormal information in service processing, trace information of a sensitive operation, metadata of an application deployment node (node IP, log file position, application service identifier), and the like.
Step S206, determining alarm information based on the operation log data and the application log data, and sending the alarm information to a target object, where the operation log data and the application log data both indicate that the preset application program is running abnormally.
Through the steps, monitoring data obtained by monitoring the running process of the preset application program are obtained; analyzing the monitoring data to obtain operation log data and application log data; and under the condition that the operation log data and the application log data indicate that the preset application program runs abnormally, determining alarm information based on the operation log data and the application log data, and sending the alarm information to a target object, so that the problem of how to improve the sending efficiency of the alarm information in the related technology is solved, and the sending efficiency of the alarm information is further improved.
In an exemplary embodiment, further, in order to better understand how the operation log data and the application log data indicate that the preset application program runs abnormally in the above step S206, a technical solution for determining that the operation log data indicates that the preset application program runs abnormally based on the operation log data and the application log data and sending the alarm information to a target object is further provided, where the specific steps include: acquiring a control instruction for controlling the running of the preset application program; determining a first operation state of the preset application program indicated by the control parameter of the control instruction; acquiring a second operation state of the preset application program in operation from the operation log data; and under the condition that the first operation state is inconsistent with the second operation state, determining that the preset application program runs abnormally.
In an exemplary embodiment, further, other technical solutions are further provided for determining that the operation log data indicates that the preset application program runs abnormally, and the specific steps include: responding to a resource request instruction sent by the target object, wherein the resource request instruction is used for requesting operation resources required by the operation of the preset application program; determining whether a request routing path corresponding to the resource request instruction belongs to a preset routing path; and under the condition that the request routing path corresponding to the resource request instruction is determined not to belong to a preset routing path, determining that the preset application program runs abnormally.
The preset routing path may be understood as a path with validity that is preset manually.
In an exemplary embodiment, further, in order to better understand how the operation log data and the application log data indicate that the preset application program runs abnormally in the above step S206, a technical solution of determining alarm information based on the operation log data and the application log data and sending the alarm information to a target object is further provided, where the specific steps include: sequencing the application log data according to log levels to obtain a plurality of sequenced application logs; obtaining a target application log with the highest log level from the application logs; and under the condition that the log keyword of the target application log is identical to a preset keyword, determining that the preset application program runs abnormally, wherein the log keyword represents the application running state of the target application log.
Note that, the log level corresponds to the alarm priority level, for example, the higher the log level is, the higher the corresponding alarm priority level is.
In an exemplary embodiment, before obtaining monitoring data obtained when monitoring a running process of a preset application program, optionally, the following technical solutions are further provided, where the specific steps include: acquiring historical operation times of the preset application program, wherein the operation priority of the preset application program and the application function type corresponding to the preset application program; and determining a monitoring period for monitoring the running process of the preset application program according to the historical running times, the running priority and the application function type.
The historical operation times can understand the operation liveness of the preset application program, and the higher the liveness is, the shorter the monitoring period of the preset application program is.
Further, it should be noted that, the higher the operation priority of the preset application program, the shorter the monitoring period of the preset application program.
And under the condition that the application function type of the preset application program is the newly added function type, the shorter the monitoring period of the preset application program is. And under the condition that the application function type of the preset application program is the history function type, the longer the monitoring period of the preset application program is. The function setting time of the preset application program of the newly added function type is later than that of the preset application program of the history function type.
In an exemplary embodiment, it further provides an implementation scheme of determining a monitoring period for monitoring the running process of the preset application program according to the historical running times, where the running priority and the application function type include the following specific steps: respectively determining a first weight value corresponding to the historical operation times, a second weight value corresponding to the operation priority and a third weight value corresponding to the application function type; setting the monitoring period as a first period when the historical operation times are determined to be larger than the preset operation times, the operation priority is larger than the preset priority, and the application function type is a preset function; and setting the monitoring period to be a second period when the historical operation times are determined to be larger than the preset operation times, the operation priority is larger than the preset priority, and the application function type is that any one of the preset functions is not established, wherein the first period is smaller than the second period.
In an exemplary embodiment, in order to better understand how to implement the process of acquiring the monitoring data obtained when monitoring the running process of the preset application in the above step S202, the following implementation steps are proposed, which specifically include: executing a monitoring instruction sent by the target object; monitoring the operation process of the preset application program according to the monitoring instruction to obtain the operation time length of the operation process, the operation memory of the operation process, the operation state of the operation process and the operation business of the operation process; and obtaining the monitoring data according to the operation time length of the operation process, the operation memory of the operation process, the operation state of the operation process and the operation business of the operation process.
In order to better understand the process of the method for sending the alarm information, the following description is provided with reference to the alternative embodiment to describe the flow of the implementation method for sending the alarm information, but is not limited to the technical solution of the embodiment of the present application.
In this embodiment, a method for sending alarm information is provided, fig. 3 is a schematic flow chart (one) of a method for sending alarm information according to an embodiment of the present application, as shown in fig. 3, and specifically includes the following steps:
step S301: building a log acquisition system;
the log of the log collection system may include, for example, logs of various applications in the distributed application environment. Specifically, the method may include an operation log (i.e., the operation log data) recorded by a gateway or a load and an application log (i.e., the application log data) recorded by an application record: wherein the operation log includes basic data of the record request: request path, time, in-parameter, out-parameter, request status, request unique identification, routing information, etc.; the application log comprises log record time, request unique identification, task processing thread information, log level, position of log output point in source code file, abnormal information in service processing, trace information of sensitive operation, metadata of application deployment node (node IP, log file position, application service identification) and the like.
In one embodiment, the setup process may include the steps of:
step 1, deploying log acquisition agent at each node of a server cluster, and acquiring logs output by application service, including a gateway and logs of the application service;
step 2, storing the collected log content in an MQ cluster service, playing a role in peak clipping and valley filling, and providing the collected log content for a log processor;
step 3, the log processor cleans the log and constructs the content of the log;
step 4, storing by a log storage system;
and 5, providing the capability of log retrieval for the outside of the log query service, and retrieving the log from the dimensions of the service, the node, the log level, the time, the thread information, the sensitive keywords and the like.
Step S302: defining keywords;
step S303: monitoring is added.
In one embodiment, the process of monitoring the oplog may include monitoring the request status, such as monitoring the oplog where the request status (i.e., the keywords described above) is "500". The frequency of monitoring alarms, request parameters, request routing information can be differentiated into validity of requests, and stable availability of services to outside openings.
In one embodiment, application log monitoring may include monitoring an ERROR, WARN level log in the application log. Keywords in the log content, such as delete operations of sensitive business modules, are monitored. An ERROR event alert occurs in the application and the service's own should handle and clarify the alert event.
Further, the monitoring scanning period may be set according to the activity level, the importance level, the operation event of the service function, and the like, where the log monitoring period of the service application with higher activity level, higher importance level, and newer function point may be set smaller.
Alternatively, in one embodiment, the scan period of the log may be set, for example, because the time window for monitoring the scan log requires a forward buffer, and the scan range of the scan period may be set slightly earlier than the end time of the previous scan. For example: the previous scan is completed at 2022, 11, 20, 12:00:00, and the current scan time may start from 2022, 11, 20, 11:55:00.
Wherein, the scanning period can be determined according to the delay time between the acquisition log and the storage log.
Step S304: and starting monitoring.
By the embodiment, after the monitoring is started, the technical staff can be assisted in checking the problem reasons by monitoring the log.
Further, the method for sending the alarm information in the embodiment of the present application is described with reference to fig. 4, as shown in fig. 4, and specifically includes the following steps:
step S401: scanning keywords;
step S402: determining whether the scanned keyword is abnormal, and if so, executing step S403; if not, the scanning is ended.
Step S403: and sending an alarm message through the message platform.
Further, after receiving the alarm information, the unique identifier (i.e. the key word) of the request in the application log can be searched in the log system, and all the corresponding log data are sent to the target object, so as to assist the target object in checking the cause of the problem.
Through the embodiment, the log can be actively monitored, and the abnormal condition of the log can be found in the monitoring scanning period, so that the log is sent to a service developer, the developer can analyze the abnormal reason, and a solution is timely given. For example: thread pools in Web services have a wide range of applications, such as database connection pools. By adding application log monitoring (monitoring ERROR level logs, including jdbc and other keywords) to the database connection pool of the application service, whether the connection between the application and the database is normal or not can be judged, if the connection is abnormal, what abnormal information appears is directly notified to relevant development, and the problem is processed, so that the problem of abnormal service is automatically monitored through keyword scanning logs, and the time difference between the occurrence of the problem and the discovery of the problem is shortened.
Further, by analyzing the application log, the time difference between the occurrence of the problem in the application server and the discovery of the problem is shortened, and the abnormal log is automatically pushed to the service Owner for reference of an operation server. The method has the advantages that no perception is provided for developers, the service system is loosely coupled, and whether the application is in a safe and stable running state is reflected by scanning keywords in the application log.
Other manners of implementing log alarms are also provided through the following embodiments, as shown in fig. 5, fig. 5 is a flow chart (iii) of a sending method of alarm information according to an embodiment of the present application, and specifically includes the following steps:
step S501: abnormal functions of the business system;
step S502: searching a developer;
step S503: logging in the server by the developer;
step S504: viewing the log by a developer;
step S505: performing problem analysis by a developer;
step S506: the repair scheme is provided by the developer.
By the embodiment, on the premise of acquiring the authority of the server, the implementation scheme of manually monitoring the abnormality, checking the application servers one by one and analyzing the log is provided.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the embodiments of the present application.
FIG. 6 is a block diagram of a sending device of alarm information according to an embodiment of the present application; as shown in fig. 6, includes:
the acquiring module 62 is configured to acquire monitoring data obtained by monitoring an operation process of a preset application program;
it should be noted that the preset application program may be, for example, an application program running in a distributed application environment.
An obtaining module 64, configured to parse the monitoring data to obtain operation log data and application log data;
the operation log data may be, for example, an operation log recorded by a gateway or a load application, including recording basic data of a request: request path, time, in-parameter, out-parameter, request status, request unique identification, routing information, etc. The application log data may be, for example, an application log recorded by an application, including log recording time, a request unique identifier, task processing thread information, a log level, a position of a log output point in a source code file, abnormal information in service processing, trace information of a sensitive operation, metadata of an application deployment node (node IP, log file position, application service identifier), and the like.
And the sending module 66 is configured to determine, based on the operation log data and the application log data, alarm information and send the alarm information to a target object when the operation log data and the application log data both indicate that the preset application program runs abnormally.
The device is used for acquiring monitoring data obtained by monitoring the running process of the preset application program; analyzing the monitoring data to obtain operation log data and application log data; and under the condition that the operation log data and the application log data indicate that the preset application program runs abnormally, determining alarm information based on the operation log data and the application log data, and sending the alarm information to a target object, so that the problem of how to improve the sending efficiency of the alarm information in the related technology is solved, and the sending efficiency of the alarm information is further improved.
In an exemplary embodiment, further, the sending module 66 is further configured to: acquiring a control instruction for controlling the running of the preset application program; determining a first operation state of the preset application program indicated by the control parameter of the control instruction; acquiring a second operation state of the preset application program in operation from the operation log data; and under the condition that the first operation state is inconsistent with the second operation state, determining that the preset application program runs abnormally.
In an exemplary embodiment, further, the sending module 66 is further configured to: responding to a resource request instruction sent by the target object, wherein the resource request instruction is used for requesting operation resources required by the operation of the preset application program; determining whether a request routing path corresponding to the resource request instruction belongs to a preset routing path; and under the condition that the request routing path corresponding to the resource request instruction is determined not to belong to a preset routing path, determining that the preset application program runs abnormally.
The preset routing path may be understood as a path with validity that is preset manually.
In an exemplary embodiment, further, the sending module 66 is further configured to: sequencing the application log data according to log levels to obtain a plurality of sequenced application logs; obtaining a target application log with the highest log level from the application logs; and under the condition that the log keyword of the target application log is identical to a preset keyword, determining that the preset application program runs abnormally, wherein the log keyword represents the application running state of the target application log.
Note that, the log level corresponds to the alarm priority level, for example, the higher the log level is, the higher the corresponding alarm priority level is.
In an exemplary embodiment, the acquisition module 62 is further configured to: acquiring historical operation times of the preset application program, wherein the operation priority of the preset application program and the application function type corresponding to the preset application program; and determining a monitoring period for monitoring the running process of the preset application program according to the historical running times, the running priority and the application function type.
The historical operation times can understand the operation liveness of the preset application program, and the higher the liveness is, the shorter the monitoring period of the preset application program is.
Further, it should be noted that, the higher the operation priority of the preset application program, the shorter the monitoring period of the preset application program.
And under the condition that the application function type of the preset application program is the newly added function type, the shorter the monitoring period of the preset application program is. And under the condition that the application function type of the preset application program is the history function type, the longer the monitoring period of the preset application program is. The function setting time of the preset application program of the newly added function type is later than that of the preset application program of the history function type.
In an exemplary embodiment, the obtaining module 62 further includes a determining unit, configured to: respectively determining a first weight value corresponding to the historical operation times, a second weight value corresponding to the operation priority and a third weight value corresponding to the application function type; setting the monitoring period as a first period when the historical operation times are determined to be larger than the preset operation times, the operation priority is larger than the preset priority, and the application function type is a preset function; and setting the monitoring period to be a second period when the historical operation times are determined to be larger than the preset operation times, the operation priority is larger than the preset priority, and the application function type is that any one of the preset functions is not established, wherein the first period is smaller than the second period.
In an exemplary embodiment, the acquisition module 62 is further configured to: executing a monitoring instruction sent by the target object; monitoring the operation process of the preset application program according to the monitoring instruction to obtain the operation time length of the operation process, the operation memory of the operation process, the operation state of the operation process and the operation business of the operation process; and obtaining the monitoring data according to the operation time length of the operation process, the operation memory of the operation process, the operation state of the operation process and the operation business of the operation process.
Embodiments of the present application also provide a storage medium including a stored program, wherein the program performs the method of any one of the above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of:
s1, acquiring monitoring data obtained by monitoring the running process of a preset application program;
s2, analyzing the monitoring data to obtain operation log data and application log data;
s3, under the condition that the operation log data and the application log data indicate that the preset application program runs abnormally, determining alarm information based on the operation log data and the application log data, and sending the alarm information to a target object.
Embodiments of the present application also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, acquiring monitoring data obtained by monitoring the running process of a preset application program;
s2, analyzing the monitoring data to obtain operation log data and application log data;
s3, under the condition that the operation log data and the application log data indicate that the preset application program runs abnormally, determining alarm information based on the operation log data and the application log data, and sending the alarm information to a target object.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed across a network of computing devices, or they may alternatively be implemented in program code executable by computing devices, such that they may be stored in a memory device for execution by the computing devices and, in some cases, the steps shown or described may be performed in a different order than what is shown or described, or they may be implemented as individual integrated circuit modules, or as individual integrated circuit modules. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (10)

1. The method for sending the alarm information is characterized by comprising the following steps:
acquiring monitoring data obtained by monitoring the running process of a preset application program;
analyzing the monitoring data to obtain operation log data and application log data;
and under the condition that the operation log data and the application log data both indicate that the preset application program runs abnormally, determining alarm information based on the operation log data and the application log data, and sending the alarm information to a target object.
2. The method for sending alert information according to claim 1, wherein determining that the operation log data indicates that the preset application is running abnormally comprises:
acquiring a control instruction for controlling the running of the preset application program;
determining a first operation state of the preset application program indicated by the control parameter of the control instruction;
acquiring a second operation state of the preset application program in operation from the operation log data;
and under the condition that the first operation state is inconsistent with the second operation state, determining that the preset application program runs abnormally.
3. The method for sending alert information according to claim 1, wherein determining that the operation log data indicates that the preset application is running abnormally comprises:
responding to a resource request instruction sent by the target object, wherein the resource request instruction is used for requesting operation resources required by the operation of the preset application program;
determining whether a request routing path corresponding to the resource request instruction belongs to a preset routing path;
and under the condition that the request routing path corresponding to the resource request instruction is determined not to belong to a preset routing path, determining that the preset application program runs abnormally.
4. The method for sending alert information according to claim 1, wherein determining that the application log data indicates that the preset application program is running abnormally comprises:
sequencing the application log data according to log levels to obtain a plurality of sequenced application logs;
obtaining a target application log with the highest log level from the application logs;
and under the condition that the log keyword of the target application log is identical to a preset keyword, determining that the preset application program runs abnormally, wherein the log keyword represents the application running state of the target application log.
5. The method for sending alert information according to claim 1, wherein before acquiring the monitoring data obtained when monitoring the running process of the preset application, the method further comprises:
acquiring historical operation times of the preset application program, wherein the operation priority of the preset application program and the application function type corresponding to the preset application program;
and determining a monitoring period for monitoring the running process of the preset application program according to the historical running times, the running priority and the application function type.
6. The method for sending alert information according to claim 5, wherein determining a monitoring period for monitoring the running process of the preset application program according to the historical running times, the running priority and the application function type together includes:
respectively determining a first weight value corresponding to the historical operation times, a second weight value corresponding to the operation priority and a third weight value corresponding to the application function type;
setting the monitoring period as a first period when the historical operation times are determined to be larger than the preset operation times, the operation priority is larger than the preset priority, and the application function type is a preset function;
and setting the monitoring period to be a second period when the historical operation times are determined to be larger than the preset operation times, the operation priority is larger than the preset priority, and the application function type is that any one of the preset functions is not established, wherein the first period is smaller than the second period.
7. The method for sending alert information according to claim 1, wherein obtaining monitoring data obtained when monitoring a running process of a preset application program comprises:
executing a monitoring instruction sent by the target object;
monitoring the operation process of the preset application program according to the monitoring instruction to obtain the operation time length of the operation process, the operation memory of the operation process, the operation state of the operation process and the operation business of the operation process;
and obtaining the monitoring data according to the operation time length of the operation process, the operation memory of the operation process, the operation state of the operation process and the operation business of the operation process.
8. A transmission apparatus for alarm information, comprising:
the acquisition module is used for acquiring monitoring data obtained by monitoring the running process of the preset application program;
the obtaining module is used for analyzing the monitoring data to obtain operation log data and application log data;
and the sending module is used for determining alarm information based on the operation log data and the application log data and sending the alarm information to a target object under the condition that the operation log data and the application log data both indicate that the preset application program runs abnormally.
9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program when run performs the method of any of the preceding claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 7 by means of the computer program.
CN202211676124.2A 2022-12-26 2022-12-26 Alarm information sending method and device, storage medium and electronic device Pending CN116225834A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211676124.2A CN116225834A (en) 2022-12-26 2022-12-26 Alarm information sending method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211676124.2A CN116225834A (en) 2022-12-26 2022-12-26 Alarm information sending method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN116225834A true CN116225834A (en) 2023-06-06

Family

ID=86590130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211676124.2A Pending CN116225834A (en) 2022-12-26 2022-12-26 Alarm information sending method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN116225834A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116861419A (en) * 2023-09-05 2023-10-10 国网江西省电力有限公司信息通信分公司 Active defending log alarming method on SSR

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116861419A (en) * 2023-09-05 2023-10-10 国网江西省电力有限公司信息通信分公司 Active defending log alarming method on SSR
CN116861419B (en) * 2023-09-05 2023-12-08 国网江西省电力有限公司信息通信分公司 Active defending log alarming method on SSR

Similar Documents

Publication Publication Date Title
CN109445848B (en) Equipment linkage method and device
CN113596176A (en) Self-selection method and device of Internet of things center node, Internet of things equipment and system
CN116225834A (en) Alarm information sending method and device, storage medium and electronic device
CN111130867B (en) Intelligent household equipment alarm method and device based on Internet of things
CN114938365B (en) Function module updating method and device, storage medium and electronic device
CN115296977B (en) Fault information processing method and device, storage medium and electronic device
CN115309062B (en) Control method and device of equipment, storage medium and electronic device
CN116107975A (en) Control method and device of equipment, storage medium and electronic device
CN115499333A (en) Method, system, storage medium and electronic device for determining association relationship
CN113206863A (en) Internet of things equipment management method and device
CN114760235B (en) Method and device for executing dial testing task, storage medium and electronic device
CN112511579A (en) Event notification method, system, server device, computer storage medium
CN115550214B (en) Task monitoring method and device, storage medium and electronic device
CN117527459A (en) Control method and device of intelligent equipment, storage medium and electronic device
CN114697345B (en) Information updating method and device, storage medium and electronic device
CN111506446B (en) Interface fault detection method and server
CN115312049B (en) Instruction response method, storage medium and electronic device
CN115314245B (en) Authority management method, system, storage medium and electronic device
CN116382766A (en) Page packaging method and device, storage medium and electronic device
CN115174297B (en) Method and device for updating attribute information, storage medium and electronic device
CN117857621A (en) Data pushing method and device, storage medium and electronic equipment
CN117252169A (en) Report determination method and device, storage medium and electronic device
CN112967481B (en) Security alarm information intelligent processing method, security equipment and computer readable storage medium
CN115296986B (en) Event recording method and device, storage medium and electronic device
CN118551216A (en) Method, device, equipment and medium for identifying and alarming isolated tree of full-link tracking

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