Splunk Search

Grouping multiple results from a search in to the same name

bb10
Engager

I'm trying to make a visualization showing our number of signatures, but the data is not very organized because I have 20+ results with variations of the name generic, like for example:

Generic.TC.ldrvmp1
Generic.TC.ligldq1
Generic.TC.ljhook1
Generic.TC.lmzdbq1
Generic.TC.lnionm1
Generic.TC.lniqpu1
Generic.TC.lxboaq1
Generic.TC.mpneia1
Generic.TC.mpngod


I want to group all these results under the name "generic", but it seems like if I try to use wild cards in the below search it gives me an error. I could do write out each signature individually in the |eval command but that seems very inefficient. I was wondering if it was possible for me to group the results in to the same name?

| eval signature=case(signature="Generic.*", "generic") 
|stats count by signature
| sort -count

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| eval signature=case(match(signature,"Generic.*"), "generic",1==1,signature)

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| eval signature=case(match(signature,"Generic.*"), "generic",1==1,signature)

bb10
Engager

Thank you this works

0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...