Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Machbase 3.5버전 이후의 설정 파일은 이전 버전과 호환되지 않는다.

Table 1. Template variable

...

템플릿 변수

변수 이름설명비고
COLLECT_TYPE데이터 수집 방법데이터 수집 방법을 설정한다. 데이터 수집방법은 다음과 같다. FILE 은 기본 값으로 collector가 설치된 장비의 특정 파일을 지정한다.  SFTP: 원격 SFTP파일 경로 SOCKET: soket에서 데이터 입력ODBC: ODBC로 설정된 데이터베이스에서 데이터 입력
LOG_SOURCE읽을 로그 파일의 위치읽어들일 데이터 파일의 위치. SFTP 모드에서는 원격 호스트의 절대 경로를 지정해야 한다. SOKET 및 ODBC 모드에서는 사용되지 않는다. 원본 파일을 여러개로 설정하거나 정규 표현식으로 설정하는 것도 가능하다.
SFTP_HOSTSFTP_HOST
SFTP_PORTSFTP_PORT설정하지 않은 경우 22가 기본으로 설정됨.
SFTP_USERSFTP 사용자명anonymous가 기본값으로 설정
SFTP_PASSSFTP 패스워드anonymous가 기본값으로 설정
SOCKET_PORTCollector가 데이터를 입력받는 소켓 포트 번호
SOCKET_PROTOCOLCollector 소켓 프로토콜 종류사용 가능한 값은 TCP와 UDP이며 기본값은 TCP이다.
ODBC_DSNODBC 모드의 DSN".odbc.ini"의 값
ODBC_QUERYODBC 모드의 질의문ODBC 데이터 소스에서 입력 데이터를 얻기 위해 실행하는 Query string
ODBC_SEQ_COLUMNODBC 모드의 증가되는 컬럼 명숫자 컬럼만 가능함
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_PATHRotation 파일 경로명 설정
ROTATE_FILE_COUNTRotation 파일 숫자 설정
ROTATE_REGEX_SORTRotation 파일의 순서 설정기본값은 ASC임 DESC도 가능함

REGEX_PATH, PREPROCESS_PATH는 collector가 실행시에 참조하는 파일이다. 아래는 REGEX_PATH에 설정되는 rgx파일에 대한 설명이다.


...

Table 2. Variable of regex

...

정규식 변수

변수 이름설명비고
LOG_TYPEName of log type of regular expressionIt can be modified, but this value will be inserted into the database so that the same value should be kept.
COL_LISTRules of mapping analyzed data to tables of database.Described it in the table below.
REGEXRegular expression for data analysis
START_REGEXRegular expression to show a starting point of a dataIt is included during the process of REGEX analysis.
END_REGEXRegular expression to show a ending point of a dataIt 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 variableDescriptionDetailed information변수 이름설명비고
NAMEColumn name of tableIt needs character strings without a space.
TYPEData type of a tableIt 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_FORMATWhen 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_INDEXIndex creation flag for the column: 0: Do not create/ 1: CreateIt is automatically generated based on data types.
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.

...