Getting Data In

How to extract changing headers from multiline event?

dominikatvastli
Explorer

Hi all,

I am sending a multiline event to Splunk Enterprise. The first row contains metadata, the second row the field names, the third row the actual values. It looks like this:

***SPLUNK*** host=hostname index=testindex source=testsource sourcetype=testsourcetype
Timestamp,"Arbitrary field name"
1550850412192,89

The field name is arbitrary, which means it is variable. At the first event, it could be "Field name 1" and at the second "Field name 2".

Currently, Splunk shows me two events.
1. Timestamp,"Arbitrary field name"
2. 1550850412192,89

What I want is that it creates a field from the "Arbitrary field name" and assigns value 89.

My props.conf looks like this at the moment:

INDEXED_EXTRACTIONS = csv
FIELD_DELIMITER = ,
HEADER_FIELD_LINE_NUMBER = 2

lakshman239
Influencer

Not sure if splunk can natively do that, as it needs to know the field name. In your scenario, how many arbitrary field names would you have? You could try to provide them as a CSV in FIELD_NAMES and see how it works.

https://docs.splunk.com/Documentation/Splunk/7.2.4/Data/Extractfieldsfromfileswithstructureddata#For...

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...