Searching for the top 10 accessed web pages

We can modify the search from this recipe and replace the stats command with the top command. By default, this will display the top 10 web pages:

sourcetype=access_combined index=main | top uri_path 

Here, we modified the search and replaced the stats command with the top command. By default, this will display the top ten web pages. If we wanted to get the top 20 web pages, we can specify a limit value as follows:

sourcetype=access_combined index=main | top limit=20 uri_path 

Get Splunk Operational Intelligence Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.