Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Splunk Essentials - Second Edition

You're reading from  Splunk Essentials - Second Edition

Product type Book
Published in Sep 2016
Publisher
ISBN-13 9781785889462
Pages 236 pages
Edition 2nd Edition
Languages
Authors (3):
Betsy Page Sigman Betsy Page Sigman
Profile icon Betsy Page Sigman
Somesh Soni Somesh Soni
Profile icon Somesh Soni
Erickson Delgado Erickson Delgado
Profile icon Erickson Delgado
View More author details

Table of Contents (15) Chapters

Splunk Essentials Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Splunk in Action Bringing in Data Search Processing Language Data Models and Pivot Data Optimization, Reports, Alerts, and Accelerating Searches Panes of Glass Splunk SDK for JavaScript and D3.js HTTP Event Collector Best Practices and Advanced Queries

Search command - top/rare


A quick way to get a summarized table based on fields is by using the top and rare commands. Run this search command:

SPL> index=main | top url

Notice that the result automatically grouped the URLs by count, calculated the percentage of each row against the whole data set, and sorted them by count in descending order. You can see a sample result in the following screenshot:

You may further tweak this search command by adding command options such as limit and showperc. Say, for example, you only want to see the top five URLs but you do not want to see the percent column. This is the command to achieve that:

SPL> index=main | top url limit=5 showperc=false

Now try the same commands, but use rare instead of top. The term rare will find those events that are the most unlikely ones. This can be a useful qualifier to use for determining outliers or unusual cases that may be due to data entry errors.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}