Thursday, September 30, 2021

nxlog conf file

 My nxlog.conf file for the lab


Panic Soft

#NoFreeOnExit TRUE

define ROOT     C:\Program Files (x86)\nxlog

define CERTDIR  %ROOT%\cert

define CONFDIR  %ROOT%\conf

define LOGDIR   %ROOT%\data

define LOGFILE  %LOGDIR%\nxlog.log


Moduledir %ROOT%\modules

CacheDir  %ROOT%\data

Pidfile   %ROOT%\data\

SpoolDir  %ROOT%\data

<Extension _gelf>

    Module      xm_gelf


<Input from_eventlog>

    Module      im_msvistalog

    ReadFromLast FALSE

    SavePos      TRUE


<Output out>

    Module      om_udp    


    Port        12201

    #Exec       to_syslog_snare();

    OutputType  GELF


<Route 1>

    Path from_eventlog => out


<Extension _fileop>

    Module      xm_fileop

    # Check the size of our log file hourly, rotate if larger than 5MB


        Every   1 hour

        Exec    if (file_exists('%LOGFILE%') and \

                   (file_size('%LOGFILE%') >= 5M)) \

                    file_cycle('%LOGFILE%', 8);


    # Rotate our log file every week on Sunday at midnight


        When    @weekly

        Exec    if file_exists('%LOGFILE%') file_cycle('%LOGFILE%', 8);



No comments:

Post a Comment