...
REGEX_PATH, PREPROCESS_PATH는 collector가 실행시에 참조하는 파일이다. 아래는 REGEX_PATH에 설정되는 rgx파일에 대한 설명이다.
표 2. 정규식 변수
변수 이름 | 설명 | 비고 |
---|---|---|
LOG_TYPE |
정규식 이름 | 수정될 수 있는 값이지만, 데이터 베이스에 함께 저장되므로 값을 유지하는 것이 좋다. |
COL_LIST |
테이블내의 컬럼들의 리스트 | 테이블에 속해있는 컬럼들의 정보 | |
REGEX | 데이터 분석을 위한 정규표현식 | |
END_REGEX | 한 레코드의 끝을 의미하는 정규표현식 | 각각의 레코드를 구분하기위한 정규표현식. 설정하지않으면 "\n" 줄바꿈을 기본으로 사용한다. |
COL_LIST는 로그 파일과 데이터베이스 컬럼을 연결하는 정보를 기술한다. 정규표현식의 결과와 컬럼을 설정하는 다양한 정보를 설정해야 한다. COL_LIST를 이용하여 복잡한 로그 데이터를 구조화된 테이블 컬럼에 입력할 수 있다.
표 3. COL_LIST
변수 이름 | 설명 | 비고 | |||
---|---|---|---|---|---|
NAME | Column name of table | It needs character strings without a space. | TYPE | Data type of a table컬럼 이름 | 스페이스를 포함하지 않은 문자열 |
TYPE | 컬럼의 데이터 타입 | It represents the type of a string. Types and strings are as follows. The size is in the parentheses. (short (6), int (11), long (20), float (17), double (17), datetime (31), varchar (User-defined), ipv4 (15), ipv6 (45), text (64MB), binary (64MB)) | |||
SIZEIt | indicates the size of the column.컬럼의 사이즈 | The size has to be the same with the specified size listed above except varchar type. | DATE_FORMAT | When TYPE is datetime, format string to express the time. . | |
DATE_FORMAT | 타입이 datetime일 때, datetime 데이터의 형식 | It uses the internal system function "strptime" when parsing. And it has to describe month, day, hour or year in the exact format that the system function supports. e.g.) Aug 19 07:56:16 is the format of month day hour:min:sec, and it is required to define "%b %d %H:%M:%S" in order to parse them with "strptime".It uses the internal system function"strptime" when parsing. And it has to describe month, day, hour or year in the exact format that the system function supports. | |||
USE_INDEX | Index creation flag for the column: 0: Do not create/ 1: Create인덱스 생성 여부 | It is automatically generated based on data types. 0: 생성하지 않음/ 1: 생성함 | |||
REGEX_NONumber of result values from the regular expression that is entered as REGEX. | 정규표현식 내에서의 토큰 번호 | When the input log string is parsed, it is printed in multiple strings. In this case, it needs to determine what to use for the current column from the several results and it records the number of the result as well. When it's parsed, the utility machregex can be used to see the string. |
...