Splunk Search

Field Extraction on XML file, which stanza in props.conf is responsible for field extraction?

dkeck
Influencer

Hello,

I have a props.conf for a xml file. I just copied the props.conf which was automatically created in the "Add Data" process.

So I am not really familiar with the commands within the props.conf. It looks like this:

[ownsourcetype]
BREAK_ONLY_BEFORE = <Interceptor>
KV_MODE = xml
NO_BINARY_CHECK = true
TIME_FORMAT = %Y-%m-%d
TIME_PREFIX = <ActionDate>
category = Custom
disabled = false
pulldown_type = true

It's creating fields like this: Interceptor.ActionDate, Interceptor.LaunchCoords

Events look like this :

< Interceptor >
< fieldname > value< /fieldname >
< /Interceptor >

So which command in the props.conf is responsible for the field extraction? How do I change it so that the fields will look like this: ActionDate, LaunchCoords etc?

Thank you

0 Karma

somesoni2
Revered Legend

The line KV_MODE = xmlis doing the search time field extractions here. With XML files this is the name of fields that weill get created. Once option you can try is to setup field alias to rename Interceptor.FieldName to FieldName. See more infromation here
http://docs.splunk.com/Documentation/Splunk/6.2.2/Knowledge/Addaliasestofields

You need to add something like this to your props.conf

FIELDALIAS-extract = Interceptor.* AS *
0 Karma

dkeck
Influencer

Hello,

thank you. Its not quite working for me....I added the props.conf. But its not working with " FIELDALIAS-extract = Interceptor.* AS * ", its working with FIELDALIAS-extract = Interceptor.ActionDate AS ActionDate.

But thats creating a new problem, now I have both fields, ActionDate and Interceptor.ActionDate.

Is there a FIELDALIAS- that just renames the fields, instead of extracting?

Thank you

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 ...