Skip to main content
Sumo Logic

1.6 Identify the Top Ten URLs

Problem

You want to know what pages on your site are the most popular, but the HTTP log is chronological.

Solution

Use the top operator with the count operator:

_sourceCategory=apache 
| parse "GET * " as url 
| count by url

| top 10 url by count

Discussion

You could sort the log by URL and look for the largest number of duplicate lines, but that is'nt necessary. In this example, the count operator aggregates the extracted URLs, and then the top operator presents the ten highest-count URLs.