On a regular basis, I need to find out which are the top IP addresses with most requests. This query tells me just that. It helps me identify the top 10 IP addresses with most requests, broken by timeslice, regardless if those IP addresses are different from timeslice to timeslice. You can use this query as a template and replace IP address by any other field you are looking to identify, like error codes, urls, etc.
| timeslice 5m
| count by src_ip,_timeslice
| sort _timeslice desc,_count desc
| 1 as rownum
| accum rownum by _timeslice
| where _accum<=10
| fields _timeslice, _count, src_ip
| transpose row _timeslice column src_ip
Please sign in to leave a comment.