Splunk Search

Grouping data based off a single field

1tiger105
Engager

I have all the relevant data I need from a single source but I am wanting to present it in a way that I can't get it to work. I want to show what departments/user/and the count that are using specific URLs and put them on a single line with the corresponding URL.

Team1                User1                 URL1                    Count
Team2                User4
Team3                User9
------------------------------------------------------------------------
Team1                User3                 URL2                    Count
Team4                User4
                              User12
                              User16
                              User17
------------------------------------------------------------------------
Team3                User1                 URL3                    Count
Team6                User3
Team10              User12
------------------------------------------------------------------------
Let me know if I need to clarify anything

Labels (4)
0 Karma
1 Solution

yuanliu
SplunkTrust
SplunkTrust

How do you envision Team and User aligned if they are both arrays?  Your illustrated results suggests that you don't care about this part.  If so, would this do?

| stats count values(Team) as Team values(User) as User by URL

View solution in original post

Tags (1)
0 Karma

1tiger105
Engager

Didn't think that far ahead but Ill be making a dashboard for this so I think it would be easier if I separated them instead of trying to put it all in one search. What you just did works perfectly so thank you so much for that! 

0 Karma

yuanliu
SplunkTrust
SplunkTrust

How do you envision Team and User aligned if they are both arrays?  Your illustrated results suggests that you don't care about this part.  If so, would this do?

| stats count values(Team) as Team values(User) as User by URL
Tags (1)
0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...