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!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...