infosystir

nxlog.conf

Feb 28th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. ## Please set the ROOT to the folder your nxlog was installed into,
  2. ## otherwise it will not start.
  3. define ROOT C:\Program Files (x86)\nxlog
  4. define CERTDIR %ROOT%\cert
  5. define CONFDIR %ROOT%\conf
  6. define LOGDIR %ROOT%\data
  7. define LOGFILE %LOGDIR%\nxlog.log
  8. LogFile %LOGFILE%
  9.  
  10. Moduledir %ROOT%\modules
  11. CacheDir %ROOT%\data
  12. Pidfile %ROOT%\data\nxlog.pid
  13. SpoolDir %ROOT%\data
  14. LogFile %ROOT%\data\nxlog.log
  15.  
  16. <Extension _syslog>
  17. Module xm_syslog
  18. </Extension>
  19.  
  20. <Extension _exec>
  21. Module xm_exec
  22. </Extension>
  23.  
  24. <Extension _fileop>
  25. Module xm_fileop
  26.  
  27. # Check the size of our log file hourly, rotate if larger than 5MB
  28. <Schedule>
  29. Every 1 hour
  30. Exec if (file_exists('%LOGFILE%') and \
  31. (file_size('%LOGFILE%') >= 5M)) \
  32. file_cycle('%LOGFILE%', 8);
  33. </Schedule>
  34.  
  35. # Rotate our log file every week on Sunday at midnight
  36. <Schedule>
  37. When @weekly
  38. Exec if file_exists('%LOGFILE%') file_cycle('%LOGFILE%', 8);
  39. </Schedule>
  40.  
  41. </Extension>
  42.  
  43. <Extension _json>
  44. Module xm_json
  45. </Extension>
  46.  
  47. <Input internal>
  48. Module im_internal
  49. Exec $Message = to_json();
  50. </Input>
  51.  
  52. # Windows Event Log
  53. <Input eventlog>
  54. # Uncomment im_msvistalog for Windows Vista/2008 and later
  55. Module im_msvistalog
  56.  
  57. #Uncomment im_mseventlog for Windows XP/2000/2003
  58. #Module im_mseventlog
  59.  
  60. # JSON is required because some Windows logs contain new-line characters.
  61. Exec $Message = to_json();
  62. </Input>
  63.  
  64. <Processor buffer>
  65. Module pm_buffer
  66. # 100Mb disk buffer
  67. MaxSize 102400
  68. Type disk
  69. </Processor>
  70.  
  71. <Output out>
  72. Module om_tcp
  73. Host {sensor_address}
  74. Port 514
  75.  
  76. Exec to_syslog_bsd();
  77.  
  78. #Use the following line for debugging
  79. #Exec file_write("C:\Program Files (x86)\nxlog\data\nxlog_output.log", $raw_event);
  80. </Output>
  81.  
  82. <Route 1>
  83. Path internal, eventlog => buffer => out
  84. </Route>
Add Comment
Please, Sign In to add comment