Buffer is not doing buffering

View thread

mazharnazeer

Hi,

I am implementing configuration for nxlog to read from a file and write to UDP socket. I am also implementing to check if nxlog failed to forward log messages, then it should write in its log. For this case, I am using buffer and checking buffer count to log the message. I checked it by unplugging the network cable and it is not working. Please review following code.

<Extension _syslog>

    Module      xm_syslog
</Extension>

<Extension _exec>
    Module    xm_exec
</Extension>

<Processor buffer_Check>
    Module pm_buffer
    MaxSize 2048
    Type Mem
    Exec log_info("In Buffer" + buffer_count());
    Exec if buffer_count() > 2 \
        {\
        log_info("Route Failover");\
        }\
</Processor>

<Input in_WebAdmin>
    # Exec     log_info("Reading File");
    Module    im_file
    SavePos    TRUE
    PollInterval 0.5
    File 'C:\\ProgramData\\Cisco\\CUACA\\Server\\Logging\\WAD\\AACM_*.log'
</Input>

<Output out_WebAdmin>
    Module om_udp
    Host 10.110.22.6
    Port 514
    Exec to_syslog_ietf();
</Output>

<Route route_CTServer>
    Path in_WebAdmin => buffer_Check => out_WebAdmin
</Route>

 

In above configuration, it should log the message "Route Failover" in case nxlog is not forwarding log messages and nxlog is storing log messages in buffer. Please review it and let me know the solution as soon as possible.

 

Thanks,

Mazhar Nazeer