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!

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Get More Out of Your Security Practice With a SIEM

Get More Out of Your Security Practice With a SIEMWednesday, July 31, 2024  |  11AM PT / 2PM ETREGISTER ...