Splunk Search

How to access values from event in Splunk

gauravepi
Path Finder

I want to access the values of the events that are coming after splunk search .

Data is coming in below format on the event

18/06/28 14:12:07 250  219561  711914   72864    0  784778 - 18-06-28 14:08:43

I want to access certain values from this list like i want to access : 18/06/28 14:12:07 , 784778 and 18-06-28 14:08:43

Please suggest how we can do this in splunk ?

Tags (1)
0 Karma

woodcock
Esteemed Legend

I use Regex101.com for this: https://regex101.com/r/7bVxvt/1

This RegEx does the trick. Just set it up as a Field Extraction:

^(?<datetime1>\d+\/\d+\/\d+\s+\d+:\d+:\d+)\s+(?<field1>\d+)\s+(?<field2>\d+)\s+(?<field3>\d+)\s+(?<field4>\d+)\s+(?<field5>\d+)\s+(?<field6>\d+)\s+(?<field7>\S+)\s+(?<datetime2>\d+-\d+-\d+\s+\d+:\d+:\d+)
0 Karma

kmorris_splunk
Splunk Employee
Splunk Employee

It sounds like you want to extract fields from your data. This is assuming you are already ingesting it into Splunk. Depending on the type of data, you should always check splunkbase.com first to see if there is an app or add-on for that data source. The add-ons will have the field extractions done for these sources. If it is something custom or there isn't an add-on available, you can extract fields through the GUI see docs here.

0 Karma
Get Updates on the Splunk Community!

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

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...