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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...