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!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...