Getting Data In

Extracting wineventlog from Azure EventHub WindowsEventLogsTable

kajmaple
Loves-to-Learn Lots

Hey,

We are currently ingesting wineventlog from some of our Azure VMs via Eventhub. As such, their assigned sourcetype is the eventhub sourcetype, which means they are not subject to the wineventlog field extractions.

These logs do contain a "raw xml" data field, which is like xmlwineventlog, however, using things such as xmlkv, spath or xpath don't work as intended, and require additional work to extract the data correctly. Unfortunately due to this, we are unable to dump this extra SPL into a field extraction or calculated field.

Please find the SPL below:

 

index=azure sourcetype=mscs:azure:eventhub category="WindowsEventLogsTable"
| fields properties.RawXml
| spath input=properties.RawXml 
| eval test=mvzip('Event.EventData.Data{@Name}', 'Event.EventData.Data', "=")
| mvexpand test
| rex field=test max_match=0 "^(?<kv_key>[^=]+)=(?<kv_value>[^=]+)$"
| eval {kv_key}=kv_value

 

 

The end goal with this is to successfully extract the relevant windows event fields so that it can be datamodel mapped. It's not possible to install UFs onto these VMs, so unfortunately not the solution here. We'd ideally also want to avoid using "collect" to duplicate the data to a separate index/sourcetype.

Has anyone else encountered this and managed to come up with a solution? Thanks

Labels (2)
0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...