Glad to have found this thread. I am close but not successful yet.
I have a Windows 2012 (test server) and want to get the logs into the system.
- I started over and downloaded a Ubuntu virtual machine as outlinned in the docs to run GrayLog. (it is running)
- I downloaded and installed NXLog onto my Windows Test Server, and started a service with pointer to my log files ‘u_ex*.log’ from the inside of my Windows Test Server.
I have not done anything with: SideCar, and cannot get a HTTP message to show up on the VM.
I am sure that I am close but not there .
If anyone sees something wrong with the setup I am attempting, or the information below I would welcome input.
Andy…
MyConf file from the TestServer
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 gelf>
Module xm_gelf
</Extension>
<Extension fileop>
Module xm_fileop
</Extension>
<Extension _json>
Module xm_json
</Extension>
<Extension w3c>
Module xm_csv
Fields $date, $time, $s-sitename, $s-computername, $s-ip, $cs-method, $cs-uri-stem, $cs-uri-query, $s-port, $cs-username, $c-ip, $cs-version, $cs(User-Agent), $cs(Cookie), $cs(Referer), $cs-host, $sc-status, $sc-substatus, $sc-win32-status, $sc-bytes, $cs-bytes $time-taken
FieldTypes string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, integer, integer, integer, string, string, string
Delimiter ' '
QuoteChar '"'
EscapeControl FALSE
UndefValue -
</Extension>
<Input eventlog>
Module im_msvistalog
</Input>
<Input iis>
Module im_file
File "C:\\inetpub\\logs\\testFolder\\u_ex*.log"
SavePos TRUE
Exec if $raw_event =~ /^#/ drop(); \
else \
{ \
w3c->parse_csv(); \
$EventTime = parsedate($date + " " + $time); \
$SourceName = "IIS"; \
$Message = to_json(); \
}
</Input>
<Output graylog>
Module om_tcp
Host xx.xx.xx.xx #my Graylog VM
Port 12201
OutputType GELF_TCP
</Output>
<Route eventlog>
Path eventlog => graylog
</Route>
<Route iis-to-graylog>
Path iis => graylog
</Route>
My Log from ‘nxlog.log’
2017-06-16 11:33:09 WARNING stopping nxlog service
2017-06-16 11:33:09 WARNING nxlog-ce received a termination request signal, exiting...
2017-06-16 11:33:10 INFO connecting to xx.xx.xx.xx:12201
2017-06-16 11:33:10 INFO nxlog-ce-2.9.1716 started
My Source on the instance of GrayLog I am running on the downloaded VM I am running.