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!

More Control Over Your Monitoring Costs with Archived Metrics!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...