4
0

nxlog.conf 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Panic Soft
  2. #NoFreeOnExit TRUE
  3. define ROOT C:\Program Files\nxlog
  4. define CERTDIR %ROOT%\cert
  5. define CONFDIR %ROOT%\conf\nxlog.d
  6. define LOGDIR %ROOT%\data
  7. include %CONFDIR%\\*.conf
  8. define LOGFILE %LOGDIR%\nxlog.log
  9. LogFile %LOGFILE%
  10. Moduledir %ROOT%\modules
  11. CacheDir %ROOT%\data
  12. Pidfile %ROOT%\data\nxlog.pid
  13. SpoolDir %ROOT%\data
  14. <Extension _syslog>
  15. Module xm_syslog
  16. </Extension>
  17. <Extension _charconv>
  18. Module xm_charconv
  19. AutodetectCharsets iso8859-2, utf-8, utf-16, utf-32
  20. </Extension>
  21. <Extension _exec>
  22. Module xm_exec
  23. </Extension>
  24. <Extension _fileop>
  25. Module xm_fileop
  26. # Check the size of our log file hourly, rotate if larger than 5MB
  27. <Schedule>
  28. Every 1 hour
  29. Exec if (file_exists('%LOGFILE%') and \
  30. (file_size('%LOGFILE%') >= 5M)) \
  31. file_cycle('%LOGFILE%', 8);
  32. </Schedule>
  33. # Rotate our log file every week on Sunday at midnight
  34. <Schedule>
  35. When @weekly
  36. Exec if file_exists('%LOGFILE%') file_cycle('%LOGFILE%', 8);
  37. </Schedule>
  38. </Extension>
  39. <Extension _gelf>
  40. Module xm_gelf
  41. </Extension>
  42. # Snare compatible example configuration
  43. # Collecting event log
  44. <Input in>
  45. Module im_msvistalog
  46. </Input>
  47. # Sends Eevent in GELF format to Graylog
  48. <Output out>
  49. Module om_udp
  50. Host [Graylog.Server.IP.Address]
  51. Port 12201
  52. OutputType GELF
  53. </Output>
  54. #
  55. # Connect input 'in' to output 'out'
  56. <Route 1>
  57. Path in => out
  58. </Route>