Splunk Search

About spliting events

hasehiro
New Member

For example, the following logs are available.

2018-05-17 10:00:00.000

columnA columnB columnC
1111111 2222222 3333333
aaaaaaa bbbbbbb ccccccc

I want to index this log as two events as follows.

_time                    columnA, columnB, columnC
2018-05-17 10:00:00.000, 1111111, 2222222, 3333333
2018-05-17 10:00:00.000, aaaaaaa, bbbbbbb, ccccccc

However, I can not come up with a good idea to realize this.
Is there anyone who has tried similar things?

Tags (1)
0 Karma

jkat54
SplunkTrust
SplunkTrust

props.conf

[yourSourceType]
SHOULD_LINEMERGE = 0
LINE_BREAKER = ([\n|\r]+)
TIME_FORMAT = %Y-%m-%d %H:%M:%S.%3
TIME_PREFIX = ^
MAX_TIMESTAMP_LOOKAHEAD=32
EXTRACT-fields=(?<colA>[\w|\d]+)\s(?<colb>[\w|\d]+)\s(?<colc>[\w|\d]+)

Save the props on the first heavy forwarder, or indexer that will receive the data. Also put the props on your search head. In a stand-alone environment, put the props on the single splunk instance.

Now restart splunk and reload your data.

Finally load the data and try this search

| reverse
| filldown _time
| table _time cola colb colc

Adding | search NOT columna should remove the column names from the results

0 Karma

harishalipaka
Motivator

try once--

|transpose
Thanks
Harish
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...