Event Log <EventData> Tag
Posted: Thu Dec 17, 2015 11:08 am
We are using the standard config:
However, we have a need to capture information in the <EventData> tags of the event logs. For example, here is the XML from Event Logs:
Code: Select all
# Windows Event Log
<Input eventlog>
# Uncomment im_msvistalog for Windows Vista/2008 and later
Module im_msvistalog
# Uncomment im_mseventlog for Windows XP/2000/2003
# Module im_mseventlog
</Input>
<Output out>
Module om_tcp
Host agc3-nagtest01.agc01.com
Port 3515
Exec $tmpmessage = $Message; delete($Message); rename_field("tmpmessage","message");
Exec $raw_event = to_json();
# Uncomment for debug output
# Exec file_write('%ROOT%\data\nxlog_output.log', $raw_event + "\n");
</Output>And what we get in Nagios is the following:- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="[Redacted]" />
<EventID Qualifiers="0">3000</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2015-12-17T16:03:21.000000000Z" />
<EventRecordID>76342606</EventRecordID>
<Channel>[Redacted]</Channel>
<Computer>[Redacted]</Computer>
<Security />
</System>
- <EventData>
<Data>Message Processor has stopped. No messages in queue</Data>
</EventData>
</Event>
Is it possible to get these tags captured as well?@timestamp 2015-12-17T16:03:22.257Z
@version 1
Channel [Redacted]
EventID 3000
EventReceivedTime 2015-12-17 11:03:22
EventTime 2015-12-17 11:03:21
EventType INFO
Hostname [Redacted]
Keywords 36028797018963970
Opcode Info
ProcessID 0
RecordNumber 76342606
Severity INFO
SeverityValue 2
SourceModuleName eventlog
SourceModuleType im_msvistalog
SourceName [Redacted]
Task 0
ThreadID 0
_id AVGwrnk4A2CkGv1VCYQ2
_index logstash-2015.12.17
_type eventlog
host 10.2.10.148
type eventlog