Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
sample nxlog configuration file for windows server (post 2003)
## This is a sample configuration file. See the nxlog reference manual about the
## configuration options. It should be installed locally and is also available
## online at
## Please set the ROOT to the folder your nxlog was installed into,
## otherwise it will not start.
#define ROOT C:\Program Files\nxlog
define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension _syslog>
Module xm_syslog
<Extension json>
Module xm_json
<Input in>
Module im_msvistalog
Exec to_json();
Query <QueryList>\
<Query Id="0">\
<Select Path="Microsoft-Windows-TaskScheduler/Operational">*</Select>\
<Query Id="1">\
<Select Path="Application">*</Select>\
<Query Id="2">\
<Select Path="Security">*</Select>\
<Query Id="3">\
<Select Path="System">*</Select>\
<Input DNS_LOGS>
Module im_file
File "C:\\DNSLogs\dns.txt"'
InputType LineBased
Exec $Message = $raw_event;
Exec to_json();
SavePos TRUE
<Output out>
Module om_tcp
Port 5140
<Output out_debug>
Module om_file
File "C:\\nxlog_debug.log"
<Route 1>
Path in => out
<Route 2>
#Path DNS_LOGS => out_debug
Path DNS_LOGS => out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment