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!

Accelerate Service Onboarding, Decomposition, Troubleshooting - and more with ITSI’s ...

Accelerate Service Onboarding, Decomposition, Troubleshooting - and more! Faster Time to ValueManaging and ...

New Release | Splunk Enterprise 9.3

Admins and Analyst can benefit from:  Seamlessly route data to your local file system to save on storage ...

2024 Splunk Career Impact Survey | Earn a $20 gift card for participating!

Hear ye, hear ye! The time has come again for Splunk's annual Career Impact Survey!  We need your help by ...