Splunk Search

Grouping of value

kelz
Explorer

Hello guys,

I need help building the query for this value to group it like the output I have given below.

Current:
apple1
apple-orange
apple-yellow
banna123
banna-red
banna-orange

Output:

apple*
banna*

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| makeresults
| eval _raw="apple1
apple-orange
apple-yellow
banna123
banna-red
banna-orange"
| multikv noheader=t
| table Column_1
| rename Column_1 as _raw


| rex "(?<fruit>[a-zA-Z]+)"

The rex puts the fruit into a field which you can then group by as you need

View solution in original post

kelz
Explorer

Thank you @ITWhisperer 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| makeresults
| eval _raw="apple1
apple-orange
apple-yellow
banna123
banna-red
banna-orange"
| multikv noheader=t
| table Column_1
| rename Column_1 as _raw


| rex "(?<fruit>[a-zA-Z]+)"

The rex puts the fruit into a field which you can then group by as you need

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...