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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...