Splunk Search

Specific Page Views by Day

slierninja
Communicator

How can I see a specific page's view count by day? For any given day, it will show the count of the number of views.

I've tried this: index="myIndex" host=myHost cs_uri_stem=myPageUri | timechart per_day(count)

How do I see the number of page views for a given page day-by-day?

This will give me the count for each time logged, not by day.
index="myIndex" host=myHost cs_uri_stem=myPageUri | stats count by _time

Expected Output

+-----------+------------+
|   Day     | Page Views | 
+-----------+------------+
| 10/28/12  |      0     |
| 10/29/12  |     10     |
| 10/30/12  |     30     |
| 10/31/12  |     40     |
+-----------+------------+
0 Karma
1 Solution

sdaniels
Splunk Employee
Splunk Employee

You could use a default date field and change it to 'stats count by date_mday'. (or date_wday which is week days versus month).

http://docs.splunk.com/Documentation/Splunk/5.0/Knowledge/Usedefaultfields

The bucket command also gives you flexibility to manipulate blocks of data based on time.

http://docs.splunk.com/Documentation/Splunk/5.0/SearchReference/bucket

View solution in original post

sdaniels
Splunk Employee
Splunk Employee

You could use a default date field and change it to 'stats count by date_mday'. (or date_wday which is week days versus month).

http://docs.splunk.com/Documentation/Splunk/5.0/Knowledge/Usedefaultfields

The bucket command also gives you flexibility to manipulate blocks of data based on time.

http://docs.splunk.com/Documentation/Splunk/5.0/SearchReference/bucket

slierninja
Communicator

bucket is exactly what I was looking for. This worked for me: index="myIndex" host=myHost cs_uri_stem=myPageUri | bucket _time span=1d | timechart count

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...