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!

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

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...