...
Machbase 3.5버전 이후의 설정 파일은 이전 버전과 호환되지 않는다.
Table 표 1. Template variable
...
템플릿 변수
변수 이름 | 설명 | 비고 |
---|---|---|
COLLECT_TYPE | 데이터 수집 방법 | 데이터 수집 방법을 설정한다. 데이터 수집방법은 다음과 같다. FILE 은 기본 값으로 collector가 설치된 장비의 특정 파일을 지정한다. SFTP: 원격 SFTP파일 경로 SOCKET: soket에서 데이터 입력. ODBC: ODBC로 설정된 데이터베이스에서 데이터 입력 |
LOG_SOURCE | 읽을 로그 파일의 위치 | 읽어들일 데이터 파일의 위치. SFTP 모드에서는 원격 호스트의 절대 경로를 지정해야 한다. SOKET 및 ODBC 모드에서는 사용되지 않는다. 원본 파일을 여러개로 설정하거나 정규 표현식으로 설정하는 것도 가능하다. |
SFTP_HOST | SFTP_HOST | |
SFTP_PORT | SFTP_PORT | 설정하지 않은 경우 22가 기본으로 설정됨. |
SFTP_USER | SFTP 사용자명 | anonymous가 기본값으로 설정 |
SFTP_PASS | SFTP 패스워드 | anonymous가 기본값으로 설정 |
SOCKET_PORT | Collector가 데이터를 입력받는 소켓 포트 번호 | |
SOCKET_PROTOCOL | Collector 소켓 프로토콜 종류 | 사용 가능한 값은 TCP와 UDP이며 기본값은 TCP이다. |
ODBC_DSN | ODBC 모드의 DSN | ".odbc.ini"의 값 |
ODBC_QUERY | ODBC 모드의 질의문 | ODBC 데이터 소스에서 입력 데이터를 얻기 위해 실행하는 Query string |
ODBC_SEQ_COLUMN | ODBC 모드의 증가되는 컬럼 명 | 숫자 컬럼만 가능함 |
LIB_NAME | 외부 링크 라이브러리 패스 | 아직 사용되지 않음 |
REGEX_PATH | 입력 데이터를 분석하기 위한 정규 표현식 파일 | ODBC모드에서는 사용되지 않는다. |
PREPROCESS_PATH | 데이터 선처리용 Python 스크립트 파일의 위치 | |
SLEEP_TIME | 데이터를 입력 완료후 대기 시간 | 밀리초 단위이며 기본값은 1000이다. |
DB_TABLE_NAME | 입력할 테이블 명 | |
DB_ADDR | 입력할 데이터베이스의 IP주소 | |
DB_PORT | 데이터베이스 포트 번호 | |
DB_USER | 데이터베이스 사용자명 | |
DB_PASS | 데이터베이스 패스워드 | |
APPEND_MODE | 데이터 입력 방법 설정 | 과거 버전과의 호환성을 위한 값으로 사용되지 않는다. |
AUTO_ADD_COLUMN | 테이블 컬럼이 없는 경우 이를 자동으로 생성할 지의 여부 0이면 생성하지 않고 1이면 자동 생성함. | 기본값은 1임 |
CREATE_TABLE_MODE | 입력 테이블에 대한 연산을 설정한다. (0:아무것도 실행하지 않는다. 1: 기존 테이블을 truncate한다 2 : 테이블을 생성한다. 에러가 발생하면 에러를 trc에 기록하고 계속 진행한다. 3: 테이블을 drop하고 테이블을 재생성한다.) | 일반적으로 2로 설정하는 것을 추천함 |
LANG | 입력 데이터 파일의 인코딩을 지정한다. | 사용가능 값은 UTF-8(기본값), CP949(MS949), KSC5601, EUCJP, SHIFTJIS, BIG5, BG231280가 지원됨 |
REGEX_SORT | 입력 파일의 순서를 결정한다. | 기본값은 ASC이며 DESC도 가능함. |
ROTATE_FILE_PATH | Rotation 파일 경로명 설정 | |
ROTATE_FILE_COUNT | Rotation 파일 숫자 설정 | |
ROTATE_REGEX_SORT | Rotation 파일의 순서 설정 | 기본값은 ASC임 DESC도 가능함 |
REGEX_PATH, PREPROCESS_PATH는 collector가 실행시에 참조하는 파일이다. 아래는 REGEX_PATH에 설정되는 rgx파일에 대한 설명이다.
...
Table 표 2. Variable of regex
...
정규식 변수
변수 이름 | 설명 | 비고 |
---|---|---|
LOG_TYPE | Name of log type of regular expression | It can be modified, but this value will be inserted into the database so that the same value should be kept. |
COL_LIST | Rules of mapping analyzed data to tables of database. | Described it in the table below. |
REGEX | Regular expression for data analysis | |
START_REGEX | Regular expression to show a starting point of a data | It is included during the process of REGEX analysis. |
END_REGEX | Regular expression to show a ending point of a data | It is excluded during the process of REGEX analysis. If it is not specified, the collector will not be executed. |
...
COL_LIST는 로그 파일과 데이터베이스 컬럼을 연결하는 정보를 기술한다. 정규표현식의 결과와 컬럼을 설정하는 다양한 정보를 설정해야 한다. COL_LIST를 이용하여 복잡한 로그 데이터를 구조화된 테이블 컬럼에 입력할 수 있다.
Table 표 3. COL_LIST
Name of variable | Description | Detailed information변수 이름 | 설명 | 비고 |
---|---|---|---|---|
NAME | Column name of table | It needs character strings without a space. | ||
TYPE | Data type of a table | 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)) | ||
SIZE | It 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. 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. | ||
REGEX_NO | Number 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. |
...