Problems with multiline extension in nxlog -
i have following logformat:
-- new entry ------------------------- 08:03:10 01.04.15 ncjhdnbchjbdc 08:03:10 jnkjsdncksjdnc xd1: ndkjewnckjdwcndw xd2: jncxkjdsnkjcndsqckjnc c cw djkcdnc cnd kj nc 08:03:10 dscsdcdsc -- new entry ------------------------- 08:03:10 01.04.15 ncjhdnbchjbdc 08:03:10 jnkjsdncksjdnc xd1: ndkjewnckjdwcndw xd2: jncxkjdsnkjcndsqckjnc c cw djkcdnc cnd kj nc 08:03:10 dscsdcdsc
i want complete entry in 1 line use multiline extension:
<extension multiline> module xm_multiline headerline /^--/ endline " " </extension> <input in> module im_file file "input.txt" savepos true readfromlast true inputtype multiline exec if $raw_event !~ /^--/ drop(); exec $raw_event = replace($raw_event, "\r\n", ";"); </input> <output out> module om_file file "output.txt" </output> <route 1> path in => out </route>
the multiline extension works expected existing entries in inputfile after start of nxlog. new entries not correctly written in output. header written in output. has idea of iam doing wrong?
update: pollinterval of im_file seems problem. red following in documentation of nxlog (section xm_multiline):
note until there new header read, previous message stored in buffers because module not know message ends. im_file module forcibly flush buffer after configured pollinterval timeout. if behaviour unacceptable, consider using kind of encapsulation method (json, xml, rfc5425, etc) or use end marker endline if possible.
so, use end marker doesn't work. tried different values endline (regex: /^\s*$/ string: " ")
this line needs fixed.
exec if $raw_event !~ /^--/ drop()
should be
exec if $raw_event =~ /^--/ drop()
Comments
Post a Comment