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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...