NxLog 로그를 Datadog 플랫폼으로 전송하도록 설정하려면 C:\Program Files\nxlog\conf의 전체 파일을 다음으로 변경합니다.
## Set the ROOT to the folder your nxlog was installed into,
## otherwise it won't start.
#To change for your own system if necessary
define ROOT C:\Program Files\nxlog
#define ROOT_STRING C:\Program Files\nxlog
#define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
##Extension to format the message in JSON format
<Extension json>
Module xm_json
</Extension>
##Extension to format the message in syslog format
<Extension syslog>
Module xm_syslog
</Extension>
########## INPUTS ###########
##Input for windows event logs
<Input syslogs>
Module im_msvistalog
##For windows 2003 and earlier use the following:
# Module im_mseventlog
</Input>
############ OUTPUTS ##############
##TCP output module
<Output out>
Module om_tcp
Host
Port
Exec to_syslog_ietf();
Exec $raw_event="<DATADOG_API_KEY> "+$raw_event;
</Output>
############ ROUTES TO CHOOSE #####
<Route 1>
Path syslogs => out
</Route>
<DATADOG_API_KEY> 형식으로 반드시 변경하세요.
모니터링려는 각 파일에 대해 NxLog Watchfile 모듈을 활성화하고 아웃풋 섹션 앞에 다음을 추가합니다.
##Module to watch a file
<Input FILE_WATCH_1>
Module im_file
File "PATH\\TO\\YOUR\\FILE1"
Exec $SourceName = '<MY_APPLICATION_NAME>';
SavePos TRUE
##include the message and add meta data
Exec $Message = $raw_event;
</Input>
해당 파일이 아웃풋 섹션에 플러그인되어 있는지 확인합니다.
<Route file1>
Path FILE_WATCH_1,FILE_WATCH_2,... => out
</Route>
## Set the ROOT to the folder your nxlog was installed into,
## otherwise it won't start.
#To change for your own system if necessary
define ROOT C:\Program Files\nxlog
#define ROOT_STRING C:\Program Files\nxlog
#define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
##Extension to format the message in JSON format
<Extension json>
Module xm_json
</Extension>
##Extension to format the message in syslog format
<Extension syslog>
Module xm_syslog
</Extension>
########## INPUTS ###########
##Input for windows event logs
<Input syslogs>
Module im_msvistalog
##For windows 2003 and earlier use the following:
# Module im_mseventlog
</Input>
############ OUTPUTS ##############
##HTTP output module
<Output out>
Module om_http
URL
Port
Exec to_syslog_ietf();
Exec $raw_event="<DATADOG_API_KEY> "+$raw_event;
</Output>
############ ROUTES TO CHOOSE #####
<Route 1>
Path syslogs => out
</Route>