Skip to content

Commit 29ac8f1

Browse files
authored
in_winlog: bring back the 'EventId' field (#2461)
The "EventId" field was removed in cd54540 in part of an effort to canonicalize the output format. The assumption behind the removal was that "EventId" was too low level to be meaningful for uesrs, and just having the human readable "Message" field is just enough. Our assumption was wrong. This reverts the removal to resolve #2426 ("WinLog input plugin stopped reporting the EventId"). Signed-off-by: Fujimoto Seiji <[email protected]>
1 parent f6a4d39 commit 29ac8f1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugins/in_winlog/pack.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ void winlog_pack_event(msgpack_packer *mp_pck, PEVENTLOGRECORD evt,
325325
msgpack_pack_array(mp_pck, 2);
326326
flb_pack_time_now(mp_pck);
327327

328-
msgpack_pack_map(mp_pck, 11);
328+
msgpack_pack_map(mp_pck, 12);
329329

330330
/* RecordNumber */
331331
msgpack_pack_str(mp_pck, 12);
@@ -348,6 +348,11 @@ void winlog_pack_event(msgpack_packer *mp_pck, PEVENTLOGRECORD evt,
348348
pack_nullstr(mp_pck);
349349
}
350350

351+
/* EventId */
352+
msgpack_pack_str(mp_pck, 7);
353+
msgpack_pack_str_body(mp_pck, "EventID", 7);
354+
msgpack_pack_uint32(mp_pck, evt->EventID);
355+
351356
/* EventType */
352357
msgpack_pack_str(mp_pck, 9);
353358
msgpack_pack_str_body(mp_pck, "EventType", 9);

0 commit comments

Comments
 (0)