Strip <13> from logs

Tags:

#1 jwmott

We have a process that writes log info to a txt file. The process writes a blank line before and after its processing. What can be done to drop these lines from being included when nxlog sends to the log aggregator that we use?

#2 rafDeactivated Nxlog ✓
#1 jwmott
We have a process that writes log info to a txt file. The process writes a blank line before and after its processing. What can be done to drop these lines from being included when nxlog sends to the log aggregator that we use?

Hey,

You may use regular expression against your empty line char, using an expression similar to:

<Exec>
        if $raw_event =~ /^your_regular_expression_here/  drop();
 </Exec>

Hope this helps.

Best regards,
Raf