Skip to content

Instantly share code, notes, and snippets.

@dvas0004
Last active October 7, 2016 20:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dvas0004/058dcda0a0055012b4ae to your computer and use it in GitHub Desktop.
Save dvas0004/058dcda0a0055012b4ae to your computer and use it in GitHub Desktop.
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 http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html
## 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\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension _syslog>
Module xm_syslog
</Extension>
<Extension json>
Module xm_json
</Extension>
<Input in>
Module im_msvistalog
Exec to_json();
Query <QueryList>\
<Query Id="0">\
<Select Path="Microsoft-Windows-TaskScheduler/Operational">*</Select>\
</Query>\
<Query Id="1">\
<Select Path="Application">*</Select>\
</Query>\
<Query Id="2">\
<Select Path="Security">*</Select>\
</Query>\
<Query Id="3">\
<Select Path="System">*</Select>\
</Query>\
</QueryList>
</Input>
<Input DNS_LOGS>
Module im_file
File "C:\\DNSLogs\dns.txt"'
InputType LineBased
Exec $Message = $raw_event;
Exec to_json();
SavePos TRUE
</Input>
<Output out>
Module om_tcp
Port 5140
Host 192.168.10.175
</Output>
<Output out_debug>
Module om_file
File "C:\\nxlog_debug.log"
</Output>
<Route 1>
Path in => out
</Route>
<Route 2>
#Path DNS_LOGS => out_debug
Path DNS_LOGS => out
</Route>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment