Splunk Search

Field Extraction from Raw Data

Dandanos
Engager

Hello,

Im new to splunk and just started learning it and im having little issues extracting some fields from a raw data

ex: of Ram Data
04/12 15:50:38 [LOGON] [1860] Domain: SamLogon: Network logon of Domain\test1$ from machine1 Returns 0xC0000064

I would like to extract the following

SamLogon : Network logon of Domain\test1$ from machine1
Returns : 0xC0000064

im trying to use the regex in props.conf in SH

Any help would be appreciated . Thanks

0 Karma

to4kawa
Ultra Champion

I'm trying to use the regex in props.conf in SH

in SH?
see: https://answers.splunk.com/answers/6820/search-head-props-conf.html

You're probably using it as a standalone,
props.conf

EXTRACT-fields = SamLogon: (?<Samlogon>.*) Returns (?<Returns>\S+)
0 Karma

codebuilder
Influencer

Run your search as you have it, pipe your results to erex (may favorite hidden gem in Splunk).

The first "SamLogon" value is what you name the field, it's arbitrary. The second is the value that Splunk searches for.
Run the search, the examine the Job Inpspector, it will provide the regex that Splunk used to find the value.
You can fine tune it from there, but it is a fantastic starting point...

| erex SamLogon examples="SamLogon"

Documentation: https://docs.splunk.com/Documentation/Splunk/8.0.3/SearchReference/Erex#Examples

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Can you share what you've tried in props.conf?
How fixed is the data you're parsing? Are there any pieces of text a regular expression can key on?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...