KR20190041192A - Method and device for collecting log based on rule - Google Patents

Method and device for collecting log based on rule Download PDF

Info

Publication number
KR20190041192A
KR20190041192A KR1020170132369A KR20170132369A KR20190041192A KR 20190041192 A KR20190041192 A KR 20190041192A KR 1020170132369 A KR1020170132369 A KR 1020170132369A KR 20170132369 A KR20170132369 A KR 20170132369A KR 20190041192 A KR20190041192 A KR 20190041192A
Authority
KR
South Korea
Prior art keywords
log
rule
log data
sampling rate
collection
Prior art date
Application number
KR1020170132369A
Other languages
Korean (ko)
Other versions
KR102088285B1 (en
Inventor
정진환
김승민
Original Assignee
에스케이텔레콤 주식회사
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 에스케이텔레콤 주식회사 filed Critical 에스케이텔레콤 주식회사
Priority to KR1020170132369A priority Critical patent/KR102088285B1/en
Publication of KR20190041192A publication Critical patent/KR20190041192A/en
Application granted granted Critical
Publication of KR102088285B1 publication Critical patent/KR102088285B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Abstract

The present invention relates to a rule-based dynamic log collection method capable of improving quality of collected log data while controlling the amount of dynamically collected log in accordance with quality of log generated for each service or application; and to an apparatus thereof. According to the present invention, the method and apparatus set one or more log collection rules including a condition defined based on log feature information and one or more behaviors related to log collection executed when the condition is matched. When the log data generated for each service or application is received, the method and apparatus compare the log feature information of the received log data with each condition defined in the one or more set log collection rules to check a matched log collection rule, and process the received log data in accordance with one or more behaviors defined in the corresponding log collection rule when the matched log collection rule exists.

Description

규칙 기반의 동적 로그 수집 방법 및 장치{Method and device for collecting log based on rule}[0001] The present invention relates to a rule-based dynamic log collection method and apparatus,

본 발명은 서비스 또는 애플리케이션별로 생성되는 로그의 품질에 맞추어 동적으로 수집하는 로그 양을 제어하면서 수집된 로그 데이터의 품질을 높일 수 있는 규칙 기반의 동적 로그 수집 방법 및 장치에 관한 것이다.The present invention relates to a rule-based dynamic log collection method and apparatus capable of increasing the quality of collected log data while controlling the amount of logs dynamically collected according to the quality of log generated for each service or application.

로그(Log)는 프로그램의 개발이나 운영시 발생하는 문제점을 추적하거나 운영 상태를 모니터링하기 위한 기록으로서, 클라우드 시스템과 같은 대규모 분산 시스템에서 장애 관리 및 효율적인 운영을 위해 로깅(logging)은 필수로 여겨진다.Logging is a record for tracking problems that occur during the development or operation of a program or for monitoring operational status. Logging is essential for fault management and efficient operation in large-scale distributed systems such as cloud systems.

그러나 클라우드 시스템에서 운영되는 서비스 혹은 애플리케이션의 수가 많아질 수록 발생되는 로그 양이 크게 증가하기 때문에, 적절한 통제가 이뤄지지 않을 경우에는 로그 양이 너무 많아져 로그 저장소가 부족해지거나 로그 데이터만으로도 클러스터 내부의 네트워크 대역폭을 상당량 차지하여 서비스 품질에 악영향을 주기도 한다.However, as the number of services or applications running in the cloud system increases, the amount of log generated increases significantly, so if the proper control is not achieved, the amount of log becomes too large and the log storage becomes insufficient, The service quality is adversely affected.

예를 들어, 서비스가 작은 단위의 컨테이너 기반 애플리케이션으로 구성되면, 외부 요청에 의한 처리는 수 개 혹은 수십 개의 애플리케이션이 연동되어 처리 된다. 이러한 경우, 서비스의 동작 상태를 추적하거나 장애 분석을 위해서는 여러 애플리케이션의 로그를 동시에 분석하여야 의미 있는 결론을 이끌어 낼 수 있다.For example, if a service is configured as a small unit of container-based application, processing by external request is handled by interworking several or dozens of applications. In such a case, it is necessary to simultaneously analyze the logs of various applications to trace the operation status of the service or to analyze the failure, and it is possible to draw meaningful conclusions.

통상 클라우드 시스템은, 도 1에 도시된 바와 같이, 분산 서버와 같은 복수의 노드(10)에 설치되어 수 백 혹은 수 천 개의 애플리케이션(110)이 끊임없이 실행되는데, 애플리케이션들이 서로 연동하여 동작하는 분산환경에서 로그 분석을 통해 의미있는 결론을 추출하기 위하여, 복수의 애플리케이션(110)에서 발생하는 로그 데이터를 중앙의 특정 데이터베이스(이하, 로그 데이터베이스(20)라 함)에 기록한다.1, a cloud system is installed in a plurality of nodes 10 such as a distributed server, and hundreds or thousands of applications 110 are continuously executed. In a distributed environment in which applications operate in conjunction with each other The log data generated in the plurality of applications 110 is recorded in a specific central database (hereinafter referred to as log database 20) in order to extract meaningful conclusions through log analysis.

따라서, 복수의 노드(10)에서 수 백 혹은 수 천 개의 애플리케이션(110)에서 발생하는 로그를 중앙의 로그 데이터베이스(20)로 전송하고 저장하기 위해, 클라우드 시스템의 내부 통신 자원 및 저장 자원을 상당량 소모하게 된다.Accordingly, a significant amount of internal communication and storage resources of the cloud system are consumed to transmit and store logs generated by hundreds or thousands of applications 110 in the plurality of nodes 10 to the central log database 20 .

특히, 최근의 클라우드 환경에서는 전통적인 3-tier 구조보다는 MSA(Micro-Service Architecture) 형태로 서비스가 개발되고 있다. 이러한 구조는 동일 기능이 제공된다는 가정하에서, MSA 애플리케이션에 대한 인스턴스 수가 3-tier 애플리케이션에 대한 인스턴스 수보다 평균적으로 많게 됨에 따라 로그 양이 더욱 커진다. 이와 같이, 로그 양이 증가함에 따라서, 수집하는 로그 양의 제어가 중요해지고 있다.In particular, in recent cloud environments, services are being developed in the form of MSA (Micro-Service Architecture) rather than the traditional 3-tier architecture. This structure is further enhanced with the assumption that the same functionality is provided, as the number of instances for an MSA application averages more than the number of instances for a 3-tier application. Thus, as the amount of log increases, the control of the amount of log collected is becoming important.

지금까지는 로그 양의 제어를 위해서, 지금까지는 크게 2가지 접근 방식을 취하고 있다.Until now, two approaches have been taken so far to control the log volume.

첫 번째는 개발 단계에서는 모든 로그를 수집하되, 운영 단계에서는 로그 기능을 제한하여 실 운영 환경에서는 애플리케이션이 로그 정보를 적게 생성하도록 한다. 즉, 도 2에 도시된 바와 같이, 각각의 애플리케이션(110)이 로그를 생성하여 노드(10)에 구비된 로컬 데이터베이스(120)에 저장하도록 하고, 로컬 데이터베이스(120)에 저장된 로그 데이터를 주기적으로 모아 중앙의 로그 데이터베이스(20)로 전송하는데 있어서, 애플리케이션(110)에서 특정 부분은 로그를 생성하도록 하고 특정 부분은 로그를 생성하지 않도록 애플리케이션 소스를 제어한다. 이는 애플리케이션(110)에서 생성하는 로그 자체를 통제하는 방식이기 때문에, 로그가 서비스 품질에 영향을 주거나 지나치게 로그 양이 많아지는 문제점을 해결할 수 있다. 반면에 첫번째 방법은, 애플리케이션(110)별로 어떤 로그를 수집하고, 어떤 로그를 수집하지 않아야 하는 지를 선택해야 하는 과정이 필요하고, 이러한 선택적인 로그 생성 기능을 서비스 로직에 반영하여야 하기 때문에, 서비스 중에 상황에 따라서 로그 양을 동적으로 변경하는 데는 어려움이 있다.First, all logs are collected during the development phase, but the log function is restricted in the operational phase so that the application generates less log information in a real operating environment. That is, as shown in FIG. 2, each application 110 generates a log, stores it in the local database 120 provided in the node 10, and periodically stores the log data stored in the local database 120 In the transfer to the central log database 20, the application 110 controls the application source such that certain parts generate logs and certain parts do not generate logs. Since this is a method of controlling the log itself generated by the application 110, it is possible to solve the problem that the log affects the service quality or the amount of log is excessively large. On the other hand, the first method requires a process of selecting which log is collected by each application 110 and which log should not be collected, and since this optional log generation function must be reflected in the service logic, Depending on the situation, it is difficult to dynamically change the amount of log.

두 번째는 로그 샘플링 방식으로서, 도 3에 도시된 바와 같이, 애플리케이션(110)은 모든 로그를 생성하도록 하되, 로그 수집기(130)를 추가로 구비하여, 상기 로그 수집기(130)가 로그를 선별적으로 골라 로컬 데이터베이스(120)에 저장하는 방식이다. 이는 서비스 로직과는 무관하게 로그 양을 제어할 수 있는 것으로서, 애플리케이션(110)에서 통제하도록 하는 방식에 비해 효율적이다. 그러나 이 방식도 서비스별로 샘플링률을 수동으로 조절하여야 하는 문제가 있으며, 단순 통계적 방식으로 로그를 선별하기 때문에, 중요한 로그를 놓치는 경우도 발생한다. 일례로 로그를 10개마다 1개만 보내기로 설정한 경우, 중요 로그가 15번째에 발생되면 이는 버려질 가능성이 크다.. 특히, 서비스별로 샘플링률을 수동으로 조절하기 때문에, 상황에 따라서 로그 양을 동적으로 변경하기에는 어려움이 있다.The second method is a log sampling method. As shown in FIG. 3, the application 110 generates all logs, and further includes a log collector 130 so that the log collector 130 can collect logs selectively And stores it in the local database 120. This can control the amount of log regardless of the service logic, which is more efficient than the method of controlling by the application 110. [ However, this method also has a problem of manually adjusting the sampling rate for each service, and since a log is selected by a simple statistical method, an important log may be missed. For example, if you set to send only 1 log every 10, if the important log occurs on the 15th, it is likely to be discarded. In particular, since the sampling rate is manually adjusted for each service, Difficult to change dynamically.

한국등록특허 제10-1671314호, 2016년 10월 26일 등록 (명칭: 여행상품 검색 로그 데이터 분석 시스템)Korean Registered Patent No. 10-1671314, registered on October 26, 2016 (Name: Travel Product Search Log Data Analysis System)

본 발명은 서비스 또는 애플리케이션 별로 생성되는 로그의 품질에 맞추어 동적으로 수집하는 로그 양을 제어하면서 수집된 로그 데이터의 품질을 높일 수 있는 규칙 기반의 동적 로그 수집 방법 및 장치를 제공하고자 한다.An object of the present invention is to provide a rule-based dynamic log collection method and apparatus capable of increasing the quality of collected log data while controlling the log amount dynamically collected according to the quality of log generated for each service or application.

본 발명은 상술한 과제의 해결 수단으로서, 로그 특징 정보를 기준으로 정의되는 조건과, 상기 조건이 매칭되는 경우에 실행되는 로그 수집과 관련된 하나 이상의 행위로 이루어지는 로그 수집 규칙을 하나 이상 설정하는 단계; 서비스 또는 애플리케이션 별로 생성되는 로그 데이터를 수신하는 단계; 상기 수신한 로그 데이터의 로그 특징 정보를 상기 설정한 하나 이상의 로그 수집 규칙에 정의된 각 조건과 비교하여 매칭되는 로그 수집 규칙을 확인하는 단계; 및 매칭되는 로그 수집 규칙이 존재하면, 해당 로그 수집 규칙에 정의된 하나 이상의 행위에 따라서 상기 수신된 로그 데이터를 처리하는 단계를 포함하는 규칙 기반의 동적 로그 수집 방법을 제공한다.Setting at least one log collection rule consisting of at least one action related to a log collection executed when the condition is matched with a condition defined based on the log characteristic information as a solution to the above-mentioned problem of the present invention; Receiving log data generated for each service or application; Comparing log feature information of the received log data with each condition defined in the set one or more log collection rules and checking matching log collection rules; And processing the received log data according to one or more actions defined in the log collection rule, if there is a matching log collection rule.

상기 규칙 기반의 동적 로그 수집 방법에서, 상기 로그 특징 정보는, 로그 레벨, 로그 생성자, 로그 생성 시간, 로그 생성 위치 중 하나 이상을 포함할 수 있다.In the rule-based dynamic log collection method, the log characteristic information may include at least one of a log level, a log creator, a log generation time, and a log generation position.

더하여, 상기 규칙 기반의 동적 로그 수집 방법에서, 상기 로그 데이터를 처리하는 단계는, 상기 수신된 로그 데이터를 샘플링률에 관계없이 바로 저장하는 단계; 상기 수신된 로그 데이터를 현재 설정된 샘플링률에 따라서 저장 또는 삭제하는 단계; 및 현재 설정된 샘플링률을 증감시키는 단계 중에서 하나 이상을 포함할 수 있다.In addition, in the rule-based dynamic log collection method, the processing of the log data may include storing the received log data directly regardless of a sampling rate; Storing or deleting the received log data according to a currently set sampling rate; And increasing or decreasing the currently set sampling rate.

또한, 상기 규칙 기반의 동적 로그 수집 방법에서, 상기 로그 수집 규칙의 조건은, 특정 로그 특징 정보를 갖는 로그 데이터의 발생 여부, 및 상기 로그 데이터의 발생 횟수 중 하나 이상을 포함할 수 있다.In the rule-based dynamic log collection method, the condition of the log collection rule may include at least one of whether log data having specific log characteristic information is generated and the number of times the log data is generated.

또한, 상기 규칙 기반의 동적 로그 수집 방법은, 매칭되는 로그 수집 규칙이 존재하지 않으면, 현재 설정된 샘플링률에 따라서 수신된 로그데이터를 저장 또는 삭제하는 단계를 더 포함할 수 있다.The rule-based dynamic log collection method may further include storing or deleting the received log data according to a currently set sampling rate if there is no matching log collection rule.

또한, 상기 규칙 기반의 동적 로그 수집 방법은, 상기 수신하는 단계 이전에, 로그 데이터를 수집하는 빈도를 나타내는 샘플링률에 대한 디폴트값, 상한값, 및 하한값 중에서 하나 이상을 포함하는 기준 정보를 설정하는 단계를 더 포함하고, 상기 로그 데이터를 처리하는 단계에서 상기 기준 정보에 의해 정의된 범위 이내에서 상기 로그 데이터를 처리하도록 할 수 있다.The rule-based dynamic log collection method may further include setting reference information including at least one of a default value, an upper limit value, and a lower limit value for a sampling rate indicating a frequency of collecting log data before the receiving step And processing the log data within a range defined by the reference information in processing the log data.

더하여, 본 발명은 상술한 과제의 해결 수단으로서, 로그 특징 정보를 기준으로 정의되는 조건과, 상기 조건이 매칭되는 경우에 실행되는 로그 수집과 관련된 하나 이상의 행위로 이루어지는 하나 이상의 로그 수집 규칙을 저장하고, 서비스 또는 애플리케이션 별로 생성되는 로그 데이터의 로그 특징 정보를 기 설정된 하나 이상의 로그 수집 규칙과 비교하여, 현재 수신되는 로그 데이터에 매칭되는 로그 수집 규칙을 확인하는 규칙 해석기; 상기 규칙 해석기에서 매칭되는 것으로 확인된 로그 수집 규칙에 따라서 기 설정된 샘플링률을 조정하는 샘플링 조정기; 및 상기 규칙 해석기에서 매칭되는 것으로 확인된 로그 수집 규칙 또는 현재 설정된 샘플링률에 따라서 현재 수신된 로그 데이터를 저장하거나 삭제하는 로그 처리기를 포함하는 규칙 기반의 동적 로그 수집 장치를 제공한다.In addition, the present invention stores, as means for solving the above-mentioned problems, at least one log collection rule consisting of at least one action related to a condition defined on the basis of log feature information and a log collection performed when the condition is matched A rule analyzer that compares log feature information of log data generated for each service or application with at least one log collection rule set to determine a log collection rule matching the currently received log data; A sampling regulator for adjusting a predetermined sampling rate according to a log collection rule determined to match in the rule analyzer; And a log processor for storing or deleting log data currently received according to a log collection rule determined to match in the rule analyzer or a currently set sampling rate.

상기 규칙 기반의 동적 로그 수집 장치는, 상기 서비스 또는 애플리케이션 별로 생성되는 로그 데이터를 수신하여, 기 설정된 형식으로 정형화하는 로그 분석기를 더 포함할 수 있다.The rule-based dynamic log collection device may further include a log analyzer that receives log data generated for each service or application and formats the log data into a predetermined format.

본 발명은 서비스 또는 애플리케이션의 실행 중에 생성하는 로그를 분석하는 로그 분석 시스템, 특히, 분석 대상이 되는 서비스 또는 애플리케이션이 실행되는 노드에 적용되어, 해당 서비스 또는 애플리케이션에서 생성되는 로그 데이터를 수집하는데 있어서, 로그 특징 정보를 기준으로 한 조건 및 상기 조건에 매칭될 때 수행되는 로그 수집을 제어할 수 있는 행위로 이루어진 로그 수집 규칙을 서비스 또는 애플리케이션 별로 하나 이상 설정하고, 상기 서비스에서 해당하는 애플리케이션들 혹은 각 애플리케이션에 생성되는 로그 데이터를 모니터링하여, 로그 수집 규칙의 조건이 매칭될 때, 해당 조건에 대응하여 설정된 행위를 수행함으로써, 샘플링률에 따라서 로그 데이터를 수집하면서, 샘플링률을 로그 생성 상황에 맞추어 변경시킴으로써 수집되는 로그 데이터의 량을 동적으로 변경할 수 있다.The present invention relates to a log analysis system for analyzing a log generated during execution of a service or an application, and more particularly to a log analysis system for collecting log data generated by a corresponding service or application, A log collection rule including at least one log collection rule including a condition based on the log characteristic information and an action capable of controlling log collection performed when the condition is matched is set for each service or application, When the conditions of the log collection rule are matched, log data is collected according to the sampling rate by performing an action set corresponding to the condition, and the sampling rate is changed according to the log generation situation Number Which can change the amount of the log data dynamically.

이를 통하여, 본 발명은 로그 양을 로그 생성 상황에 맞게 유연하게 조절할 수 있으며, 특히, 운영자가 높은 관심을 두는 로그 데이터를 더 높은 빈도로 수집하고 그렇지 않은 로그에 대해서는 수집 빈도를 감소시킴으로써 로그 양을 제어함과 동시에 수집된 로그 데이터에 대한 품질도 높일 수 있다.Accordingly, the present invention can flexibly adjust the amount of log to meet the log generation situation, and in particular, it is possible to collect the log data with high interest by the operator at a higher frequency, and reduce the collection frequency with respect to the non- It is possible to increase the quality of the collected log data at the same time as the control.

더하여, 본 발명은 노드에 이미 설치된 로그 에이전트의 처리 흐름에 적용함으로써, 기존 로그 시스템의 큰 변화 없이도 적용할 수 있다.In addition, the present invention can be applied to a process flow of a log agent already installed in a node, without applying a large change to an existing log system.

도 1은 로그 수집 시스템의 기본 구조를 나타낸 블럭도이다.
도 2는 종래의 로그 수집 방식을 설명하기 위한 도면이다.
도 3은 종래의 다른 로그 수집 방식을 설명하기 위한 도면이다.
도 4는 본 발명에 따른 규칙 기반의 동적 로그 수집 장치를 도시한 블럭도이다.
도 5는 본 발명에 따른 규칙 기반의 동적 로그 수집 방법을 나타낸 순서도이다.
1 is a block diagram showing a basic structure of a log collection system.
2 is a diagram for explaining a conventional log collection method.
3 is a view for explaining another conventional log collection method.
4 is a block diagram illustrating a rule-based dynamic log collector according to the present invention.
FIG. 5 is a flowchart illustrating a rule-based dynamic log collection method according to the present invention.

이하 본 발명의 바람직한 실시 예를 첨부한 도면을 참조하여 상세히 설명한다. 다만, 하기의 설명 및 첨부된 도면에서 본 발명의 요지를 흐릴 수 있는 공지 기능 또는 구성에 대한 상세한 설명은 생략한다. 또한, 도면 전체에 걸쳐 동일한 구성 요소들은 가능한 한 동일한 도면 부호로 나타내고 있음에 유의하여야 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description and the accompanying drawings, detailed description of well-known functions or constructions that may obscure the subject matter of the present invention will be omitted. It should be noted that the same constituent elements are denoted by the same reference numerals as possible throughout the drawings.

이하에서 설명되는 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니 되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위한 용어의 개념으로 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다. 따라서 본 명세서에 기재된 실시 예와 도면에 도시된 구성은 본 발명의 가장 바람직한 일 실시 예에 불과할 뿐이고, 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원시점에서 이들을 대체할 수 있는 다양한 균등물과 변형 예들이 있을 수 있음을 이해하여야 한다.The terms and words used in the present specification and claims should not be construed to be limited to ordinary or dictionary meanings and the inventor is not limited to the concept of terminology for describing his or her invention in the best way. It should be interpreted as meaning and concept consistent with the technical idea of the present invention. Therefore, the embodiments described in the present specification and the configurations shown in the drawings are merely the most preferred embodiments of the present invention and are not intended to represent all of the technical ideas of the present invention. Therefore, various equivalents It should be understood that water and variations may be present.

또한, 제1, 제2 등과 같이 서수를 포함하는 용어는 다양한 구성요소들을 설명하기 위해 사용하는 것으로, 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용될 뿐, 상기 구성요소들을 한정하기 위해 사용되지 않는다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제2 구성요소는 제1 구성요소로 명명될 수 있고, 유사하게 제1 구성요소도 제2 구성요소로 명명될 수 있다.Also, terms including ordinal numbers such as first, second, etc. are used to describe various elements, and are used only for the purpose of distinguishing one element from another, Not used. For example, without departing from the scope of the present invention, the second component may be referred to as a first component, and similarly, the first component may also be referred to as a second component.

더하여, 어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급할 경우, 이는 논리적 또는 물리적으로 연결되거나, 접속될 수 있음을 의미한다. 다시 말해, 구성요소가 다른 구성요소에 직접적으로 연결되거나 접속되어 있을 수 있지만, 중간에 다른 구성요소가 존재할 수도 있으며, 간접적으로 연결되거나 접속될 수도 있다고 이해되어야 할 것이다.In addition, when referring to an element as being "connected" or "connected" to another element, it means that it can be connected or connected logically or physically. In other words, it is to be understood that although an element may be directly connected or connected to another element, there may be other elements in between, or indirectly connected or connected.

또한, 본 명세서에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 또한, 본 명세서에서 기술되는 "포함 한다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Also, the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. It is also to be understood that the terms such as " comprising " or " having ", as used herein, are intended to specify the presence of stated features, integers, It should be understood that the foregoing does not preclude the presence or addition of other features, numbers, steps, operations, elements, parts, or combinations thereof.

본 발명에 따른 규칙 기반의 동적 로그 수집 장치 및 방법은, 도 1과 같은 분산 기반의 서비스 시스템에서, 하나 이상의 애플리케이션 또는 서비스를 실행하는 각 노드(10)에 적용되어, 상기 노드(10)에서 운용되는 하나 이상의 애플리케이션(110)으로부터 생성되는 로그를 모니터링하여, 적절한 량의 로그 데이터를 수집하기 위한 것이다. 특히, 본 발명은 도 3과 같은 로그 샘플링 방식에 적용 가능한 것으로서, 애플리케이션(110)이 모든 로그를 생성하도록 한 후, 상기 애플리케이션(110)에서 생성된 로그를 선별 수집하여 로컬 DB(120)에 저장하는 것이다.A rule-based dynamic log collection apparatus and method according to the present invention is applied to each node (10) executing one or more applications or services in a distributed based service system such as the one shown in FIG. 1, To collect an appropriate amount of log data. ≪ RTI ID = 0.0 > [0031] < / RTI > In particular, the present invention is applicable to the log sampling method as shown in FIG. 3, and after the application 110 generates all the logs, the logs generated by the application 110 are collected and stored in the local DB 120 .

이러한 본 발명에 따른 규칙 기반의 동적 로그 수집 장치 및 방법의 구성 및 동작을 도 3 및 도 4를 참조하여 설명한다.The configuration and operation of the rule-based dynamic log collection apparatus and method according to the present invention will be described with reference to FIGS. 3 and 4. FIG.

도 3은 본 발명의 일 실시 예에 따른 규칙 기반의 동적 로그 수집 장치의 구성을 나타낸 블럭도이다.3 is a block diagram illustrating a configuration of a rule-based dynamic log collection apparatus according to an embodiment of the present invention.

도 3을 참조하면, 본 발명에 따른 규칙 기반의 동적 로그 수집 장치(400)는, 해당 노드(10)에서 운용되는 애플리케이션 또는 서비스 별로 로그 수집 규칙(410)을 설정하고, 상기 로그 수집 규칙(410)에 따라서 복수의 애플리케이션(110)으로부터 생성된 로그를 선별적으로 수집하여 해당 노드(10)에 설치된 로컬 DB(360)에 저장하되, 저장하는 로그의 양을 동적으로 조정한다.3, the rule-based dynamic log collection apparatus 400 according to the present invention sets a log collection rule 410 for each application or service operated in the corresponding node 10, , And stores the logs in the local DB 360 installed in the corresponding node 10, and dynamically adjusts the amount of logs to be stored.

참고로, 애플리케이션(110)에서 생성되는 로그 데이터는, 그 성격에 따라서 복수의 레벨로 구분될 수 있다. Java로 구현되는 애플리케이션의 예를 들면, 로그 레벨은 FATAL, ERROR, WARN, INFO, DEBUG, TRACE 6개의 계층으로 구성된다. 여기서, FATAL은 프로그램이 중지될 수도 있는 치명적인 에러와 관련된 로그를 나타내며, ERROR는 프로그램이 중지될 정도는 아닌 에러에 대한 로그를 나타내며, WARN은 잠재적인 위험한 상황의 로그 데이터를 나타내며, INFO은 프로그램의 진행 상황을 단순히 보고하는 로그 데이터를 나타내며, DEBUG는 프로그램의 디버깅을 위해 필요한 정보를 갖는 로그 데이터를 나타내며, TRACE 는 DEBUG보다 세분화된 정보를 갖는 로그 데이터를 나타낸다.For reference, the log data generated by the application 110 may be divided into a plurality of levels according to their characteristics. For example, an application that is implemented in Java has six levels of log levels: FATAL, ERROR, WARN, INFO, DEBUG, and TRACE. Here, FATAL indicates a log relating to a fatal error that may cause the program to be stopped, ERROR indicates a log of an error not so much that the program is stopped, WARN indicates log data of a potentially dangerous situation, DEBUG represents log data with information necessary for program debugging, and TRACE represents log data with more granular information than DEBUG.

본 발명에 따른 규칙 기반의 동적 로그 수집 장치(400)는 이러한 로그 레벨을 고려하여 로그 발생 상황을 고려하여 애플리케이션 또는 서비스별로 하나 이상의 로그 수집 규칙(410)을 정의하고, 상기 애플리케이션(110)에서 생성된 로그들을 모니터링하여 현재 로그 발생 상황에 맞는 로그 수집 규칙(410)을 적용하여 로그 수집량을 동적으로 조절한다. 예를 들어, 개발자 혹은 운영자 입장에서 꼭 필요한 ERROR, WARN 레벨의 로그 데이터는 누락시키는 일 없이 수집하는 반면, 정상 작동 중에 발생하는 INFO 레벨의 로그 데이터는 가능한 한 적게 수집하는 형태로, 로그 수집량을 조절할 수 있다.The rule-based dynamic log collection device 400 according to the present invention may define one or more log collection rules 410 for each application or service in consideration of the log generation status in consideration of the log level, And log collection rules (410) according to the current log generation situation are applied to dynamically adjust the log collection amount. For example, ERROR and WARN level log data required by a developer or an operator is collected without omission, while INFO level log data generated during normal operation is collected as little as possible. .

이를 위해 본 발명에서 로그 레벨은 상술한 6개의 계층으로 구분될 수도 있으며, 보다 단순하게, INFO, WARNING, ERROR 3개의 계층으로만 구분할 수 있다.To this end, the log level of the present invention may be divided into six layers as described above, and can be divided into three layers of INFO, WARNING and ERROR more simply.

다시 도 4를 참조하면, 본 발명에 따른 규칙 기반의 동적 로그 수집 장치(400)는, 상술한 기능의 수행을 위하여, 로그 분석기(420)와, 규칙 해석기(430)와, 샘플링 조정기(440)와, 로그 처리기(450)를 포함하여 구성될 수 있다.4, the rule-based dynamic log collection apparatus 400 according to the present invention includes a log analyzer 420, a rule analyzer 430, a sampling regulator 440, And a log processor 450, as shown in FIG.

해당 노드(10)의 애플리케이션(110)에서 생성된 로그 데이터는 모두 로그 분석기(420)로 수신된다.The log data generated by the application 110 of the corresponding node 10 are all received by the log analyzer 420.

상기 로그 분석기(420)는 하나 이상의 애플리케이션(110)로부터 생성된 로그 데이터를 수신하여 정형화시킨다. 구체적으로, 통상의 로그 데이터는, 로그 생성자(서비스 혹은 애플리케이션 명), 로그 생성 날짜, 로그 레벨(예를 들어, INFO, WARN, ERROR), 로그 발생 위치, 로그 내용 중 하나 이상을 포함하여 구성되는데, 일정한 형태나 형식이 정해져 있지 않기 때문에, 애플리케이션 또는 서비스 별로 로그 데이터 형식이 다를 수 있다. 따라서, 상기 로그 분석기(420)는 하나 이상의 애플리케이션(110)로부터 생성된 로그 데이터를 수신하여, 이를 기설정된 형식으로 정형화시킨다. The log analyzer 420 receives and formats log data generated from one or more applications 110. Specifically, the normal log data includes at least one of a log creator (service or application name), a log generation date, a log level (for example, INFO, WARN, ERROR) , There is no fixed form or format, so the log data format may be different for each application or service. Thus, the log analyzer 420 receives log data generated from one or more applications 110 and formats it into a predetermined format.

이러한 로그 분석기(420)에서 정형화된 로그 데이터는 규칙 해석기(430)로 입력된다. 상기 규칙 해석기(430)는 입력된 로그 데이터를 기 설정된 로그 수집 규칙(410)과 비교하여 현재 로그 생성 상황에 매칭되는 로그 수집 규칙을 확인한다.Log data formatted in the log analyzer 420 is input to the rule analyzer 430. [ The rule interpreter 430 compares the input log data with a preset log collection rule 410 to check log collection rules matching the current log generation status.

상기 로그 수집 규칙(410)은, 로그 생성 상황에 따라서 동적으로 로그 수집 양을 조정할 수 있도록, {조건, 행위}로 정의된다. 상기 "조건"은 해당 규칙이 적용되는 조건으로서, 하나 이상의 로그 특징 정보(예를 들어, 로그 생성자, 로그 레벨, 로그 발생 위치 등)를 포함할 수 있다. 그리고 상기 "행위"는 로그 수집과 관련된 행위로서, 구체적으로, 로그의 저장 또는 수집 빈도를 결정하는 행위이다.The log collection rule 410 is defined as {condition, action} so that the amount of log collection can be adjusted dynamically according to the log generation situation. The " condition " may include one or more log characteristic information (e.g., a log creator, a log level, a log generation location, etc.) as a condition to which the rule is applied. The above-mentioned " action " is an action related to log collection, specifically, a determination of the frequency of storing or collecting logs.

즉, 상기 규칙 해석기(430)는 정형화된 로그 데이터의 로그 특징 정보와 상술한 바와 같이 정의된 로그 수집 규칙을 비교하여, 현재 수신되는 로그 데이터에 매칭되는 로그 수집 규칙을 확인한다.That is, the rule analyzer 430 compares the log feature information of the formatted log data with the log collection rules defined as described above, and checks the log collection rules matching the currently received log data.

상기 규칙 해석기(430)는 현재 생성된 로그 데이터에 매칭되는 로그 수집 규칙을 샘플링 조정기(440) 및 로그 처리기(450)로 전달하며, 상기 샘플링 조정기(440) 및 로그 처리기(450)가 매칭되는 로그 수집 규칙에 정의된 행위를 수행한다.The rule interpreter 430 transmits a log collection rule matching the log data currently generated to the sampling regulator 440 and the log processor 450. The log analyzer 440 and the log processor 450 compare the log Performs the actions defined in the collection rules.

구체적으로, 로그 처리기(450)는 상기 규칙 해석기(430)에서 확인된 매칭되는 로그 수집 규칙에 설정된 행위에 따라서 상기 수신된 로그 데이터를 처리한다. 여기서, 로그 데이터의 처리는, 로컬 DB(460)로 바로 저장하거나, 바로 저장없이 버리거나, 설정된 샘플링률에 따라서 선별하여 저장하는 행위를 포함한다.Specifically, the log processor 450 processes the received log data according to the action set in the matching log collection rule identified by the rule analyzer 430. [ Here, the processing of the log data includes an operation of directly storing the log data in the local DB 460, discarding it immediately without storing it, or selectively storing the log data according to the set sampling rate.

그리고 상기 샘플링 조정기(440)는 상기 규칙 해석기(430)에서 확인된 매칭되는 로그 수집 규칙에 설정된 행위에 따라서, 상기 로그 처리기(450)에 설정된 샘플링률을 변경한다. The sampling coordinator 440 changes the sampling rate set in the log processor 450 in accordance with the action set in the matching log collection rule confirmed by the rule analyzer 430. [

즉, 본 발명에 따른 규칙 기반의 동적 로그 수집 장치(400)는, 로그 수집 규칙에 따라서, 애플리케이션(110)에서 생성된 로그 데이터를 바로 저장하거나, 바로 저장없이 버리거나, 설정된 샘플링률에 따라서 선별하여 저장하면서, 설정된 샘플링률을 자동으로 변경할 수 있으며, 그 결과, 로그 생성 상황에 따라서 로그 수집 량을 동적으로 조정할 수 있다.In other words, the rule-based dynamic log collecting apparatus 400 according to the present invention can directly store log data generated by the application 110 according to a log collection rule, discard log data without storing it immediately, or sort the log data according to a set sampling rate As a result, it is possible to dynamically adjust the log collection amount according to the log generation situation.

이하에서, 본 발명에 따른 규칙 기반의 동적 로그 수집 장치(400)에 따른 동적인 로그 수집 동작을 예를 들어 설명한다.Hereinafter, a dynamic log collection operation according to the rule-based dynamic log collection apparatus 400 according to the present invention will be described by way of example.

본 발명에서, 조건과 행위로 정의되는 로그 수집 규칙(410)은, 더 구체적으로, 로그 특징 정보 중 로그 레벨을 기준으로 설정될 수 있는데, 이 경우, "로그 레벨 A의 로그가 N개 지속되면, 로그를 저장/삭제하고, 샘플링률을 P% 증감시킨다"라는 형식으로 설정될 수 있다.In the present invention, log collection rules 410 defined as conditions and behaviors may be more specifically set based on the log level of log feature information, in which case " if N logs of log level A persist , The log is saved / deleted, and the sampling rate is increased or decreased by P%.

하기는, 특정 애플리케이션에 대하여 상술한 형식으로 설정된 로그 수집 규칙을 예시한 것이다. 참고로, 애플리케이션 또는 서비스 별로 하기와 같은 로그 수집 규칙이 하나 이상 설정될 수 있다.The following is an example of a log collection rule set in the above-described format for a specific application. For reference, one or more log collection rules may be set for each application or service.

Rule1={INFO≥1000, 0, -1} : INFO 레벨의 로그가 1000개 연속적으로 발생하면, 샘플링률을 1% 감소시킨다.Rule1 = {INFO≥1000, 0, -1}: Reduces the sampling rate by 1% when 1000 logs of INFO level occur consecutively.

Rule2={WARNING, 1, +1} : WARNING 레벨의 로그가 1회 발생하면, 해당 로그를 수집하고, 샘플링률을 1% 증가시킨다.Rule2 = {WARNING, 1, +1}: WARNING If a log of level is encountered once, collect the log and increase the sampling rate by 1%.

Rule3={ERROR, 1, +5} : ERROR 레벨의 로그가 1회 나오면 해당 로그를 수집하고, 샘플링률을 5% 증가시킨다.Rule3 = {ERROR, 1, +5}: Collect ERROR level log once, and increase the sampling rate by 5%.

상기 예에서, 로그 수집 규칙은, {조건, 저장여부, 샘플링 조정값}으로 이루어진다. 여기서, 저장 여부 및 샘플링 조정값은, 저장 및 샘플링률을 결정하는 행위 정보이다. 특히, 저장 여부는 0인 경우, 설정된 샘플링률에 따라서 저장하고, 저장 여부가 1인 경우, 샘플링률과 관계없이 저장하는 것을 의미한다.In the above example, the log collection rule consists of {condition, storage status, sampling adjustment value}. Here, the storage state and the sampling adjustment value are action information for determining the storage and sampling rate. Particularly, if the storage state is 0, it means that it is stored according to the set sampling rate, and when the storage state is 1, it means that it is stored regardless of the sampling rate.

이에 따르면, 해당 특정 애플리케이션(110)으로부터 ERROR 레벨의 로그 데이터가 수신된 경우, 규칙 해석기(430)는 매칭되는 로그 수집 규칙으로 규칙 3을 추출하여 샘플링 조정기(440) 및 로그 처리기(450)로 전달하며, 이에 샘플링 조정기(440)는 로그 처리기(450)에 설정된 샘플링률을 5%로 증가시키고, 로그 처리기(450)는 상기 수신된 ERROR 레벨의 로그 데이터를 로컬 DB(460)에 저장한다.If the log data of the ERROR level is received from the specific application 110, the rule analyzer 430 extracts the rule 3 with matching log collection rules and sends the rule 3 to the sampling regulator 440 and the log processor 450 And the sampling coordinator 440 increases the sampling rate set in the log processor 450 to 5%, and the log processor 450 stores the log data of the received ERROR level in the local DB 460.

반대로, 해당 특정 애플리케이션(110)로부터 INFO 레벨의 로그가 연속적으로 1000개 발생한 경우, 규칙 해석기(430)는 규칙 1을 추출하여 샘플링 조정기(440)로 전달하고, 로그 데이터를 로그 처리기(450)로 전달한다. 이에, 상기 샘플링 조정기(440)는 로그 처리기(450)에 설정되는 샘플링률을 1% 감소시키고, 로그 처리기(450)는 1% 감소된 샘플링률로 수신되는 INFO 레벨의 로그 데이터를 선별하여 로컬 DB(460)에 저장한다.Conversely, when 1000 consecutive INFO level logs are generated from the specific application 110, the rule interpreter 430 extracts the rule 1 and transfers it to the sampling coordinator 440, and transmits the log data to the log processor 450 . Accordingly, the sampling regulator 440 reduces the sampling rate set in the log processor 450 by 1%, and the log processor 450 selects the log data at the INFO level received at the sampling rate reduced by 1% (460).

상기 규칙에 따르면, 해당 애플리케이션(110)에서 INFO 레벨의 로그 데이터만이 연속적으로 발생하는 경우, 샘플링률은 점차 감소되어, 본 발명에 따른 로그 수집 장치(400)에서 수집되는 로그 데이터량을 점진적으로 감소되다가, WARNING 또는 ERROR 레벨의 로그 데이터가 발생하면, 샘플링률이 올라가면서 로그 수집 장치(400)에서 수집되는 로그 데이터량이 증가된다.According to the above rule, when only the INFO level log data is continuously generated in the application 110, the sampling rate is gradually decreased, and the log data amount collected in the log collecting apparatus 400 according to the present invention is gradually And if log data of a WARNING or ERROR level is generated, the amount of log data collected in the log collecting apparatus 400 increases as the sampling rate increases.

통상적으로, 애플리케이션 또는 서비스가 정상적으로 운용되는 경우에 발생되는 로그 데이터는 단순한 보고 용으로서, 운영자나 개발자의 입장에서 불필요한 데이터이다. 따라서, 정상 상태임을 확인할 수 있을 정도만 필요하다. 반면에 장애가 발생한 경우엔 INFO 레벨의 로그 데이터라도 서비스 품질이 정상보다는 좋지 않음을 보여주는 로그 정보가 실려 있을 가능성이 높다. 따라서, WARING 또는 ERROR 레벨의 로그 데이터는 반드시 수집함과 동시에, WARING 또는 ERROR 레벨의 로그 발생 시, INFO 레벨의 로그 데이터의 수집 빈도도 좀 더 증가시키는 것이 바람직하며, 본 발명은 이러한 상황에 맞추어 동적으로 유의미한 로그 데이터를 수집할 수 있다.Generally, log data generated when an application or a service is normally operated is merely for reporting, and is unnecessary data from the viewpoint of an operator or a developer. Therefore, it is only necessary to confirm that it is in a normal state. On the other hand, in the event of a failure, even log data at the INFO level is likely to contain log information showing that the service quality is not better than normal. Therefore, it is desirable that the log data at the WARING or ERROR level be collected and at the same time, the frequency of collecting the log data at the INFO level should be further increased when the log of the WARING or ERROR level is generated. , Meaningful log data can be collected.

아울러, 본 발명에 따른 규칙 기반의 동적 로그 수집 장치(400)는, 로그 수집 규칙을 기반으로 로그 데이터를 수집함에 있어서, 운영의 편의를 위하여, 샘플링률에 대한 디폴트값, 상한값 및 하한값 중 하나 이상을 설정하여, 샘플링률의 동적인 변동이 일정 범위 내에서 이루어지도록 할 수 있다.In addition, the rule-based dynamic log collection device 400 according to the present invention collects log data based on a log collection rule by using at least one of a default value, an upper limit value and a lower limit value for the sampling rate So that the dynamic variation of the sampling rate can be made within a certain range.

다음으로, 도 5는 본 발명에 따른 규칙 기반의 동적 로그 수집 방법을 나타낸 순서도이다.Next, FIG. 5 is a flowchart illustrating a rule-based dynamic log collection method according to the present invention.

본 발명에 따른 로그 수집 장치(400)를 통해 실행되는, 규칙 기반의 동적 로그 수집 방법을 동작 순서에 따라서 설명한다.A rule-based dynamic log collection method, which is executed through the log collection device 400 according to the present invention, will be described in the order of operations.

먼저, 본 발명은 규칙 기반의 동적 로그 수집을 위하여, 애플리케이션 또는 서비스 별로 하나 이상의 로그 수집 규칙(410)을 설정한다(S105). 상기 로그 수집 규칙(410)은, 하나 이상의 로그 특징 정보를 기반으로 규칙을 적용할 기준을 정의하는 조건과, 상기 조건이 매칭될 경우 적용되는 로그 수집과 관련하여 이루어지는 행위로 정의된다. 상기 행위는, 로그 데이터의 저장, 샘플링률을 결정하는 행위를 의미한다.First, according to the present invention, one or more log collection rules 410 are set for each application or service in order to collect rules-based dynamic logs (S105). The log collection rule 410 is defined as a condition that defines a criterion for applying a rule based on one or more pieces of log characteristic information and an action related to a log collection applied when the condition is matched. The action refers to an operation of determining the storage and sampling rate of log data.

아울러, 본 발명에 따라서 동적으로 변경되는 샘플링률의 기준 정보로서, 디폴트값, 상한값, 하한값 중에서 하나 이상을 설정한다(S110).In addition, at least one of a default value, an upper limit value, and a lower limit value is set as reference information of a sampling rate that is dynamically changed according to the present invention (S110).

상기 상태에서, 해당 노드(10)에서 하나 이상의 애플리케이션(110)이 실행되어, 로그 데이터가 생성되면, 로그 분석기(420)를 통해서 상기 하나 이상의 애플리케이션(110)에서 생성되는 로그 데이터를 실시간으로 수신한다(S115). 이때, 로그 분석기(420)는 로그 특징 정보의 비교가 용이하도록, 수신된 로그 데이터를 기 설정된 형식으로 정형화할 수 있다.In this state, when one or more applications 110 are executed in the node 10 and log data is generated, log data generated in the one or more applications 110 is received in real time via the log analyzer 420 (S115). At this time, the log analyzer 420 may format the received log data into a predetermined format so that comparison of the log feature information is easy.

본 발명에 따른 규칙 기반 동적 로그 수집 장치(400)는 로그 데이터가 수신되면, 규칙 해석기(430)를 통해서 수신된 로그 데이터를 분석하여 기 설정된 하나 이상의 로그 수집 규칙(410) 중에서 매칭되는 로그 수집 규칙이 존재하는 지를 확인한다(S120). 이는 로그 데이터에 포함된 로그 특징 정보와 상기 하나 이상의 로그 수집 규칙(410)에 정의된 각각의 조건을 비교함에 의해 이루어질 수 있다. 아울러, 상기 비교를 위하여, 규칙 해석기(430)는 로그 특징 정보를 기준으로 카운팅과 같은 통계 처리를 더 수행할 수 있다.The rule-based dynamic log collecting apparatus 400 according to the present invention analyzes the log data received through the rule analyzer 430 when the log data is received, Is present (S120). This can be done by comparing the log feature information included in the log data with the respective conditions defined in the one or more log collection rules 410. In addition, for the comparison, the rule analyzer 430 may further perform statistical processing such as counting based on log feature information.

상기 S120단계의 확인 결과, 적용할 로그 수집 규칙이 존재하면, 샘플링 조정기(440) 및/또는 로그 처리기(450)를 통해서, 설정된 샘플링률을 변경하거나, 수신된 로그 데이터를 저장 또는 삭제 처리한다(S125).As a result of the checking in step S120, if there is a log collection rule to be applied, the sampling regulator 440 and / or the log processor 450 changes the set sampling rate or stores or deletes the received log data S125).

반면에 상기 S120단계의 확인 결과, 적용할 로그 수집 규칙이 존재하지 않으면, 로그 처리기(450)를 통해서 현재 설정된 샘플링률에 따라서 수신된 로그 데이터를 저장 또는 삭제 처리한다(S130).On the other hand, if it is determined in step S120 that there is no log collection rule to be applied, the log processor 450 stores or deletes the received log data according to the currently set sampling rate (S130).

상술한 S115 단계 내지 S130 단계는, 로그 수집 기능이 종료될 때까지, 로그 데이터가 수신될 때마다 반복적으로 실행된다(S135).Steps S115 to S130 described above are repeatedly executed each time log data is received until the log collection function is terminated (S135).

상기에 의하여, 본 발명에 따른 규칙 기반의 동적 로그 수집 장치(400)는, 로그 생성 상황에 맞추어 샘플링률을 동적으로 변경하면서, 로그 데이터를 수집할 수 있다.Based on the above, the rule-based dynamic log collection apparatus 400 according to the present invention can collect log data while dynamically changing the sampling rate according to the log generation status.

이상에서 설명한 본 발명에 따른 규칙 기반의 동적 로그 수집 방법은 다양한 컴퓨터 수단을 통하여 판독 가능한 소프트웨어 형태로 구현되어 컴퓨터로 판독 가능한 기록매체에 기록될 수 있다. 여기서, 기록매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 기록매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 예컨대 기록매체는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(Magnetic Media), CD-ROM(Compact Disk Read Only Memory), DVD(Digital Video Disk)와 같은 광 기록 매체(Optical Media), 플롭티컬 디스크(Floptical Disk)와 같은 자기-광 매체(Magneto-Optical Media), 및 롬(ROM), 램(RAM, Random Access Memory), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치를 포함한다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함할 수 있다. 이러한 하드웨어 장치는 본 발명의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The above-described rule-based dynamic log collection method according to the present invention can be implemented in the form of software readable by various computer means and recorded in a computer-readable recording medium. Here, the recording medium may include program commands, data files, data structures, and the like, alone or in combination. Program instructions to be recorded on a recording medium may be those specially designed and constructed for the present invention or may be available to those skilled in the art of computer software. For example, the recording medium may be an optical recording medium such as a magnetic medium such as a hard disk, a floppy disk and a magnetic tape, a compact disk read only memory (CD-ROM), a digital video disk (DVD) Includes a hardware device that is specially configured to store and execute program instructions such as a magneto-optical medium such as a floppy disk and a ROM, a random access memory (RAM), a flash memory, do. Examples of program instructions may include machine language code such as those generated by a compiler, as well as high-level language code that may be executed by a computer using an interpreter or the like. Such a hardware device may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.

아울러, 본 명세서와 도면에는 본 발명의 바람직한 실시 예에 대하여 개시하였으나, 여기에 개시된 실시 예외에도 본 발명의 기술적 사상에 바탕을 둔 다른 변형 예들이 실시 가능하다는 것은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 자명한 것이다. 또한, 본 명세서와 도면에서 특정 용어들이 사용되었으나, 이는 단지 본 발명의 기술 내용을 쉽게 설명하고 발명의 이해를 돕기 위한 일반적인 의미에서 사용된 것이지, 본 발명의 범위를 한정하고자 하는 것은 아니다.It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are intended to be exemplary and explanatory only and is not restrictive of the invention, It is self-evident to those who have knowledge. Furthermore, although specific terms are used in this specification and the drawings, they are used in a generic sense only to facilitate the description of the invention and to facilitate understanding of the invention, and are not intended to limit the scope of the invention.

마찬가지로, 특정한 순서로 도면에서 동작들을 묘사하고 있지만, 이는 바람직한 결과를 얻기 위하여 도시된 그 특정한 순서나 순차적인 순서대로 그러한 동작들을 수행하여야 한다거나 모든 도시된 동작들이 수행되어야 하는 것으로 이해되어서는 안 된다. 특정한 경우, 멀티태스킹과 병렬 프로세싱이 유리할 수 있다. 또한, 상술한 실시형태의 다양한 시스템 컴포넌트의 분리는 그러한 분리를 모든 실시형태에서 요구하는 것으로 이해되어서는 안 되며, 설명한 프로그램 컴포넌트와 시스템들은 일반적으로 단일의 소프트웨어 제품으로 함께 통합되거나 다중 소프트웨어 제품에 패키징될 수 있다는 점을 이해하여야 한다.Likewise, although the operations are depicted in the drawings in a particular order, it should be understood that such operations must be performed in that particular order or sequential order shown to achieve the desired result, or that all illustrated operations should be performed. In certain cases, multitasking and parallel processing may be advantageous. Also, the separation of the various system components of the above-described embodiments should not be understood as requiring such separation in all embodiments, and the described program components and systems are generally integrated together into a single software product, It should be understood.

본 발명에 따른 규칙 기반의 동적 로그 수집 장치 및 방법은, 서비스 또는 애플리케이션의 실행 중에 생성하는 로그를 분석하는 로그 분석 시스템에 적용될 수 있으며, 특히, 분석 대상이 되는 서비스 또는 애플리케이션이 실행되는 노드 상에 적용되어, 해당 서비스 또는 애플리케이션에서 생성되는 로그 데이터를 수집할 수 있다.The rule-based dynamic log collection apparatus and method according to the present invention can be applied to a log analysis system for analyzing a log generated during execution of a service or an application. In particular, So that log data generated by the corresponding service or application can be collected.

특히, 본 발명은 서비스 또는 애플리케이션 별로 로그 데이터를 수집하는데 있어서, 로그 특징 정보를 기준으로 한 조건 및 상기 조건에 매칭될 때 수행되는 로그 수집을 제어할 수 있는 행위로 이루어진 로그 수집 규칙을 서비스 또는 애플리케이션 별로 하나 이상 설정하고, 상기 서비스에서 해당하는 애플리케이션들 혹은 각 애플리케이션에 생성되는 로그 데이터를 모니터링하여, 로그 수집 규칙의 조건이 매칭될 때, 해당 조건에 대응하여 설정된 행위를 수행함으로써, 샘플링률에 따라서 로그 데이터를 수집하면서, 샘플링률을 로그 생성 상황에 맞추어 변경시킴으로써 수집되는 로그 데이터의 량을 동적으로 변경할 수 있다.In particular, the present invention relates to a method and apparatus for collecting log data on a service or application basis, in which a log collection rule consisting of a condition based on log feature information and an action capable of controlling log collection performed when the condition is matched, And monitors the log data generated by the corresponding applications or the respective applications in the service to perform an action set corresponding to the condition when the conditions of the log collection rule are matched, While collecting log data, it is possible to dynamically change the amount of log data collected by changing the sampling rate according to the log generation situation.

이를 통하여, 본 발명은 로그 양을 로그 생성 상황에 맞게 유연하게 조절할 수 있으며, 특히, 운영자가 높은 관심을 갖는 로그 데이터를 더 높은 빈도로 수집하고 그렇지 않은 로그에 대해서는 수집 빈도를 감소시킴으로써 로그 양을 제어함과 동시에 수집된 로그 데이터에 대한 품질도 높일 수 있다.Accordingly, the present invention can flexibly adjust the amount of log to meet the log generation situation, and in particular, it is possible to collect the log data with higher interest by the operator at a higher frequency, and reduce the collection frequency for the non- It is possible to increase the quality of the collected log data at the same time as the control.

더하여, 본 발명은 노드에 이미 설치된 로그 에이전트의 처리 흐름에 적용함으로써, 기존 로그 시스템의 큰 변화 없이도 적용할 수 있다.In addition, the present invention can be applied to a process flow of a log agent already installed in a node, without applying a large change to an existing log system.

400: 규칙 기반의 동적 로그 수집 장치
410: 로그 수집 규칙
420: 로그 분석기
430: 규칙 해석기
440: 샘플링 조정기
450: 로그 처리기
400: rule-based dynamic log collector
410: Log Collection Rules
420: log analyzer
430: Rule interpreter
440: Sampling regulator
450: log processor

Claims (12)

로그 특징 정보를 기준으로 정의되는 조건과, 상기 조건이 매칭되는 경우에 실행되는 로그 수집과 관련된 하나 이상의 행위로 이루어지는 로그 수집 규칙을 하나 이상 설정하는 단계;
서비스 또는 애플리케이션별로 생성되는 로그 데이터를 수신하는 단계;
상기 수신한 로그 데이터의 로그 특징 정보를 상기 설정한 하나 이상의 로그 수집 규칙에 정의된 각 조건과 비교하여 매칭되는 로그 수집 규칙을 확인하는 단계; 및
매칭되는 로그 수집 규칙이 존재하면, 해당 로그 수집 규칙에 정의된 하나 이상의 행위에 따라서 상기 수신된 로그 데이터를 처리하는 단계를 포함하는 규칙 기반의 동적 로그 수집 방법.
Setting at least one log collection rule consisting of a condition defined based on log characteristic information and at least one action related to log collection performed when the condition is matched;
Receiving log data generated for each service or application;
Comparing log feature information of the received log data with each condition defined in the set one or more log collection rules and checking matching log collection rules; And
And processing the received log data according to one or more actions defined in the log collection rule, if there is a matching log collection rule.
제1항에 있어서,
상기 로그 특징 정보는, 로그 레벨, 로그 생성자, 로그 생성 시간, 로그 생성 위치 중 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 방법.
The method according to claim 1,
Wherein the log feature information includes at least one of a log level, a log creator, a log generation time, and a log generation position.
제1항에 있어서, 상기 로그 데이터를 처리하는 단계는,
상기 수신된 로그 데이터를 샘플링률에 관계없이 바로 저장하는 단계;
상기 수신된 로그 데이터를 현재 설정된 샘플링률에 따라서 저장 또는 삭제하는 단계; 및
현재 설정된 샘플링률을 증감시키는 단계 중에서 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 방법.
The method of claim 1, wherein the processing of the log data comprises:
Immediately storing the received log data regardless of a sampling rate;
Storing or deleting the received log data according to a currently set sampling rate; And
And increasing or decreasing the currently set sampling rate.
제1항에 있어서,
상기 로그 수집 규칙의 조건은, 특정 로그 특징 정보를 갖는 로그 데이터의 발생 여부, 및 상기 로그 데이터의 발생 횟수 중 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 방법.
The method according to claim 1,
Wherein the condition of the log collection rule includes at least one of whether or not log data having specific log characteristic information is generated and the number of times the log data is generated.
제1항에 있어서,
매칭되는 로그 수집 규칙이 존재하지 않으면, 현재 설정된 샘플링률에 따라서 수신된 로그데이터를 저장 또는 삭제하는 단계를 더 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 방법.
The method according to claim 1,
Further comprising the step of storing or deleting the received log data according to a currently set sampling rate if there is no matching log collection rule.
제1항에 있어서,
상기 수신하는 단계 이전에, 로그 데이터를 수집하는 빈도를 나타내는 샘플링률에 대한 디폴트값, 상한값, 및 하한값 중에서 하나 이상을 포함하는 기준 정보를 설정하는 단계를 더 포함하고,
상기 로그 데이터를 처리하는 단계는 상기 기준 정보에 의해 정의된 범위 이내에서 상기 로그 데이터를 처리하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 방법.
The method according to claim 1,
Further comprising setting reference information including at least one of a default value, an upper limit value, and a lower limit value for a sampling rate indicating a frequency of collecting log data before the receiving step,
Wherein the step of processing the log data comprises processing the log data within a range defined by the reference information.
로그 특징 정보를 기준으로 정의되는 조건과, 상기 조건이 매칭되는 경우에 실행되는 로그 수집과 관련된 하나 이상의 행위로 이루어지는 하나 이상의 로그 수집 규칙을 저장하고, 서비스 또는 애플리케이션 별로 생성되는 로그 데이터의 로그 특징 정보를 기 설정된 하나 이상의 로그 수집 규칙과 비교하여, 현재 수신되는 로그 데이터에 매칭되는 로그 수집 규칙을 확인하는 규칙 해석기;
상기 규칙 해석기에서 매칭되는 것으로 확인된 로그 수집 규칙에 따라서 기 설정된 샘플링률을 조정하는 샘플링 조정기; 및
상기 규칙 해석기에서 매칭되는 것으로 확인된 로그 수집 규칙 또는 현재 설정된 샘플링률에 따라서 현재 수신된 로그 데이터를 저장하거나 삭제하는 로그 처리기를 포함하는 규칙 기반의 동적 로그 수집 장치.
One or more log collection rules consisting of a condition defined on the basis of the log characteristic information and one or more actions related to log collection performed when the conditions are matched are stored and the log characteristic information A rule analyzer for comparing log collection rules with at least one log collection rule that is set in advance, and checking a log collection rule matching the currently received log data;
A sampling regulator for adjusting a predetermined sampling rate according to a log collection rule determined to match in the rule analyzer; And
And a log processor for storing or deleting currently received log data according to a log collection rule determined to match in the rule analyzer or a currently set sampling rate.
제7항에 있어서,
상기 서비스 또는 애플리케이션 별로 생성되는 로그 데이터를 수신하여, 기 설정된 형식으로 정형화하는 로그 분석기를 더 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 장치.
8. The method of claim 7,
Further comprising a log analyzer for receiving log data generated for each service or application and formatting the log data into a predetermined format.
제7항에 있어서,
상기 로그 특징 정보는, 로그 레벨, 로그 생성자, 로그 생성 시간, 로그 생성 위치 중 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 장치.
8. The method of claim 7,
Wherein the log feature information includes at least one of a log level, a log creator, a log generation time, and a log generation position.
제7항에 있어서,
상기 로그 수집 규칙의 행위는, 수신된 로그 데이터를 샘플링률에 관계없이 바로 저장하는 행위, 수신된 로그 데이터를 현재 설정된 샘플링률에 따라서 저장 또는 삭제하는 행위, 현재 설정된 샘플링률을 증감시키는 행위 중에서 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 장치.
8. The method of claim 7,
The act of the log collection rule may include storing the received log data immediately regardless of the sampling rate, storing or deleting the received log data according to the currently set sampling rate, or changing the currently set sampling rate Based dynamic log collection device.
제7항에 있어서,
상기 로그 수집 규칙의 조건은, 특정 로그 특징 정보를 갖는 로그 데이터의 발생 여부, 및 상기 로그 데이터의 발생 횟수 중 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 장치.
8. The method of claim 7,
Wherein the condition of the log collection rule includes at least one of whether or not log data having specific log feature information is generated and the number of times the log data is generated.
제7항에 있어서, 상기 로그 처리기는
매칭되는 로그 수집 규칙이 존재하지 않으면, 현재 설정된 샘플링률에 따라서 수신된 로그데이터를 저장 또는 삭제하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 장치.
8. The apparatus of claim 7, wherein the log processor
And if the matching log collection rule does not exist, the received log data is stored or deleted according to the currently set sampling rate.
KR1020170132369A 2017-10-12 2017-10-12 Method and device for collecting log based on rule KR102088285B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170132369A KR102088285B1 (en) 2017-10-12 2017-10-12 Method and device for collecting log based on rule

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170132369A KR102088285B1 (en) 2017-10-12 2017-10-12 Method and device for collecting log based on rule

Publications (2)

Publication Number Publication Date
KR20190041192A true KR20190041192A (en) 2019-04-22
KR102088285B1 KR102088285B1 (en) 2020-03-12

Family

ID=66283146

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170132369A KR102088285B1 (en) 2017-10-12 2017-10-12 Method and device for collecting log based on rule

Country Status (1)

Country Link
KR (1) KR102088285B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538712A (en) * 2020-04-30 2020-08-14 恒生电子股份有限公司 Log recording method, processing node, electronic device and storage medium
CN113938379A (en) * 2021-09-29 2022-01-14 浪潮云信息技术股份公司 Method for dynamically loading cloud platform log acquisition configuration

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11561849B1 (en) * 2022-01-05 2023-01-24 International Business Machines Corporation Intelligently adaptive log level management of a service mesh

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050046373A (en) * 2003-11-14 2005-05-18 엘지엔시스(주) Method and system for managing log-file
JP2007193436A (en) * 2006-01-17 2007-08-02 Fujitsu Ltd Log retrieval program, log management device, information processor and log retrieval method
KR20160089198A (en) * 2015-01-19 2016-07-27 주식회사 엘지씨엔에스 System for analyzing social media data and method for analyzing social media data using the same
KR101671314B1 (en) 2015-08-31 2016-11-01 주식회사 라온랩 Travel packages search log data analysis system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050046373A (en) * 2003-11-14 2005-05-18 엘지엔시스(주) Method and system for managing log-file
JP2007193436A (en) * 2006-01-17 2007-08-02 Fujitsu Ltd Log retrieval program, log management device, information processor and log retrieval method
KR20160089198A (en) * 2015-01-19 2016-07-27 주식회사 엘지씨엔에스 System for analyzing social media data and method for analyzing social media data using the same
KR101671314B1 (en) 2015-08-31 2016-11-01 주식회사 라온랩 Travel packages search log data analysis system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538712A (en) * 2020-04-30 2020-08-14 恒生电子股份有限公司 Log recording method, processing node, electronic device and storage medium
CN111538712B (en) * 2020-04-30 2023-07-21 恒生电子股份有限公司 Log recording method, processing node, electronic equipment and storage medium
CN113938379A (en) * 2021-09-29 2022-01-14 浪潮云信息技术股份公司 Method for dynamically loading cloud platform log acquisition configuration

Also Published As

Publication number Publication date
KR102088285B1 (en) 2020-03-12

Similar Documents

Publication Publication Date Title
US20160306613A1 (en) Code routine performance prediction using test results from code integration tool
US20180365085A1 (en) Method and apparatus for monitoring client applications
CN107370806B (en) HTTP status code monitoring method, device, storage medium and electronic equipment
CN100495990C (en) Apparatus, system, and method for dynamic adjustment of performance monitoring of memory region network assembly
US20190108112A1 (en) System and method for generating a log analysis report from a set of data sources
EP3806432A1 (en) Method for changing service on device and service changing system
US20130160024A1 (en) Dynamic Load Balancing for Complex Event Processing
US11093349B2 (en) System and method for reactive log spooling
US9658902B2 (en) Adaptive clock throttling for event processing
CN111274095B (en) Log data processing method, device, equipment and computer readable storage medium
KR102088285B1 (en) Method and device for collecting log based on rule
US11038587B2 (en) Method and apparatus for locating fault cause, and storage medium
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN107544832A (en) A kind of monitoring method, the device and system of virtual machine process
US11093312B2 (en) System for monitoring a plurality of distributed devices
US10970109B1 (en) System, method, and computer program for managing a plurality of heterogeneous software robots to automate business processes
CN111367760A (en) Log collection method and device, computer equipment and storage medium
CN116166505B (en) Monitoring platform, method, storage medium and equipment for dual-state IT architecture in financial industry
CN113094269A (en) Application program test exception analysis method and device
CN109039695B (en) Service fault processing method, device and equipment
CN113760634A (en) Data processing method and device
CN116881100A (en) Log detection method, log alarm method, system, equipment and storage medium
US10037356B2 (en) Placement of services in stream computing applications
CN114706893A (en) Fault detection method, device, equipment and storage medium
KR102656541B1 (en) Device, method and program that analyzes large log data using a distributed method for each log type

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
X091 Application refused [patent]
AMND Amendment
X701 Decision to grant (after re-examination)