CN111949481A - An anomaly tracking and detection system based on microservices - Google Patents
An anomaly tracking and detection system based on microservices Download PDFInfo
- Publication number
- CN111949481A CN111949481A CN202010798815.4A CN202010798815A CN111949481A CN 111949481 A CN111949481 A CN 111949481A CN 202010798815 A CN202010798815 A CN 202010798815A CN 111949481 A CN111949481 A CN 111949481A
- Authority
- CN
- China
- Prior art keywords
- tracking
- module
- data
- log
- code
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3452—Performance evaluation by statistical analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/172—Caching, prefetching or hoarding of files
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1805—Append-only file systems, e.g. using logs or journals to store data
- G06F16/1815—Journaling file systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Computer Hardware Design (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Probability & Statistics with Applications (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
本发明涉及异常追踪及检测技术领域,具体为一种基于微服务的异常追踪检测系统,包括追踪代码植入模块、日志采集模块和日志存储模块、异常追踪模块和异常检测模块,追踪代码植入模块根据需求选择AspectJ植入机制,将追踪代码直接嵌入目标代码模块内,AspectJ植入机制将代码自由地插入到追踪代码的任何位置,并根据配置信息自动化植入代码,可以对于各个分散的微服务进行监控,监控主要集中于各个微服务之间的调用请求,监控机制通过各链路上的追踪能够及时地将监控信息收集汇总。同时异常追踪系统还要能够对于产生的监控信息进行分析审计,提取出微服务之间交互的特征,并根据这些特征从监控信息中发现异常,并及时发出警报。
The invention relates to the technical field of abnormality tracking and detection, in particular to a microservice-based abnormality tracking and detection system, comprising a tracking code implantation module, a log collection module and a log storage module, an abnormality tracking module and an abnormality detection module, and a tracking code implantation module. The module selects the AspectJ implantation mechanism according to the requirements, and directly embeds the tracking code into the target code module. The service is monitored, and the monitoring mainly focuses on the call requests between the various microservices. The monitoring mechanism can collect and summarize the monitoring information in time through the tracking on each link. At the same time, the exception tracking system should also be able to analyze and audit the generated monitoring information, extract the characteristics of the interaction between microservices, find abnormalities from the monitoring information according to these characteristics, and issue an alarm in time.
Description
技术领域technical field
本发明涉及异常追踪及检测技术领域,具体为一种基于微服务的异常追踪检测系统。The invention relates to the technical field of abnormality tracking and detection, in particular to a microservice-based abnormality tracking and detection system.
背景技术Background technique
微服务架构强调更彻底的组件化和服务化,原来的单体应用按照业务被拆分为一系列独立分布的微服务,每个微服务都可以独立部署和扩展。微服务架构的这些特性,使得微服务面临更严峻的安全问题。微服务系统在向外提供服务时,需要向外暴露更多的接口,使得微服务遭受攻击的可能性大大增加。微服务通常被设计为相互信任的,假如入侵者入侵了某个微服务,完全控制了这个微服务,那么入侵者可以向其他微服务发送请求获取敏感信息,甚至攻击其他微服务导致整个系统瘫痪。The microservice architecture emphasizes more thorough componentization and serviceization. The original monolithic application is divided into a series of independently distributed microservices according to the business, and each microservice can be independently deployed and expanded. These characteristics of the microservice architecture make microservices face more severe security problems. When a microservice system provides services, it needs to expose more interfaces, which greatly increases the possibility of microservices being attacked. Microservices are usually designed to trust each other. If an intruder invades a microservice and completely controls the microservice, the intruder can send requests to other microservices to obtain sensitive information, or even attack other microservices and cause the entire system to collapse. .
目前的微服务异常追踪中用到的监控方法主要有两种:基于黑盒的监控方法以及基于标注的监控方法,黑盒方法需要更加详细的日志记录,才能达到比较高的精度,基于标注的方法主要缺点在于需要植入监控代码。There are two main monitoring methods used in the current microservice exception tracking: black-box-based monitoring methods and annotation-based monitoring methods. Black-box methods require more detailed logging to achieve higher accuracy. The main disadvantage of this method is the need to implant monitoring code.
发明内容SUMMARY OF THE INVENTION
本发明要解决的技术问题是如何省去监控代码的植入,同时确保异常追踪和检测的精度。The technical problem to be solved by the present invention is how to omit the implantation of monitoring codes while ensuring the accuracy of abnormal tracking and detection.
为了解决上述技术问题,本发明提供一种基于微服务的异常追踪检测系统,包括追踪代码植入模块、日志采集模块和日志存储模块、异常追踪模块和异常检测模块,追踪代码植入模块根据需求选择AspectJ植入机制,将追踪代码直接嵌入目标代码模块内,AspectJ植入机制将代码自由地插入到追踪代码的任何位置,并根据配置信息自动化植入代码。In order to solve the above technical problems, the present invention provides a micro-service-based anomaly tracking and detection system, including a tracking code implantation module, a log collection module and a log storage module, an exception tracking module and an exception detection module, and the tracking code implantation module is based on requirements. Select the AspectJ implantation mechanism to directly embed the tracking code into the target code module. The AspectJ implantation mechanism freely inserts the code into any position of the tracking code, and automatically implants the code according to the configuration information.
优选的,日志采集模块包括:分析收集器,分析收集器采用可植入的分析收集器,采集数据信息;Preferably, the log collection module includes: an analysis collector, and the analysis collector adopts an implantable analysis collector to collect data information;
分析收集器包括:从数据源提取数据功能的数据提取单元、数据存储单元以及数据传输单元。The analysis collector includes: a data extraction unit that extracts data from a data source, a data storage unit, and a data transmission unit.
优选的,日志收集模块收到日志数据后将对日志数据进行各个属性的提取,合并,格式转换后,最终将日志数据存储到日志存储模块中。Preferably, after receiving the log data, the log collection module will extract, merge, and format the log data for each attribute, and finally store the log data in the log storage module.
优选的,日志存储模块中获取追踪数据,并通过异常特征提取单元提取特征规则和过滤,提取过程中对异常追踪模块的追踪记录进行验证,追踪记录中有缺失或者被篡改,该模块会发出警报并将对应的信息写入到异常记录数据库中,并将数据标记为Next,写回到日志存储模块中。Preferably, the tracking data is obtained from the log storage module, and feature rules and filtering are extracted by the abnormal feature extraction unit. During the extraction process, the tracking records of the abnormal tracking module are verified. If the tracking records are missing or tampered with, the module will issue an alarm And write the corresponding information into the exception record database, mark the data as Next, and write it back to the log storage module.
优选的,异常特征提取单元提取步骤包括:Preferably, the extraction step of the abnormal feature extraction unit includes:
(1)、在日志存储模块中通过scan获取异常信息数据;(1) Obtain abnormal information data through scan in the log storage module;
(2)、数据规范化处理;(2), data normalization processing;
(3)、特征信息的提取;(3) Extraction of feature information;
(4)、判断调用关系、调用顺序、调用的角色关系是否分别在特征信息集合R1、R2、R3中,如果有一项不存在,执行告警提示,并终止服务进程,否则,返回执行判断关系,追踪异常动态。(4) Determine whether the calling relationship, calling sequence, and calling role relationship are in the feature information sets R1, R2, and R3, respectively. If one item does not exist, execute an alarm prompt and terminate the service process; otherwise, return to execute the judgment relationship. Track exceptions.
优选的,异常特征提取单元的提取方法位为:定义每个异常特征ID,每个ID对应着日志追踪中每次调用请求产生的ID,特征向量即为R1、R2、和R3,提取特征数据中每次调用的调用关系R1、调用顺序R2和调用角色R3。Preferably, the extraction method of the abnormal feature extraction unit is as follows: define each abnormal feature ID, each ID corresponds to the ID generated by each call request in the log tracking, and the feature vectors are R1, R2, and R3, and the feature data is extracted. The call relationship R1, the call sequence R2 and the call role R3 of each call in .
本发明的优点:Advantages of the present invention:
微服务应用的异常追踪系统可以对于各个分散的微服务进行监控,监控主要集中于各个微服务之间的调用请求,由于微服务分散在各个节点各个虚拟机,监控机制通过各链路上的追踪能够及时地将监控信息收集汇总。同时异常追踪系统还要能够对于产生的监控信息进行分析审计,提取出微服务之间交互的特征,并根据这些特征从监控信息中发现异常,并及时发出警报,解决微服务架构下的安全性问题。The exception tracking system for microservice applications can monitor each scattered microservice. The monitoring mainly focuses on the call requests between various microservices. Since the microservices are scattered in each node and each virtual machine, the monitoring mechanism can be traced through each link. The monitoring information can be collected and summarized in a timely manner. At the same time, the exception tracking system should also be able to analyze and audit the generated monitoring information, extract the characteristics of the interaction between microservices, find exceptions from the monitoring information according to these characteristics, and issue alarms in time to solve the security problem under the microservice architecture. question.
附图说明Description of drawings
图1为本发明系统框架图;Fig. 1 is the system frame diagram of the present invention;
图2为本发明异常特征提取单元提取流程图。FIG. 2 is a flowchart of the abnormal feature extraction unit extraction according to the present invention.
具体实施方式Detailed ways
为使本发明实现的技术手段、创作特征、达成目的与功效易于明白了解,下面结合具体实施方式,进一步阐述本发明。In order to make the technical means, creative features, achievement goals and effects realized by the present invention easy to understand, the present invention will be further described below with reference to the specific embodiments.
请参阅图1-2所示,一种基于微服务的异常追踪检测系统,包括追踪代码植入模块、日志采集模块和日志存储模块、异常追踪模块和异常检测模块,追踪代码植入模块根据需求选择AspectJ植入机制,将追踪代码直接嵌入目标代码模块内,AspectJ植入机制将代码自由地插入到追踪代码的任何位置,并根据配置信息自动化植入代码。Please refer to Figure 1-2. An exception tracking and detection system based on microservices includes a tracking code implantation module, a log collection module and a log storage module, an exception tracking module and an exception detection module. The tracking code implantation module is based on requirements. Select the AspectJ implantation mechanism to directly embed the tracking code into the target code module. The AspectJ implantation mechanism freely inserts the code into any position of the tracking code, and automatically implants the code according to the configuration information.
作为本发明的一种具体实施方式,日志采集模块包括:分析收集器,分析收集器采用可植入的分析收集器,采集数据信息;As a specific embodiment of the present invention, the log collection module includes: an analysis collector, and the analysis collector adopts an implantable analysis collector to collect data information;
分析收集器包括:从数据源提取数据功能的数据提取单元、数据存储单元以及数据传输单元。The analysis collector includes: a data extraction unit that extracts data from a data source, a data storage unit, and a data transmission unit.
作为本发明的一种具体实施方式,日志收集模块收到日志数据后将对日志数据进行各个属性的提取,合并,格式转换后,最终将日志数据存储到日志存储模块中。As a specific embodiment of the present invention, after receiving the log data, the log collection module will extract, merge, and format the log data with various attributes, and finally store the log data in the log storage module.
作为本发明的一种具体实施方式,日志存储模块中获取追踪数据,并通过异常特征提取单元提取特征规则和过滤,提取过程中对异常追踪模块的追踪记录进行验证,追踪记录中有缺失或者被篡改,该模块会发出警报并将对应的信息写入到异常记录数据库中,并将数据标记为Next,写回到日志存储模块中。As a specific embodiment of the present invention, the tracking data is obtained in the log storage module, and the feature rules and filtering are extracted by the abnormal feature extraction unit. During the extraction process, the tracking records of the abnormal tracking module are verified. If it is tampered with, the module will issue an alarm and write the corresponding information into the abnormal record database, mark the data as Next, and write it back to the log storage module.
作为本发明的一种具体实施方式,异常特征提取单元提取步骤包括:As a specific embodiment of the present invention, the abnormal feature extraction unit extraction step includes:
(1)、在日志存储模块中通过scan获取异常信息数据;(1) Obtain abnormal information data through scan in the log storage module;
(2)、数据规范化处理;(2), data normalization processing;
(3)、特征信息的提取;(3) Extraction of feature information;
(4)、判断调用关系、调用顺序、调用的角色关系是否分别在特征信息集合R1、R2、R3中,如果有一项不存在,执行告警提示,并终止服务进程,否则,返回执行判断关系,追踪异常动态。(4) Determine whether the calling relationship, calling sequence, and calling role relationship are in the feature information sets R1, R2, and R3, respectively. If one item does not exist, execute an alarm prompt and terminate the service process; otherwise, return to execute the judgment relationship. Track exceptions.
作为本发明的一种具体实施方式,异常特征提取单元的提取方法位为:定义每个异常特征ID,每个ID对应着日志追踪中每次调用请求产生的ID,特征向量即为R1、R2、和R3,提取特征数据中每次调用的调用关系R1、调用顺序R2和调用角色R3。As a specific embodiment of the present invention, the extraction method of the abnormal feature extraction unit is as follows: define each abnormal feature ID, each ID corresponds to the ID generated by each call request in the log tracking, and the feature vectors are R1, R2 , and R3, extract the calling relationship R1, calling sequence R2 and calling role R3 of each call in the feature data.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010798815.4A CN111949481A (en) | 2020-08-11 | 2020-08-11 | An anomaly tracking and detection system based on microservices |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010798815.4A CN111949481A (en) | 2020-08-11 | 2020-08-11 | An anomaly tracking and detection system based on microservices |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111949481A true CN111949481A (en) | 2020-11-17 |
Family
ID=73331997
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010798815.4A Pending CN111949481A (en) | 2020-08-11 | 2020-08-11 | An anomaly tracking and detection system based on microservices |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111949481A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113157478A (en) * | 2021-04-21 | 2021-07-23 | 多点(深圳)数字科技有限公司 | Distributed system configuration data acquisition and service alarm system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150106324A1 (en) * | 2013-10-11 | 2015-04-16 | Accenture Global Services Limited | Contextual graph matching based anomaly detection |
CN108243238A (en) * | 2016-12-27 | 2018-07-03 | 中国移动通信集团浙江有限公司 | A method and device for collecting performance data |
CN110196790A (en) * | 2018-02-24 | 2019-09-03 | 北京京东尚科信息技术有限公司 | The method and apparatus of abnormal monitoring |
CN110806959A (en) * | 2019-10-30 | 2020-02-18 | 国云科技股份有限公司 | Method for tracking distributed service chain and aggregating logs |
CN111427736A (en) * | 2019-01-09 | 2020-07-17 | 北京嘀嘀无限科技发展有限公司 | Log monitoring method, device, equipment and computer readable storage medium |
-
2020
- 2020-08-11 CN CN202010798815.4A patent/CN111949481A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150106324A1 (en) * | 2013-10-11 | 2015-04-16 | Accenture Global Services Limited | Contextual graph matching based anomaly detection |
CN108243238A (en) * | 2016-12-27 | 2018-07-03 | 中国移动通信集团浙江有限公司 | A method and device for collecting performance data |
CN110196790A (en) * | 2018-02-24 | 2019-09-03 | 北京京东尚科信息技术有限公司 | The method and apparatus of abnormal monitoring |
CN111427736A (en) * | 2019-01-09 | 2020-07-17 | 北京嘀嘀无限科技发展有限公司 | Log monitoring method, device, equipment and computer readable storage medium |
CN110806959A (en) * | 2019-10-30 | 2020-02-18 | 国云科技股份有限公司 | Method for tracking distributed service chain and aggregating logs |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113157478A (en) * | 2021-04-21 | 2021-07-23 | 多点(深圳)数字科技有限公司 | Distributed system configuration data acquisition and service alarm system |
CN113157478B (en) * | 2021-04-21 | 2024-05-10 | 多点(深圳)数字科技有限公司 | Distributed system configured data acquisition and service alarm system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111581054A (en) | ELK-based log point-burying service analysis and alarm system and method | |
CN114077525A (en) | Abnormal log processing method and device, terminal equipment, cloud server and system | |
CN109240886A (en) | Abnormality eliminating method, device, computer equipment and storage medium | |
CN106202511A (en) | A kind of alarm method based on log analysis and system | |
CN110764980A (en) | Log processing method and device | |
CN110149223A (en) | Fault Locating Method and equipment | |
CN112907377A (en) | Business process monitoring method, device, equipment and medium | |
CN112988509A (en) | Alarm message filtering method and device, electronic equipment and storage medium | |
CN111078513A (en) | Log processing method, device, equipment, storage medium and log alarm system | |
CN114117311A (en) | Data access risk detection method and device, computer equipment and storage medium | |
CN110012000B (en) | Command detection method and device, computer equipment and storage medium | |
CN101017459A (en) | Error capturing plug-in used in information system and method of use thereof | |
JP7554284B2 (en) | Identification method, device, security system and storage medium | |
CN118672874A (en) | System for link tracking and anomaly capturing | |
JP5045517B2 (en) | Design document creation program, apparatus, and method | |
CN105183648A (en) | Visualized automatic dial testing method and system | |
CN111949481A (en) | An anomaly tracking and detection system based on microservices | |
CN113691390B (en) | A cloud-coordinated edge node alarm system and method | |
JP2006099249A (en) | Fault management apparatus and fault management method | |
CN117950896A (en) | An automatic repair method based on a custom fault library of a domestic operating system | |
CN116318990A (en) | Attack chain real-time detection method and device, electronic equipment and storage medium | |
CN115834188A (en) | Vulnerability scanning monitoring method and system, electronic equipment and storage medium | |
CN114048097A (en) | Interface monitoring method, device, computing device and medium | |
CN119226086B (en) | Workflow exception handling method, device, computer equipment and storage medium | |
CN110213253A (en) | A kind of concealed information spy equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20201117 |