I got some issue while working with my night batch log.
How push MULTIline log as one event? I got stuck with one logfile that is over 26000 lines…
NxLog get stuck at some point - I don't really blame him- but how can I force him to work with those kind of multilines files?
My conf file:
<Extension json>
Module xm_json
</Extension>
<Extension multiline>
Module xm_multiline
Exec if $raw_event =~ /^\s*$/ drop();
HeaderLine /^\#\#\#$/
EndLine /\* CODE FIN JOB/
</Extension>
<Input in1>
Module im_file
File '/opt/XXX/YYYY/logs/*.nxlog'
SavePos FALSE
ReadFromLast FALSE
InputType multiline
Exec if $raw_event =~ s/^\#\#\#\\n// {}
Exec $nxlog_message = $raw_event;
Exec $nxlog_tags = "YYYY";
Exec $nxlog_hostname = hostname();
Exec $nxlog_filename = file_name();
Exec file_remove($nxlog_filename);
Exec to_json();
</Input>
<Extension fileop>
Module xm_fileop
</Extension>
<Output logstash>
Module om_tcp
Port PPPP
Host ZZZZZZZ
</Output>
Here is some file that I push into nxlog.
Each file represent one job/event. The first one made NxLog freeze for all the weekend.
# find /opt/XXXX/YYYYY/logs/ -name "*.nxlog" -exec wc -l {} \;
26477 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
104 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
113 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
93 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
49 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
136 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
65 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
278 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
311 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
95 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
598 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
307 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
45 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
191 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
94 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
97 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
91 /opt/XXXX/YYYYY/logs/ZZZZZZ_WWWW.nxlog
Any idea how to solve this?