KR102088285B1 - 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
KR102088285B1
KR102088285B1 KR1020170132369A KR20170132369A KR102088285B1 KR 102088285 B1 KR102088285 B1 KR 102088285B1 KR 1020170132369 A KR1020170132369 A KR 1020170132369A KR 20170132369 A KR20170132369 A KR 20170132369A KR 102088285 B1 KR102088285 B1 KR 102088285B1
Authority
KR
South Korea
Prior art keywords
log
rule
log collection
collection
data
Prior art date
Application number
KR1020170132369A
Other languages
Korean (ko)
Other versions
KR20190041192A (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 and apparatus capable of increasing the quality of collected log data while controlling the amount of logs dynamically collected according to the quality of logs generated for each service or application. The method and the apparatus set one or more log collection rules consisting of conditions defined based on log characteristic information and one or more actions related to log collection executed when the conditions are matched, and logs generated for each service or application When data is received, log characteristic information of the received log data is compared with each condition defined in the set one or more log collection rules to check matching log collection rules, and if matching log collection rules exist, the corresponding Depending on one or more actions defined in the log collection rules It is arranged to process the group the received log data.

Description

규칙 기반의 동적 로그 수집 방법 및 장치{Method and device for collecting log based on rule}Method and device for collecting log based on rule}

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

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

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

예를 들어, 서비스가 작은 단위의 컨테이너 기반 애플리케이션으로 구성되면, 외부 요청에 의한 처리는 수 개 혹은 수십 개의 애플리케이션이 연동되어 처리 된다. 이러한 경우, 서비스의 동작 상태를 추적하거나 장애 분석을 위해서는 여러 애플리케이션의 로그를 동시에 분석하여야 의미 있는 결론을 이끌어 낼 수 있다.For example, when a service is composed of a small unit of container-based application, processing by an external request is processed by interlocking several or dozens of applications. In this case, it is possible to draw meaningful conclusions by tracing the operational status of the service or analyzing the logs of multiple applications at the same time for failure analysis.

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

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

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

지금까지는 로그 양의 제어를 위해서, 지금까지는 크게 2가지 접근 방식을 취하고 있다.So far, for controlling the amount of logs, two approaches have been taken so far.

첫 번째는 개발 단계에서는 모든 로그를 수집하되, 운영 단계에서는 로그 기능을 제한하여 실 운영 환경에서는 애플리케이션이 로그 정보를 적게 생성하도록 한다. 즉, 도 2에 도시된 바와 같이, 각각의 애플리케이션(110)이 로그를 생성하여 노드(10)에 구비된 로컬 데이터베이스(120)에 저장하도록 하고, 로컬 데이터베이스(120)에 저장된 로그 데이터를 주기적으로 모아 중앙의 로그 데이터베이스(20)로 전송하는데 있어서, 애플리케이션(110)에서 특정 부분은 로그를 생성하도록 하고 특정 부분은 로그를 생성하지 않도록 애플리케이션 소스를 제어한다. 이는 애플리케이션(110)에서 생성하는 로그 자체를 통제하는 방식이기 때문에, 로그가 서비스 품질에 영향을 주거나 지나치게 로그 양이 많아지는 문제점을 해결할 수 있다. 반면에 첫번째 방법은, 애플리케이션(110)별로 어떤 로그를 수집하고, 어떤 로그를 수집하지 않아야 하는 지를 선택해야 하는 과정이 필요하고, 이러한 선택적인 로그 생성 기능을 서비스 로직에 반영하여야 하기 때문에, 서비스 중에 상황에 따라서 로그 양을 동적으로 변경하는 데는 어려움이 있다.The first is to collect all logs in the development stage, but limit the log function in the operation stage, so that the application generates less log information in the actual operation environment. That is, as illustrated in FIG. 2, each application 110 generates logs and stores them in the local database 120 provided in the node 10, and periodically stores log data stored in the local database 120. In collecting and transmitting to the central log database 20, the application source controls the application source so that a specific part generates a log and a specific part does not generate a log. 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 quality of service or excessively increases the amount of logs. On the other hand, the first method requires a process of selecting which logs are collected for each application 110 and which logs should not be collected, and the selective log generation function needs to be reflected in the service logic. Depending on the situation, it is difficult to dynamically change the log amount.

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

한국등록특허 제10-1671314호, 2016년 10월 26일 등록 (명칭: 여행상품 검색 로그 데이터 분석 시스템)Registered Korean Registered Patent No. 10-1671314, October 26, 2016 (Name: Travel product search log data analysis system)

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

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

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

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

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

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

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

더하여, 본 발명은 상술한 과제의 해결 수단으로서, 로그 특징 정보를 기준으로 정의되는 조건과, 상기 조건이 매칭되는 경우에 실행되는 로그 수집과 관련된 하나 이상의 행위로 이루어지는 하나 이상의 로그 수집 규칙을 저장하고, 서비스 또는 애플리케이션 별로 생성되는 로그 데이터의 로그 특징 정보를 기 설정된 하나 이상의 로그 수집 규칙과 비교하여, 현재 수신되는 로그 데이터에 매칭되는 로그 수집 규칙을 확인하는 규칙 해석기; 상기 규칙 해석기에서 매칭되는 것으로 확인된 로그 수집 규칙에 따라서 기 설정된 샘플링률을 조정하는 샘플링 조정기; 및 상기 규칙 해석기에서 매칭되는 것으로 확인된 로그 수집 규칙 또는 현재 설정된 샘플링률에 따라서 현재 수신된 로그 데이터를 저장하거나 삭제하는 로그 처리기를 포함하는 규칙 기반의 동적 로그 수집 장치를 제공한다.In addition, the present invention, as a solution to the above-described problem, stores a condition defined based on log feature information and one or more log collection rules consisting of one or more actions related to log collection executed when the conditions are matched, and A rule interpreter that compares log characteristic information of log data generated for each service or application with one or more preset log collection rules, and checks a log collection rule matching the currently received log data; A sampling adjuster for adjusting a preset sampling rate according to the log collection rule found to be matched in the rule interpreter; And a log processor that stores or deletes log data currently received according to a log collection rule determined to be matched by the rule interpreter 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 it in a predetermined format.

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

이를 통하여, 본 발명은 로그 양을 로그 생성 상황에 맞게 유연하게 조절할 수 있으며, 특히, 운영자가 높은 관심을 두는 로그 데이터를 더 높은 빈도로 수집하고 그렇지 않은 로그에 대해서는 수집 빈도를 감소시킴으로써 로그 양을 제어함과 동시에 수집된 로그 데이터에 대한 품질도 높일 수 있다.Through this, the present invention can flexibly adjust the log amount according to the log generation situation, and in particular, collects log data of high interest by the operator at a higher frequency and decreases the collection frequency for the logs that are not. At the same time as controlling, the quality of the collected log data can be improved.

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

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

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

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

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

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

또한, 본 명세서에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 또한, 본 명세서에서 기술되는 "포함 한다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.In addition, the terms used herein are only used to describe specific embodiments, and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In addition, the terms "comprises" or "having" described herein are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or the same. It is to be understood that the present invention does not exclude in advance the possibility of the presence or the addition of other features, numbers, steps, operations, components, parts, or a combination thereof.

본 발명에 따른 규칙 기반의 동적 로그 수집 장치 및 방법은, 도 1과 같은 분산 기반의 서비스 시스템에서, 하나 이상의 애플리케이션 또는 서비스를 실행하는 각 노드(10)에 적용되어, 상기 노드(10)에서 운용되는 하나 이상의 애플리케이션(110)으로부터 생성되는 로그를 모니터링하여, 적절한 량의 로그 데이터를 수집하기 위한 것이다. 특히, 본 발명은 도 3과 같은 로그 샘플링 방식에 적용 가능한 것으로서, 애플리케이션(110)이 모든 로그를 생성하도록 한 후, 상기 애플리케이션(110)에서 생성된 로그를 선별 수집하여 로컬 DB(120)에 저장하는 것이다.The 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 as shown in FIG. 1 and operated in the node 10 To monitor the log generated from one or more applications 110, it is to collect the appropriate amount of log data. Particularly, the present invention is applicable to the log sampling method as shown in FIG. 3, and after the application 110 generates all logs, the logs generated by the application 110 are selectively collected and stored in the local DB 120. Is to do.

이러한 본 발명에 따른 규칙 기반의 동적 로그 수집 장치 및 방법의 구성 및 동작을 도 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.

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

도 3을 참조하면, 본 발명에 따른 규칙 기반의 동적 로그 수집 장치(400)는, 해당 노드(10)에서 운용되는 애플리케이션 또는 서비스 별로 로그 수집 규칙(410)을 설정하고, 상기 로그 수집 규칙(410)에 따라서 복수의 애플리케이션(110)으로부터 생성된 로그를 선별적으로 수집하여 해당 노드(10)에 설치된 로컬 DB(360)에 저장하되, 저장하는 로그의 양을 동적으로 조정한다.Referring to FIG. 3, the rule-based dynamic log collection device 400 according to the present invention sets the log collection rule 410 for each application or service operated in the node 10, and the log collection rule 410 ) Selectively collects logs generated from a plurality of applications 110 and stores them in the local DB 360 installed on the node 10, but dynamically adjusts the amount of logs 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 its nature. For an example of an application implemented in Java, the log level consists of six layers: FATAL, ERROR, WARN, INFO, DEBUG, and TRACE. Here, FATAL indicates a log related to a fatal error that may cause the program to stop, ERROR indicates a log for an error that is not enough to stop the program, WARN indicates log data of a potentially dangerous situation, and INFO indicates the program. It represents log data that simply reports the progress, DEBUG represents log data with information necessary for debugging a program, and TRACE represents log data with more detailed information than DEBUG.

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

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

다시 도 4를 참조하면, 본 발명에 따른 규칙 기반의 동적 로그 수집 장치(400)는, 상술한 기능의 수행을 위하여, 로그 분석기(420)와, 규칙 해석기(430)와, 샘플링 조정기(440)와, 로그 처리기(450)를 포함하여 구성될 수 있다.Referring to FIG. 4 again, the rule-based dynamic log collection device 400 according to the present invention includes a log analyzer 420, a rule interpreter 430, and a sampling adjuster 440 for performing the above-described functions. And, it may be configured to include a log processor 450.

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

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

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

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

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

상기 규칙 해석기(430)는 현재 생성된 로그 데이터에 매칭되는 로그 수집 규칙을 샘플링 조정기(440) 및 로그 처리기(450)로 전달하며, 상기 샘플링 조정기(440) 및 로그 처리기(450)가 매칭되는 로그 수집 규칙에 정의된 행위를 수행한다.The rule interpreter 430 transmits a log collection rule matching the currently generated log data to the sampling coordinator 440 and the log processor 450, and the log in which the sampling coordinator 440 and the log processor 450 match Perform 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 confirmed by the rule interpreter 430. Here, the processing of the log data includes an act of saving directly to the local DB 460, discarding it without saving immediately, or selectively storing it according to a set sampling rate.

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

즉, 본 발명에 따른 규칙 기반의 동적 로그 수집 장치(400)는, 로그 수집 규칙에 따라서, 애플리케이션(110)에서 생성된 로그 데이터를 바로 저장하거나, 바로 저장없이 버리거나, 설정된 샘플링률에 따라서 선별하여 저장하면서, 설정된 샘플링률을 자동으로 변경할 수 있으며, 그 결과, 로그 생성 상황에 따라서 로그 수집 량을 동적으로 조정할 수 있다.That is, the rule-based dynamic log collection device 400 according to the present invention, according to the log collection rule, immediately saves the log data generated by the application 110, immediately discards it without storage, or selects it according to the set sampling rate While saving, the set sampling rate can be automatically changed, and as a result, the log collection amount can be dynamically adjusted according to the log generation situation.

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

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

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

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

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

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

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

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

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

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

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

아울러, 본 발명에 따른 규칙 기반의 동적 로그 수집 장치(400)는, 로그 수집 규칙을 기반으로 로그 데이터를 수집함에 있어서, 운영의 편의를 위하여, 샘플링률에 대한 디폴트값, 상한값 및 하한값 중 하나 이상을 설정하여, 샘플링률의 동적인 변동이 일정 범위 내에서 이루어지도록 할 수 있다.In addition, the rule-based dynamic log collection device 400 according to the present invention, in collecting log data based on a log collection rule, for convenience of operation, one or more of a default value, an upper limit, and a lower limit for the sampling rate By setting, 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)를 통해 실행되는, 규칙 기반의 동적 로그 수집 방법을 동작 순서에 따라서 설명한다.The rule-based dynamic log collection method, which is executed through the log collection device 400 according to the present invention, will be described according to an operation sequence.

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

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

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

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

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

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

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

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

이상에서 설명한 본 발명에 따른 규칙 기반의 동적 로그 수집 방법은 다양한 컴퓨터 수단을 통하여 판독 가능한 소프트웨어 형태로 구현되어 컴퓨터로 판독 가능한 기록매체에 기록될 수 있다. 여기서, 기록매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 기록매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 예컨대 기록매체는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(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 rule-based dynamic log collection method according to the present invention described above may be implemented in a form of software readable through various computer means and recorded in a computer-readable recording medium. Here, the recording medium may include program instructions, data files, data structures, or the like alone or in combination. The program instructions recorded on the recording medium may be specially designed and configured for the present invention or may be known and usable by those skilled in computer software. For example, the recording medium includes magnetic media such as hard disks, floppy disks, and magnetic tapes (Magnetic Media), compact disk read only memory (CD-ROM), optical media such as DVD (Digital Video Disk), and optical media. Includes magneto-optical media, such as a floppy disk, and hardware devices specifically configured to store and execute program instructions, such as ROM, random access memory (RAM), flash memory, etc. do. Examples of program instructions may include high-level language code that can be executed by a computer using an interpreter, as well as machine code such as produced by a compiler. Such a hardware device can be configured to operate as one or more software modules to perform the operation of the present invention, and vice versa.

아울러, 본 명세서와 도면에는 본 발명의 바람직한 실시 예에 대하여 개시하였으나, 여기에 개시된 실시 예외에도 본 발명의 기술적 사상에 바탕을 둔 다른 변형 예들이 실시 가능하다는 것은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 자명한 것이다. 또한, 본 명세서와 도면에서 특정 용어들이 사용되었으나, 이는 단지 본 발명의 기술 내용을 쉽게 설명하고 발명의 이해를 돕기 위한 일반적인 의미에서 사용된 것이지, 본 발명의 범위를 한정하고자 하는 것은 아니다.In addition, although the present specification and the drawings have been described with respect to preferred embodiments of the present invention, it is common in the technical field to which the present invention pertains that other modified examples based on the technical spirit of the present invention can be implemented in the exceptions of the embodiments disclosed herein. It is obvious to those who have knowledge. In addition, although specific terms are used in the present specification and drawings, they are merely used in a general sense to easily describe the technical contents of the present invention and to help understand the present invention, and are not intended to limit the scope of the present invention.

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

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

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

이를 통하여, 본 발명은 로그 양을 로그 생성 상황에 맞게 유연하게 조절할 수 있으며, 특히, 운영자가 높은 관심을 갖는 로그 데이터를 더 높은 빈도로 수집하고 그렇지 않은 로그에 대해서는 수집 빈도를 감소시킴으로써 로그 양을 제어함과 동시에 수집된 로그 데이터에 대한 품질도 높일 수 있다.Through this, the present invention can flexibly adjust the log amount according to the log generation situation, and in particular, the operator collects log data having high interest at a higher frequency and reduces the collection frequency for the logs that are not. At the same time as controlling, the quality of the collected log data can be improved.

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

400: 규칙 기반의 동적 로그 수집 장치
410: 로그 수집 규칙
420: 로그 분석기
430: 규칙 해석기
440: 샘플링 조정기
450: 로그 처리기
400: rule-based dynamic log collection device
410: log collection rules
420: log analyzer
430: rule interpreter
440: sampling regulator
450: Log handler

Claims (12)

로그 특징 정보를 기준으로 정의되는 조건과, 상기 조건이 매칭되는 경우에 실행되는 로그 수집과 관련된 하나 이상의 행위로 이루어지는 로그 수집 규칙을 서비스 또는 애플리케이션 별로 하나 이상 설정하는 단계;
서비스 또는 애플리케이션별로 생성되는 로그 데이터를 수신하는 단계;
상기 수신한 로그 데이터의 로그 레벨을 포함하는 로그 특징 정보를 상기 설정한 하나 이상의 로그 수집 규칙에 정의된 각 조건과 비교하여 매칭되는 로그 수집 규칙을 확인하는 단계; 및
매칭되는 로그 수집 규칙이 존재하면, 해당 로그 수집 규칙에 따라 로그 수집량을 동적으로 조절하여 상기 수신된 로그 데이터를 처리하는 단계를 포함하는 규칙 기반의 동적 로그 수집 방법.
Setting one or more log collection rules for each service or application, which are defined based on log feature information, and one or more actions related to log collection executed when the conditions are matched;
Receiving log data generated for each service or application;
Comparing the log feature information including the log level of the received log data with each condition defined in the set one or more log collection rules to check matching log collection rules; And
If a matching log collection rule exists, a rule-based dynamic log collection method comprising dynamically adjusting a log collection amount according to the log collection rule to process the received log data.
제1항에 있어서,
상기 로그 특징 정보는, 로그 레벨, 로그 생성자, 로그 생성 시간, 로그 생성 위치 중 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 방법.
According to claim 1,
The log feature information includes a log level, a log creator, a log creation time, and one or more of a log generation location.
제1항에 있어서, 상기 로그 데이터를 처리하는 단계는,
상기 수신된 로그 데이터를 샘플링률에 관계없이 바로 저장하는 단계;
상기 수신된 로그 데이터를 현재 설정된 샘플링률에 따라서 저장 또는 삭제하는 단계; 및
현재 설정된 샘플링률을 증감시키는 단계 중에서 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 방법.
According to claim 1, The step of processing the log data,
Directly 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
A rule-based dynamic log collection method comprising at least one of the steps of increasing or decreasing the currently set sampling rate.
제1항에 있어서,
상기 로그 수집 규칙의 조건은, 특정 로그 특징 정보를 갖는 로그 데이터의 발생 여부, 및 상기 로그 데이터의 발생 횟수 중 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 방법.
According to claim 1,
The conditions of the log collection rule, the rule-based dynamic log collection method characterized in that it includes at least one of the occurrence of log data having specific log feature information, and the number of occurrences of the log data.
제1항에 있어서,
매칭되는 로그 수집 규칙이 존재하지 않으면, 현재 설정된 샘플링률에 따라서 수신된 로그데이터를 저장 또는 삭제하는 단계를 더 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 방법.
According to claim 1,
If there is no matching log collection rule, the rule-based dynamic log collection method further comprising the step of storing or deleting the received log data according to the currently set sampling rate.
제1항에 있어서,
상기 수신하는 단계 이전에, 로그 데이터를 수집하는 빈도를 나타내는 샘플링률에 대한 디폴트값, 상한값, 및 하한값 중에서 하나 이상을 포함하는 기준 정보를 설정하는 단계를 더 포함하고,
상기 로그 데이터를 처리하는 단계는 상기 기준 정보에 의해 정의된 범위 이내에서 상기 로그 데이터를 처리하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 방법.
According to claim 1,
Before the step of receiving, further comprising setting reference information including one or more of a default value, an upper limit, and a lower limit for the sampling rate indicating the frequency of collecting log data,
The step of processing the log data is a rule-based dynamic log collection method characterized in that the log data is processed within a range defined by the reference information.
로그 특징 정보를 기준으로 정의되는 조건과, 상기 조건이 매칭되는 경우에 실행되는 로그 수집과 관련된 하나 이상의 행위로 이루어지는 하나 이상의 로그 수집 규칙을 서비스 또는 애플리케이션 별로 설정하여 저장하고, 서비스 또는 애플리케이션 별로 생성되는 로그 데이터의 로그 레벨을 포함하는 로그 특징 정보를 기 설정된 하나 이상의 로그 수집 규칙과 비교하여, 현재 수신되는 로그 데이터에 매칭되는 로그 수집 규칙을 확인하는 규칙 해석기;
상기 규칙 해석기에서 매칭되는 것으로 확인된 로그 수집 규칙에 따라서 기 설정된 샘플링률을 조정하여, 로그 수집량을 동적으로 조절하는 샘플링 조정기; 및
상기 규칙 해석기에서 매칭되는 것으로 확인된 로그 수집 규칙 또는 현재 설정된 샘플링률에 따라서 현재 수신된 로그 데이터를 저장하거나 삭제하는 로그 처리기를 포함하는 규칙 기반의 동적 로그 수집 장치.
Conditions defined based on log characteristic information and one or more log collection rules consisting of one or more actions related to log collection executed when the conditions are matched are set and stored for each service or application, and generated for each service or application A rule interpreter that compares log characteristic information including a log level of log data with one or more preset log collection rules, and checks a log collection rule matching the currently received log data;
A sampling adjuster that dynamically adjusts a log collection amount by adjusting a preset sampling rate according to a log collection rule found to be matched by the rule interpreter; And
A rule-based dynamic log collection device including a log collection rule determined to match in the rule interpreter or a log processor that stores or deletes currently received log data according to a currently set sampling rate.
제7항에 있어서,
상기 서비스 또는 애플리케이션 별로 생성되는 로그 데이터를 수신하여, 기 설정된 형식으로 정형화하는 로그 분석기를 더 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 장치.
The method of claim 7,
The rule-based dynamic log collection device further comprises a log analyzer that receives the log data generated for each service or application and formats the data into a predetermined format.
제7항에 있어서,
상기 로그 특징 정보는, 로그 레벨, 로그 생성자, 로그 생성 시간, 로그 생성 위치 중 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 장치.
The method of claim 7,
The log feature information includes a log level, a log creator, a log creation time, and one or more of a log generation location.
제7항에 있어서,
상기 로그 수집 규칙의 행위는, 수신된 로그 데이터를 샘플링률에 관계없이 바로 저장하는 행위, 수신된 로그 데이터를 현재 설정된 샘플링률에 따라서 저장 또는 삭제하는 행위, 현재 설정된 샘플링률을 증감시키는 행위 중에서 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 장치.
The method of claim 7,
The log collection rule action is one of immediately storing received log data regardless of a sampling rate, storing or deleting received log data according to a currently set sampling rate, or increasing or decreasing a currently set sampling rate. A rule-based dynamic log collection device comprising the above.
제7항에 있어서,
상기 로그 수집 규칙의 조건은, 특정 로그 특징 정보를 갖는 로그 데이터의 발생 여부, 및 상기 로그 데이터의 발생 횟수 중 하나 이상을 포함하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 장치.
The method of claim 7,
The conditions of the log collection rule, the rule-based dynamic log collection device, characterized in that it includes at least one of the occurrence of log data having specific log feature information, and the number of occurrences of the log data.
제7항에 있어서, 상기 로그 처리기는
매칭되는 로그 수집 규칙이 존재하지 않으면, 현재 설정된 샘플링률에 따라서 수신된 로그데이터를 저장 또는 삭제하는 것을 특징으로 하는 규칙 기반의 동적 로그 수집 장치.
The method of claim 7, wherein the log processor
If there is no matching log collection rule, the rule-based dynamic log collection device characterized in that 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 KR20190041192A (en) 2019-04-22
KR102088285B1 true 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 (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

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007193436A (en) * 2006-01-17 2007-08-02 Fujitsu Ltd Log retrieval program, log management device, information processor and log retrieval method

Family Cites Families (3)

* 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
KR101718599B1 (en) * 2015-01-19 2017-03-21 주식회사 엘지씨엔에스 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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007193436A (en) * 2006-01-17 2007-08-02 Fujitsu Ltd Log retrieval program, log management device, information processor and log retrieval method

Cited By (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

Also Published As

Publication number Publication date
KR20190041192A (en) 2019-04-22

Similar Documents

Publication Publication Date Title
US20160306613A1 (en) Code routine performance prediction using test results from code integration tool
US11513935B2 (en) System and method for detecting anomalies by discovering sequences in log entries
US11010223B2 (en) Method and system of automatic event and error correlation from log data
US20180365085A1 (en) Method and apparatus for monitoring client applications
US9348687B2 (en) Determining a number of unique incidents in a plurality of incidents for incident processing in a distributed processing system
US11093349B2 (en) System and method for reactive log spooling
US20190108112A1 (en) System and method for generating a log analysis report from a set of data sources
US9531781B2 (en) Triggering window conditions by streaming features of an operator graph
US9658902B2 (en) Adaptive clock throttling for event processing
US9170860B2 (en) Parallel incident processing
CN107370806B (en) HTTP status code monitoring method, device, storage medium and electronic equipment
US20120144021A1 (en) Administering Event Reporting Rules In A Distributed Processing System
US9256482B2 (en) Determining whether to send an alert in a distributed processing system
CN105488610A (en) Fault real-time analysis and diagnosis system and method for power application system
KR102088285B1 (en) Method and device for collecting log based on rule
US20080155560A1 (en) Multiple-application transaction monitoring facility for debugging and performance tuning
US9430117B2 (en) Triggering window conditions using exception handling
CN107544832A (en) A kind of monitoring method, the device and system of virtual machine process
KR20180037342A (en) Application software error monitoring, statistics management service and solution method.
CN114116422A (en) Hard disk log analysis method, hard disk log analysis device and storage medium
CN113094269A (en) Application program test exception analysis method and device
JP2009245154A (en) Computer system, method, and computer program for evaluating symptom
US20230004478A1 (en) Systems and methods of continuous stack trace collection to monitor an application on a server and resolve an application incident
KR102656541B1 (en) Device, method and program that analyzes large log data using a distributed method for each log type
US20190190981A1 (en) Intelligent trace generation from compact transaction runtime data

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)