Splunk Search

how to extract multiple values into one field

utk123
Path Finder

I have windows logs in below format, and not able to extract single field for merged text value.
I want to create a field named "Merged_text" from listed logs.

Sample:
Hostname = 1.1.1.1
Date time = 31.07/18 00:00:00
Merged text = user [abcd]: signed in on: signon pass on terminal '1.1.1.1' at 00:00:00 using 'Application name'.

Splunk extraction is not working, as Merged text got multiple strings.

0 Karma
1 Solution

thambisetty
SplunkTrust
SplunkTrust

Hi,

Below rex will create new field Merged_text and it captures until . (Full stop) After Application name.

Your base search
    | rex "Merged\stext\=(?<Merged_text>[^\.]+)"
————————————
If this helps, give a like below.

View solution in original post

sumaitasiddiky1
New Member

Hi, I have a list of Tenants and the data is being pulled from Jira labels.

Some of the labels have not been spelled right . For example, one of the Tenants PLATFORM have been labelled as PLAFORM, PLATFROM, PLATFORMATFORM. Each of these labels have an event associated with it.

There are many Tenants like this. I want a query to merge these Values and events of Tenant field as ONE.

There are 99 more Tenants so I want a query that I can apply for other Tenant values normalisation as well.

At the moment the view is :

Tenant Count
PLAFORM 6
PLATFROM 8
PLATFORMATFROM 15

I want it like :

Tenant Count
PLATFORM 29

0 Karma

thambisetty
SplunkTrust
SplunkTrust

Hi,

Below rex will create new field Merged_text and it captures until . (Full stop) After Application name.

Your base search
    | rex "Merged\stext\=(?<Merged_text>[^\.]+)"
————————————
If this helps, give a like below.

niketn
Legend

@utk123 I am confused. Which is data in your question and what you need to extract? Also what have you tried that did not work?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...