Monitoring Splunk

How to extract all the fields after a certain string in splunk

aaa2324
Explorer

In below eg I have some random text after the word type and I want to extract all the strings/ numbers that comes after type, can it be done using Rex ? Please suggest the command 

type abc xyz aabbbbc xxxxyyyy bbbbb uuuuuu 12345677

Labels (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @aaa2324,

if you want to extract all the text after "type", you have to use a regex like the following:

| rex "type\s+(?<your_field>.*)"

Ciao.

Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @aaa2324,

if you want to extract all the text after "type", you have to use a regex like the following:

| rex "type\s+(?<your_field>.*)"

Ciao.

Giuseppe

0 Karma

aaa2324
Explorer

Thanks a lot it works 👍

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @aaa2324,

Good for you, see next time!

Ciao and happy splunking.

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

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

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...