Advertisement
issjunior

nxlog (funcional).conf

Mar 5th, 2021
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.75 KB | None | 0 0
  1. Panic Soft
  2. #NoFreeOnExit TRUE
  3.  
  4. define ROOT     C:\Program Files (x86)\nxlog
  5. define CERTDIR  %ROOT%\cert
  6. define CONFDIR  %ROOT%\conf
  7. define LOGDIR   %ROOT%\data
  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.  
  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.     # Rotate our log file every week on Sunday at midnight
  35.     <Schedule>
  36.         When    @weekly
  37.         Exec    if file_exists('%LOGFILE%') file_cycle('%LOGFILE%', 8);
  38.     </Schedule>
  39. </Extension>
  40. <Extension _gelf>
  41.     Module     xm_gelf
  42. </Extension>
  43.  
  44. define MonitoredEventIds    4625, 4720, 4722, 4723, 4724, 4725, 4726, 4738, 4740, \
  45.                             4767, 4781, 4794
  46.  
  47.  
  48. <Input eventlog>
  49.     Module  im_msvistalog
  50.     <QueryXML>
  51.         <QueryList>
  52.             <Query Id='0'>
  53.                 <Select Path='Security'>*</Select>
  54.             </Query>
  55.         </QueryList>
  56.     </QueryXML>
  57.     <Exec>
  58.         if $EventID NOT IN (%MonitoredEventIds%) drop();
  59.     </Exec>
  60. </Input>
  61.  
  62. <Output out>
  63.     Module      om_udp
  64.     Host        IP_DO_GRAYLOG
  65.     Port        PORTA
  66.     OutputType  GELF
  67. </Output>
  68.  
  69. <Route 1>
  70.     Path    eventlog => out
  71. </Route>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement