unable to see log file data using nxlog im_file

Tags:

#1 manzur.shaikh

define ROOT C:\Program Files (x86)\nxlog define ROOT_STRING C:\Program Files (x86)\nxlog define CERTDIR %ROOT%\cert Moduledir %ROOT%\modules CacheDir %ROOT%\data Pidfile %ROOT%\data\nxlog.pid SpoolDir %ROOT%\data LogFile %ROOT%\data\nxlog.log <Extension charconv> Module xm_charconv AutodetectCharsets utf-8, euc-jp, utf-16, utf-32, iso8859-2 </Extension> <Extension fileop> Module xm_fileop </Extension> <Input im_file> Module im_file File "C:\inetpub\vhost\Auth\logs\nlog-test.log" SavePos TRUE Exec $raw_event = '[xxxxxxxxxxxxxxxxxxx]' + $raw_event; Exec $Message = $raw_event; </Input>

<Output out> Module om_tcp Host listener.logz.io Port 8010 </Output>

<Route route> Path im_file => out </Route>

#2 Lauxna
#1 manzur.shaikh
define ROOT C:\Program Files (x86)\nxlog define ROOT_STRING C:\Program Files (x86)\nxlog define CERTDIR %ROOT%\cert Moduledir %ROOT%\modules CacheDir %ROOT%\data Pidfile %ROOT%\data\nxlog.pid SpoolDir %ROOT%\data LogFile %ROOT%\data\nxlog.log <Extension charconv> Module xm_charconv AutodetectCharsets utf-8, euc-jp, utf-16, utf-32, iso8859-2 </Extension> <Extension fileop> Module xm_fileop </Extension> <Input im_file> Module im_file File "C:\inetpub\vhost\Auth\logs\nlog-test.log" SavePos TRUE Exec $raw_event = '[xxxxxxxxxxxxxxxxxxx]' + $raw_event; Exec $Message = $raw_event; </Input> <Output out> Module om_tcp Host listener.logz.io Port 8010 </Output> <Route route> Path im_file => out </Route>

Hello,

You can try this first::

  1. I would advise using single quotes for input file: File 'C:\inetpub\vhost\Auth\logs\nlog-test.log' (you can read about it here https://nxlog.co/docs/nxlog-ce/nxlog-reference-manual.html#im_file)
  2. Change SavePos TRUE to FALSE (for testing, specially if logs aren't generated often). I also add ReadFromLast FALSE (not sure if it's necessary)
  3. Change output to om_file and save it locally, so you can check fast if you are receiving data.

Let me know the results, I can try to help you more :)

Regards, Asta