Monitoring alarm method, device, equipment and storage medium
By acquiring and processing front-end and server-side log information in real time, combining monitoring levels and conditional judgments, generating alarm information and identifying the latest responsible person, the problem of alarm delay in the monitoring system is solved and the fault response speed is improved.
Patent Information
- Application Number
- CN202510536157.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-09-16
AI Technical Summary
Existing monitoring systems have difficulty detecting system anomalies in a timely manner when processing log information, resulting in delayed alarms and increased fault response time.
Through the front-end engineering SDK and service engineering SDK, the front-end and server-side log information is obtained in real time. Based on the preset monitoring level and conditions, the system business anomalies are judged and alarm information is generated. If no processing notification is received within the preset time, the latest person in charge is identified to ensure timely processing.
It enables rapid identification of system anomalies and notification of relevant responsible personnel, shortening fault response time and reducing potential losses.
Smart Images

Figure CN120658554A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a monitoring alarm method, apparatus, device, and storage medium. Background Art
[0002] In today's rapidly evolving internet age, the stability of applications and services is directly linked to user experience and corporate reputation. To ensure service continuity and reliability, rapidly detecting and responding to system anomalies is crucial. Currently, complex log storage and management methods for monitoring systems make it difficult to detect anomalies in a timely manner, resulting in delayed alerts and increased response time. Summary of the Invention
[0003] Based on this, the present application provides a monitoring alarm method, device, equipment and storage medium to solve the technical problem that it is difficult to detect system anomalies in a timely manner, resulting in alarm delays and increased fault response time.
[0004] In a first aspect, a monitoring alarm method is provided. The method is applied to a monitoring alarm system. The system is provided with a front-end engineering software development toolkit (SDK) for obtaining front-end log information, a service engineering software development toolkit (SDK) for obtaining server-side log information, a log service, and a global wide area network (WAN) web system. The front-end engineering SDK and the service engineering SDK are respectively configured with an access point for the log service. The method comprises:
[0005] Use the front-end engineering SDK to obtain the front-end log information of the system business in real time and send it to the log service. Use the service engineering SDK to obtain the server log information of the system business in real time and send it to the log service.
[0006] The WEB system obtains front-end log information and server log information from the log service based on the preset monitoring level corresponding to the system business, and determines whether the system business is abnormal based on the preset conditions;
[0007] In response to determining that the system service is abnormal, an alarm message is generated and sent to the terminal device of the initial person in charge of the system service;
[0008] If no processing notification is received from the terminal device of the initial person in charge within the preset time, the latest person in charge of processing the alarm information is determined based on the preset monitoring level, and the alarm information is sent to the terminal device of the latest person in charge so that the alarm information can be processed in time.
[0009] According to one achievable method in an embodiment of the present application, the preset monitoring levels include level 1 monitoring, level 2 monitoring, and level 3 monitoring, and the preset times include a first preset time and a second preset time; if a processing notification is not received from the terminal device of the initial person in charge within the preset time, determining the latest person in charge of processing the alarm information based on the preset monitoring level includes:
[0010] If no processing notification is received from the terminal device of the initial person in charge within the first preset time, and the preset monitoring level is level one monitoring, the latest person in charge of processing the alarm information is determined to be the team leader;
[0011] If no processing notification is received from the terminal device of the initial person in charge within the first preset time, and the preset monitoring level is level 2 monitoring, the latest person in charge of processing the alarm information is determined to be the initial person in charge;
[0012] If no processing notification is received from the terminal device of the initial person in charge within the second preset time, and the preset monitoring level is level one monitoring, the latest person in charge of processing the alarm information is determined to be the business person in charge;
[0013] If no processing notification is received from the terminal device of the initial person in charge within the second preset time, and the preset monitoring level is level 2 monitoring, the latest person in charge of processing the alarm information is determined based on different time periods within the second preset time;
[0014] If no processing notification is received from the terminal device of the initial person in charge within the preset time, and the preset monitoring level is level three monitoring, the latest person in charge of processing the alarm information is determined to be the initial person in charge.
[0015] According to an achievable method in an embodiment of the present application, determining the latest person responsible for processing the alarm information based on different time periods within the second preset time includes:
[0016] If the latest person in charge of handling the alarm information is determined to be the initial person in charge during the first preset time period within the second preset time period, the notification method of sending the alarm information to the terminal device of the latest person in charge is upgraded to telephone notification;
[0017] If the latest person in charge of processing the alarm information is determined to be the team leader within the second preset time period;
[0018] If the third preset time period is within the second preset time, the latest person in charge of processing the alarm information is determined to be the business person in charge.
[0019] According to one achievable method in an embodiment of the present application, in the process of obtaining front-end log information and server log information of system services in real time, the method further includes:
[0020] Identify sensitive information in the front-end log information and server log information of system business;
[0021] Desensitize sensitive information to obtain front-end log information and server log information for storage and analysis.
[0022] According to an achievable method in an embodiment of the present application, sensitive information is desensitized, including at least one of the following methods:
[0023] Use hashing algorithms to encrypt sensitive information;
[0024] Replace part of sensitive numbers in sensitive information with preset symbols;
[0025] Shorten the length of sensitive information.
[0026] According to one achievable method in an embodiment of the present application, before sending the front-end log information and server log information of the system business to the log service, the method further includes:
[0027] A strong random number generator is used to generate the initial key, and the front-end log information and server log information of the system business are encrypted based on the advanced encryption standard and the initial key.
[0028] According to an achievable method in an embodiment of the present application, the preset monitoring level is obtained based on the WEB system pre-configuring different monitoring cycles through a Jenkins scheduled task.
[0029] In a second aspect, a monitoring and alarm device is provided. The device is installed on a monitoring and alarm system. The system is provided with a front-end engineering software development toolkit (SDK) for obtaining front-end log information, a service engineering software development toolkit (SDK) for obtaining server-side log information, a log service, and a global wide area network (WAN) web system. The front-end engineering SDK and the service engineering SDK are each configured with an access point for the log service. The device includes:
[0030] The acquisition module is used to obtain the front-end log information of the system business corresponding to the front-end in real time through the front-end engineering SDK and send it to the log service. The server log information of the server side corresponding to the system business is obtained in real time through the service engineering SDK and sent to the log service.
[0031] The judgment module is used by the WEB system to obtain front-end log information and server log information from the log service based on the preset monitoring level corresponding to the system business, and to judge whether the system business is abnormal based on the preset conditions;
[0032] A generating module, configured to generate an alarm message in response to determining that a system service is abnormal, and send the alarm message to a terminal device of an initial person in charge of the system service;
[0033] The determination module is used to determine the latest person in charge of processing the alarm information based on the preset monitoring level if no processing notification is received from the terminal device of the initial person in charge within the preset time, and send the alarm information to the terminal device of the latest person in charge so that the alarm information can be processed in time.
[0034] According to a third aspect, a computer device is provided, comprising:
[0035] at least one processor; and
[0036] a memory communicatively connected to the at least one processor; wherein,
[0037] The memory stores computer instructions that can be executed by the at least one processor, and the computer instructions are executed by the at least one processor to enable the at least one processor to perform the method involved in the first aspect above.
[0038] In a fourth aspect, a computer-readable storage medium is provided, on which computer instructions are stored, characterized in that the computer instructions are used to enable a computer to execute the method involved in the above-mentioned first aspect.
[0039] According to the technical content provided in the embodiments of the present application, the front-end log information of the front-end corresponding to the system business is obtained in real time through the front-end engineering SDK and sent to the log service, and the server log information of the server side corresponding to the system business is obtained in real time through the service engineering SDK and sent to the log service. The WEB system obtains the front-end log information and server log information from the log service based on the preset monitoring level corresponding to the system business, and judges whether the system business is abnormal based on preset conditions. In response to the judgment that the system business is abnormal, an alarm message is generated and the alarm message is sent to the terminal device of the initial person in charge corresponding to the system business. If the processing notification of the terminal device of the initial person in charge is not received within the preset time, the latest person in charge of processing the alarm information is determined based on the preset monitoring level, and the alarm message is sent to the terminal device of the latest person in charge. The system business abnormality can be quickly identified and the relevant responsible personnel can be notified as soon as possible, thereby shortening the fault response time and reducing potential losses. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A diagram showing an application environment of a monitoring alarm method in one embodiment;
[0041] Figure 2 Schematic diagram of a monitoring alarm method according to an embodiment;
[0042] Figure 3 A structural block diagram of a monitoring alarm device in one embodiment;
[0043] Figure 4Schematic diagram of the structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0044] The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0045] For ease of understanding, the system to which this application is applicable is first described. The monitoring alarm method provided in this application can be applied to Figure 1 In the system architecture shown, the terminal 110 communicates with the server 120 via a network. The terminal 110 is deployed with a monitoring and alarm system, which is equipped with a front-end engineering software development kit (SDK) for obtaining front-end log information, a service engineering software development kit (SDK) for obtaining server-side log information, a log service, and a global wide area network (WAN) web system. The front-end engineering SDK and the service engineering SDK are each configured with an access point for the log service. The front-end log information of the front-end corresponding to the system business is obtained in real time through the front-end engineering SDK and sent to the log service. The server log information of the server side corresponding to the system business is obtained in real time through the service engineering SDK and sent to the log service. The WEB system obtains the front-end log information and server log information from the log service based on the preset monitoring level corresponding to the system business, and judges whether the system business is abnormal based on the preset conditions. In response to the judgment that the system business is abnormal, an alarm message is generated and the alarm message is sent to the terminal device of the initial person in charge of the system business. If the processing notification of the terminal device of the initial person in charge is not received within the preset time, the latest person in charge of processing the alarm message is determined based on the preset monitoring level, and the alarm message is sent to the terminal device of the latest person in charge so that the alarm message can be processed in time. Among them, the terminal 120 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 120 can be implemented as an independent server or a server cluster composed of multiple servers.
[0046] Figure 2 This is a flowchart of a monitoring alarm method provided in an embodiment of the present application. The method can be performed as follows: Figure 1 The terminal 110 in the system shown executes. Figure 2 As shown, the method may include the following steps:
[0047] S210, obtaining the front-end log information of the system business corresponding to the front end in real time through the front-end engineering SDK and sending it to the log service, obtaining the server log information of the system business corresponding to the server side in real time through the service engineering SDK and sending it to the log service.
[0048] System business refers to a series of interrelated and coordinated business activities carried out around a specific system or platform to ensure that the system can operate normally according to design requirements and provide the expected services or functions.
[0049] The front-end refers to the part of the system that users directly interact with and use, typically including web pages, mobile application interfaces, and desktop application interfaces. The server-side refers to the software system running on the server, responsible for processing requests from clients, executing corresponding business logic, and interacting with databases or other external systems. The log service is used to centrally collect, store, analyze, and visualize log information generated by systems or applications. Alibaba Cloud Log Service can be used for this purpose.
[0050] Front-end log information includes user behavior, page performance, front-end errors and other information, while server log information includes server status, application operation status, system events and other information.
[0051] The method to set up the front-end engineering SDK is: in the HTML file of the application, <script>标签引入前端工程SDK的JavaScript文件,在引入前端工程SDK之后,在应用程序的JavaScript代码中调用一个初始化函数,并传递必要的配置参数,如应用标识、日志服务的接入点等。根据实际需求配置前端工程SDK,比如设置哪些错误需要被捕获、日志级别、自定义日志字段等。
[0052] 前端工程SDK会提供一系列应用程序编程接口(Application ProgrammingInterface,API),可以在前端代码中直接获取前端日志信息。前端日志信息还可以被前端工程SDK采集并通过高速传输通道推送至日志服务,进入日志服务的日志库页面在线查询。
[0053] 前端工程SDK利用JavaScript的高效处理能力,实现对前端应用全方位、实时监控,即时捕获jsError(代码异常)、apiError(接口异常)、资源加载异常和业务逻辑错误。采集的日志数据通过高速传输通道,迅速推送至阿里云SLS日志存储服务,为快速分析和处理提供即时数据支持。
[0054] 设置服务工程SDK的方法为:通过包管理器(Node Package Manager,npm)安装服务工程SDK,在应用程序的配置文件中设置服务工程SDK参数,日志服务账号信息、日志项目、日志库等。在应用程序启动时初始化服务工程SDK,使其开始收集日志。
[0055] 服务器日志信息可以通过日志服务控制台查询日志,还可以调用日志服务提供的API接口来获取日志信息。
[0056] 服务工程SDK采用Logtail技术,专注于服务器端的日志信息的实时监控与采集,覆盖系统日志、应用程序日志等多种类型。通过优化的数据收集机制,确保日志信息以最快速度推送到日志服务,实现日志信息的即时管理和利用。
[0057] 前端工程SDK和服务工程SDK专注于实时检测异常并触发报警,无需复杂的日志存储和管理,能够即时响应系统问题,从而提升服务的整体稳定性。
[0058] 对采集到的前端日志信息和服务器日志信息进行初步处理,包括数据清洗、格式化和必要的信息提取。将预处理后的前端日志信息和服务器日志信息发送至日志服务进行保存。SDK,专注于实时检测异常并触发报警,而无需复杂的日志存储和管理,成为了一种创新且实用的技术需求。
[0059] S220,WEB系统基于系统业务对应的预设监控级别从日志服务获取前端日志信息和服务器日志信息,并基于预设条件判断系统业务是否异常。
[0060] WEB系统是一个全球性的网络信息系统,由一系列互相链接的超文本文件和资源组成。它通过互联网协议传输数据,用户可以通过浏览器访问和共享各种类型的数字内容。
[0061] 用户通过WEB系统的业务管理模块配置业务、团队和人员信息,所有数据均存储于Mysql数据库,便于管理和查询。用户通过WEB系统的监控配置模块快速设置监控参数,如报警名称、周期、级别等,确保监控报警系统能够在异常发生的第一时间做出响应。配置信息存储于Mysql数据库,以便快速检索和更新。
[0062] 预设监控级别是基于WEB系统预先通过Jenkins定时任务配置不同监控周期得到的,包括一级监控、二级监控、三级监控,预设监控级别的数量越大对应的监控周期越大,例如,一级监控可以为1分钟,二级监控为5分钟,三级监控为15分钟。
[0063] 预设监控级别可综合以下几方面进行划分:
[0064] 1.评估业务影响:确定系统或服务故障对业务的影响程度。
[0065] 2.确定响应时间要求:根据业务影响评估,确定在多长时间内必须响应问题。
[0066] 3.资源评估:考虑监控系统对资源的需求,以及现有资源是否支持更频繁的监控。
[0067] 根据以上评估结果,为不同的系统或服务配置合适的监控级别。监控策略不是一成不变的,应定期根据业务发展、系统变化等因素进行审查和调整。
[0068] 通过Jenkins定时任务,实现秒级监控周期的配置,确保监控的实时性和报警的快速触发,根据不同的监控级别定期执行报警配置的拉取和数据分析,确保监控的实时性和准确性。
[0069] 预设条件为预先设置的规则和阈值范围,预设条件可根据业务的实际需求设置。判断前端日志信息和服务器日志信息是否满足预设条件,进而判断系统业务是否异常。若前端日志信息和服务器日志信息中存在满足预设条件得信息,则判断系统业务异常,若前端日志信息和服务器日志信息中均无满足预设条件的信息,则判断系统业务正常。
[0070] S230,响应于判断系统业务异常,生成告警信息,并将告警信息发送至系统业务对应初始负责人的终端设备。
[0071] 告警信息可以包括告警来源、告警时间、告警级别、异常描述、异常业务组件等信息。当判断系统业务异常时,基于预先设置的告警模板生成告警信息。基于告警信息对应告警级别确定预先指定处理该告警信息的负责人为初始负责人,将告警信息发送至应初始负责人的终端设备,终端设备可以通过应用程序接收告警信息,比如说钉钉、微信等社交软件。
[0072] S240,若在预设时间内未接收到初始负责人的终端设备的处理通知,基于预设监控级别,确定处理告警信息的最新负责人,并将告警信息发送至最新负责人的终端设备,以使告警信息被及时处理。
[0073] 若在预设时间内未接收到初始负责人的终端设备的处理通知,也就是说,该告警信息一直未被接手,为进一步提高报警响应速度,需采用升级策略及时将告警信息分配至合适的负责人手中处理。
[0074] 不同的预设监控级别对应不同的升级策略,预设时间包括第一预设时间和第二预设时间,同一预设监控级别对应不同的预设时间,升级策略也不同。
[0075] 基于系统业务的预设监控级别以及未接收到初始负责人的终端设备的处理通知对应的预设时间,确定该系统业务的升级策略,进而确定处理告警信息的最新负责人。
[0076] 可以看出,本申请实施例通过前端工程SDK实时获取系统业务对应前端的前端日志信息并发送至日志服务,通过服务工程SDK实时获取系统业务对应服务器端的服务器日志信息并发送至日志服务,WEB系统基于系统业务对应的预设监控级别从日志服务获取前端日志信息和服务器日志信息,并基于预设条件判断系统业务是否异常,响应于判断系统业务异常,生成告警信息,并将告警信息发送至系统业务对应初始负责人的终端设备,若在预设时间内未接收到初始负责人的终端设备的处理通知,基于预设监控级别,确定处理告警信息的最新负责人,并将告警信息发送至最新负责人的终端设备,能够迅速识别系统业务异常,并在第一时间通知相关负责人员,从而缩短故障响应时间,减少潜在的损失。
[0077] 作为一种可实现的方式,若在预设时间内未接收到初始负责人的终端设备的处理通知,基于预设监控级别,确定处理告警信息的最新负责人,包括:
[0078] 若在第一预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为一级监控,确定处理告警信息的最新负责人为团队负责人;
[0079] 若在第一预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为二级监控,确定处理告警信息的最新负责人为初始负责人;
[0080] 若在第二预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为一级监控,确定处理告警信息的最新负责人级为业务负责人;
[0081] 若在第二预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为二级监控,基于第二预设时间内的不同时间节段,确定处理告警信息的最新负责人;
[0082] 若在预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为三级监控,确定处理告警信息的最新负责人为初始负责人。
[0083] 预设监控级别包括一级监控A1、二级监控A2、三级监控A3,预设时间包括第一预设时间和第二预设时间,第一预设时间和第二预设时间是基于不同的时间节点进行划分的,从小到大依次为第一时间节点、第二时间节点、第三时间节点和第四时间节点,第一预设时间为大于第一时间节点的时间,第二预设时间为大于第二时间节点的时间、大于第三时间节点的时间和大于第四时间节点的时间的集合。在第二预设时间内基于不同时间节点又划分为三个时间段,分别为第一预设时间段、第二预设时间段和第三预设时间段,其中,第一预设时间段为大于第二时间节点的时间,第二预设时间段为大于第三时间节点的时间,第三预设时间段为大于第四时间节点的时间。
[0084] 若在第一预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为一级监控,确定处理告警信息的最新负责人为团队负责人,此时,将处理告警信息的负责人由初始负责人升级为团队负责人。
[0085] 若在第一预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为二级监控,确定处理告警信息的最新负责人为初始负责人,即,对于设置二级监控的系统业务的告警信息,即使在第一预设时间内未被接手,对当前的系统业务影响不大,故,处理该告警信息的负责人不升级,继续等待初始负责人响应。
[0086] 若在第二预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为一级监控,确定处理告警信息的最新负责人级为业务负责人,此时,将处理告警信息的负责人由初始负责人升级为业务负责人。
[0087] 若在第二预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为二级监控,基于第二预设时间内的不同时间段,确定处理告警信息的最新负责人。
[0088] 具体地,若在第二预设时间内的第一预设时间段,确定处理告警信息的最新负责人为初始负责人,并将告警信息发送至最新负责人的终端设备的通知方式升级为电话通知,也就是说告警信息在第一预设时间段内未被处理,暂时对系统业务影响不大,可以换种通知方式,再等待一下初始负责人。
[0089] 若在第二预设时间内的第二预设时间段,确定处理告警信息的最新负责人为团队负责人。告警信息在第二预设时间段内未被处理,会对系统业务造成影响,将负责人由初始负责人升级为团队负责人,以保证告警信息及时处理。
[0090] 若在第二预设时间内的第三预设时间段,确定处理告警信息的最新负责人为业务负责人。告警信息在第三预设时间段内未被处理,系统业务异常时间过长,容易对系统业务造成较大影响,将负责人由初始负责人升级为业务负责人,以保证告警信息被尽快处理。
[0091] 若在预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为三级监控,确定处理告警信息的最新负责人为初始负责人,即,对于设置三级监控的系统业务的告警信息,即使在预设时间内未被处理,对当前的系统业务影响不大,故,处理该告警信息的负责人不升级,继续等待初始负责人响应。
[0092] 以第一时间节点、第二时间节点、第三时间节点和第四时间节点分别为5分钟、10分钟、15分钟、20分钟和30分钟为例,不同监控等级对应的升级策略如下表所示:
[0093]
[0094]
[0095] 当初始负责人未处理告警信息的时间大于多个时间节点时,选择靠近初始负责人未处理告警信息的时间的时间节点对应的升级策略。比如说,系统业务设置二级监控,初始负责人未处理告警信息的时间是21分钟,由于21同时大于20、10、5,但是更靠近20,所以,将负责人由初始负责人升级为团队负责人,以加快异常处理的效率。
[0096] 作为一种可实现的方式,在实时获取系统业务的前端日志信息和服务器日志信息的过程中,该方法还包括:
[0097] 确定系统业务的前端日志信息和服务器日志信息中的敏感信息;
[0098] 对敏感信息进行脱敏处理,得到用于存储和分析的前端日志信息和服务器日志信息。
[0099] 具体地,对敏感信息进行脱敏处理,包括以下方式中的至少一种:
[0100] 采用哈希算法加密敏感信息;
[0101] 用预设符号替换敏感信息中敏感数字的部分数字;
[0102] 缩短敏感信息的长度。
[0103] 其中,敏感信息为涉及用户隐私的信息,可以包括用户ID、IP地址、手机号等信息。在日志采集过程中,对敏感信息进行脱敏处理,确保日志信息在存储和分析过程中不暴露用户隐私。
[0104] 脱敏处理可以采用哈希算法加密敏感信息,如用户ID,也可以采用数据掩码方式,用预设符号替换敏感信息中敏感数字的部分数字,预设符号可以为星号,比如,用星号(*)替换手机号的后四位。还可以采用截断的方式,缩短敏感信息的长度,例如,只保留IP地址前三个八位字节。
[0105] 作为一种可实现的方式,在将系统业务的前端日志信息和服务器日志信息发送至日志服务之前,该方法还包括:
[0106] 采用强随机数生成器生成初始密钥,基于高级加密标准和初始密钥对系统业务的前端日志信息和服务器日志信息进行加密。
[0107] 采用强随机数生成器生成初始密钥,以确保密钥长度足够。将密钥存放在安全的介质中,如硬件安全模块(hardware security module,HSM),并对密钥进行加密,通过安全通道分发密钥,避免明文传输,限制访问权限,记录使用情况,定期更换密钥,制定轮换策略,不再使用时,确保密钥被安全销毁。
[0108] 基于高级加密标准(Advanced Encryption Standard,AES)对日志信息进行加密,确保日志信息在存储过程中的安全性。加密完成的日志信息可以被写入到数据库、文件系统或日志存储服务中,以供后续的访问和分析。
[0109] 应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本申请中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
[0110] 图3为本申请实施例提供的一种监控报警装置的结构示意图,该装置可以设置于图1所示系统中的终端110,用以执行如图2中所示的方法流程。如图3所示,该装置可以包括:获取模块310、判断模块320、生成模块330和确定模块340,还可以进一步包括:脱敏模块、加密模块。其中各组成模块的主要功能如下:
[0111] 获取模块310,用于通过前端工程SDK实时获取系统业务对应前端的前端日志信息并发送至所述日志服务,通过服务工程SDK实时获取系统业务对应服务器端的服务器日志信息并发送至所述日志服务;
[0112] 判断模块320,用于所述WEB系统基于所述系统业务对应的预设监控级别从所述日志服务获取所述前端日志信息和所述服务器日志信息,并基于预设条件判断所述系统业务是否异常;
[0113] 生成模块330,用于响应于判断所述系统业务异常,生成告警信息,并将所述告警信息发送至所述系统业务对应初始负责人的终端设备;
[0114] 确定模块340,用于若在预设时间内未接收到所述初始负责人的终端设备的处理通知,基于所述预设监控级别,确定处理所述告警信息的最新负责人,并将所述告警信息发送至所述最新负责人的终端设备,以使所述告警信息被及时处理。
[0115] 作为一种可实现的方式,预设监控级别包括一级监控、二级监控、三级监控,预设时间包括第一预设时间和第二预设时间;确定模块340,具体用于:若在第一预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为一级监控,确定处理告警信息的最新负责人为团队负责人;
[0116] 若在第一预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为二级监控,确定处理告警信息的最新负责人为初始负责人;
[0117] 若在第二预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为一级监控,确定处理告警信息的最新负责人级为业务负责人;
[0118] 若在第二预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为二级监控,基于第二预设时间内的不同时间段,确定处理告警信息的最新负责人;
[0119] 若在预设时间内未接收到初始负责人的终端设备的处理通知,且预设监控级别为三级监控,确定处理告警信息的最新负责人为初始负责人。
[0120] 作为一种可实现的方式,确定模块340,具体用于:若在第二预设时间内的第一预设时间段,确定处理告警信息的最新负责人为初始负责人,并将告警信息发送至最新负责人的终端设备的通知方式升级为电话通知;
[0121] 若在第二预设时间内的第二预设时间段,确定处理告警信息的最新负责人为团队负责人;
[0122] 若在第二预设时间内的第三预设时间段,确定处理告警信息的最新负责人为业务负责人。
[0123] 作为一种可实现的方式,该装置还包括脱敏模块,用于确定系统业务的前端日志信息和服务器日志信息中的敏感信息;
[0124] 对敏感信息进行脱敏处理,得到用于存储和分析的前端日志信息和服务器日志信息。
[0125] 作为一种可实现的方式,脱敏模块,具体用于采用哈希算法加密敏感信息;
[0126] 用预设符号替换敏感信息中敏感数字的部分数字;
[0127] 缩短敏感信息的长度。
[0128] 作为一种可实现的方式,该装置还包括加密模块,用于采用强随机数生成器生成初始密钥,基于高级加密标准和初始密钥对系统业务的前端日志信息和服务器日志信息进行加密。
[0129] 作为一种可实现的方式,预设监控级别是基于WEB系统预先通过Jenkins定时任务配置不同监控周期得到的。
[0130] 可以理解的是,实施本申请的任一方法或产品并不一定需要同时达到以上所述的所有优点。
[0131] 上述各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
[0132] 需要说明的是,本申请实施例中可能会涉及到对用户数据的使用,在实际应用中,可以在符合所在国的适用法律法规要求的情况下(例如用户明确同意,对用户切实通知,用户明确授权等),在适用法律法规允许的范围内在本文描述的方案中使用用户特定的个人数据。
[0133] 根据本申请的实施例,本申请还提供了一种计算机设备、一种计算机可读存储介质。
[0134] 如图4所示,是根据本申请实施例的计算机设备的框图。计算机设备旨在表示各种形式的数字计算机或移动装置。其中数字计算机可以包括台式计算机、便携式计算机、工作台、个人数字助理、服务器、大型计算机和其它适合的计算机。移动装置可以包括平板电脑、智能电话、可穿戴式设备等。
[0135] 如图4所示,计算机设备400包括计算单元401、ROM 402、RAM 403、总线404以及输入 / 输出(I / O)接口405,计算单元401、ROM 402以及RAM 403通过总线404彼此相连。输入 / 输出(I / O)接口405也连接至总线404。
[0136] 计算单元401可以根据存储在只读存储器(ROM)402中的计算机指令或者从存储单元408加载到随机访问存储器(RAM)403中的计算机指令,来执行本申请方法实施例中的各种处理。计算单元401可以是各种具有处理和计算能力的通用和 / 或专用处理组件。计算单元401可以包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。在一些实施例中,本申请实施例提供的方法可被实现为计算机软件程序,其被有形地包含于计算机可读存储介质,例如存储单元408。
[0137] RAM 403还可存储计算机设备400操作所需的各种程序和数据。计算机程序的部分或者全部可以经由ROM 402和 / 或通信单元409而被载入和 / 或安装到计算机设备400上。
[0138] 计算机设备400中的输入单元406、输出单元407、存储单元408和通信单元409可以连接至I / O接口405。其中,输入单元406可以是诸如键盘、鼠标、触摸屏、麦克风等;输出单元407可以是诸如显示器、扬声器、指示灯等。计算机设备400能够通过通信单元409与其他设备进行信息、数据等的交换。
[0139] 需要说明的是,该设备还可以包括实现正常运行所必需的其他组件。也可以仅包含实现本申请方案所必需的组件,而不必包含图中所示的全部组件。
[0140] 此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件和 / 或它们的组合中实现。
[0141] 用于实施本申请的方法的计算机指令可以采用一个或多个编程语言的任何组合来编写。这些计算机指令可以提供给计算单元401,使得计算机指令当由诸如处理器等计算单元401执行时使执行本申请方法实施例中涉及的各步骤。
[0142] 本申请提供的计算机可读存储介质可以是有形的介质,其可以包含或存储计算机指令,用以执行本申请方法实施例中涉及的各步骤。计算机可读存储介质可以包括但不限于电子的、磁性的、光学的、电磁的等形式的存储介质。
[0143] 上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。< / script>
Claims
1. A monitoring alarm method, characterized in that: The method is applied to a monitoring alarm system, wherein the system is provided with a front-end engineering software development kit (SDK) for obtaining front-end log information, a service engineering software development kit (SDK) for obtaining server-side log information, a log service, and a global wide area network (WEB) system. The front-end engineering SDK and the service engineering SDK are respectively configured with access points for the log service. The method comprises: Obtain the front-end log information of the system business corresponding to the front-end in real time through the front-end engineering SDK and send it to the log service; obtain the server log information of the server side corresponding to the system business in real time through the service engineering SDK and send it to the log service; The WEB system obtains the front-end log information and the server log information from the log service based on a preset monitoring level corresponding to the system service, and determines whether the system service is abnormal based on preset conditions; In response to determining that the system service is abnormal, generating an alarm message, and sending the alarm message to a terminal device of an initial person in charge of the system service; If no processing notification is received from the terminal device of the initial person in charge within the preset time, the latest person in charge of processing the alarm information is determined based on the preset monitoring level, and the alarm information is sent to the terminal device of the latest person in charge so that the alarm information can be processed in time.
2. The method according to claim 1, characterized in that The preset monitoring levels include level one monitoring, level two monitoring, and level three monitoring, and the preset times include a first preset time and a second preset time; if no processing notification is received from the terminal device of the initial person in charge within the preset time, determining the latest person in charge of processing the alarm information based on the preset monitoring level includes: If no processing notification is received from the terminal device of the initial person in charge within the first preset time, and the preset monitoring level is level one monitoring, the latest person in charge of processing the alarm information is determined to be the team leader; If no processing notification is received from the terminal device of the initial person in charge within the first preset time, and the preset monitoring level is level 2 monitoring, the latest person in charge of processing the alarm information is determined to be the initial person in charge; If no processing notification is received from the terminal device of the initial person in charge within the second preset time, and the preset monitoring level is level one monitoring, the latest person in charge of processing the alarm information is determined to be the business person in charge; If no processing notification is received from the terminal device of the initial person in charge within the second preset time, and the preset monitoring level is level 2 monitoring, determining the latest person in charge of processing the alarm information based on different time periods within the second preset time; If no processing notification is received from the terminal device of the initial person in charge within the preset time, and the preset monitoring level is level three monitoring, the latest person in charge of processing the alarm information is determined to be the initial person in charge.
3. The method according to claim 2, characterized in that The determining, based on different time periods within the second preset time, the latest person in charge of processing the alarm information includes: If, within the first preset time period within the second preset time period, the latest person in charge of processing the alarm information is determined to be the initial person in charge, the notification method of sending the alarm information to the terminal device of the latest person in charge is upgraded to telephone notification; If within the second preset time period of the second preset time, the latest person in charge of processing the alarm information is determined to be the team leader; If it is within a third preset time period within the second preset time, it is determined that the latest person in charge of processing the alarm information is the business person in charge.
4. The method according to claim 1, wherein In the process of obtaining the front-end log information and server log information of the system business in real time, the method further includes: Determine sensitive information in the front-end log information and server log information of the system business; The sensitive information is desensitized to obtain front-end log information and server log information for storage and analysis.
5. The method according to claim 4, characterized in that The desensitizing of the sensitive information includes at least one of the following methods: Use hashing algorithms to encrypt sensitive information; Replace part of sensitive numbers in sensitive information with preset symbols; Shorten the length of the sensitive information.
6. The method according to claim 1, characterized in that Before sending the front-end log information and the server log information of the system business to the log service, the method further includes: An initial key is generated by using a strong random number generator, and the front-end log information and server log information of the system business are encrypted based on the Advanced Encryption Standard and the initial key.
7. The method according to claim 1, characterized in that The preset monitoring level is obtained based on the WEB system pre-configuring different monitoring cycles through Jenkins scheduled tasks.
8. A monitoring alarm device, characterized in that: The device is provided on a monitoring alarm system, wherein the system is provided with a front-end engineering software development kit (SDK) for obtaining front-end log information, a service engineering software development kit (SDK) for obtaining server-side log information, a log service, and a global wide area network (WEB) system. The front-end engineering SDK and the service engineering SDK are respectively configured with access points for the log service. The device includes: An acquisition module is used to acquire the front-end log information of the front-end corresponding to the system business in real time through the front-end engineering SDK and send it to the log service, and to acquire the server log information of the server corresponding to the system business in real time through the service engineering SDK and send it to the log service; A judgment module, configured for the WEB system to obtain the front-end log information and the server log information from the log service based on a preset monitoring level corresponding to the system service, and to judge whether the system service is abnormal based on preset conditions; A generating module, configured to generate an alarm message in response to determining that the system service is abnormal, and send the alarm message to a terminal device of an initial person in charge of the system service; A determination module is used to determine the latest person in charge of processing the alarm information based on the preset monitoring level if no processing notification is received from the terminal device of the initial person in charge within the preset time, and send the alarm information to the terminal device of the latest person in charge so that the alarm information can be processed in a timely manner.
9. A computer device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores computer instructions that can be executed by the at least one processor. The computer instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: The computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 7.