Skip to content

Instantly share code, notes, and snippets.

@gt50
Created October 24, 2014 02:14
Show Gist options
  • Save gt50/519ac8227ac89b930129 to your computer and use it in GitHub Desktop.
Save gt50/519ac8227ac89b930129 to your computer and use it in GitHub Desktop.
nxlog.conf for iis
## 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 eventlog_in>
Module im_msvistalog
# For windows 2003 and earlier use the following:
# Module im_mseventlog
Exec $raw_event = to_json();
</Input>
<Input iis_1>
Module im_file
File "C:\inetpub\logs\LogFiles\W3SVC9\u_ex*.log"
ReadFromLast True
SavePos True
Exec if $raw_event =~ /^#/ drop();
</Input>
<Output iis_out>
Module om_tcp
Host 10.1.2.84
Port 3515
OutputType LineBased
</Output>
<Output eventlog_out>
Module om_tcp
Host 10.1.2.84
Port 3516
#OutputType LineBased
</Output>
<Route 1>
Path iis_1 => iis_out
</Route>
<Route 2>
Path eventlog_in => eventlog_out
</Route>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment