Splunk Search

captures users sum by url by date

sdagostino
Engager

I need to add something to the following search string (or rewrite it) that captures the following;

  1. User
  2. Destination URL
  3. Number of times the user accessed the Destination URL per day
  4. total number of hits to the Destination URL.

This search string

host="192.168.105.25" Prism http://DCSPRSAPPTS01.chpnet.org:80//Citrix/MetaFrame action="POST"| stats count by user, dest_url

Generates the following results

user     dest_url                                                               Count
phtwe    http://DCSPRSAPPTS01.chpnet.org:80//Citrix/MetaFrame/auth/login.aspx   99 
nkhan    http://DCSPRSAPPTS01.chpnet.org:80//Citrix/MetaFrame/auth/login.aspx   83 

gkanapathy
Splunk Employee
Splunk Employee

Do you just want the equivalent of:

 ... | bucket _time span=1d | stats count by _time,user,dest_url

Seems to me that's it. If you want the total for each URL, you can get it by adding:

 ... | eventstats sum(count) as total_count by _time,dest_url

or there is a trick you can do by creating a multivalued field:

... | eval user=user+";"+"*" | eval user=split(user,";") | bucket _time span=1d | stats count by _time,user,dest_url

which will put the total count as the * user. You can use any value besides * if it doesn't conflict with a real user name.

sideview
SplunkTrust
SplunkTrust

Note: I just improved the formatting of the question so its more readable now.

0 Karma

Lowell
Super Champion

Still not sure what your are really asking here, but perhaps the following question/answer would be helpful to you. You both seem to be looking at Citrix/MetaFrame POST events:

0 Karma

Simeon
Splunk Employee
Splunk Employee

I'm still confused. I think you should supply some sample events and clarify exactly what you need to do functionally.

0 Karma

Lowell
Super Champion

By "string", do you mean "search string"? Can you provide a sample event or two. I assume your are looking at some kind of http access log? Is this correct? (Please edit your question and provide some additional details.)

0 Karma

Simeon
Splunk Employee
Splunk Employee

Can you clarify what you want to get the sum of?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Splunk Developer Day announcements: AI agents, MCP tools, Forecasting, and Custom ...

Splunk Developer Day was packed with product and platform updates for developers building in the AI ...