Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Splunk 7 Essentials, Third Edition

You're reading from   Splunk 7 Essentials, Third Edition Demystify machine data by leveraging datasets, building reports, and sharing powerful insights

Arrow left icon
Product type Paperback
Published in Mar 2018
Publisher Packt
ISBN-13 9781788839112
Length 220 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
Erickson Delgado Erickson Delgado
Author Profile Icon Erickson Delgado
Erickson Delgado
Steven Koelpin Steven Koelpin
Author Profile Icon Steven Koelpin
Steven Koelpin
J-P Contreras J-P Contreras
Author Profile Icon J-P Contreras
J-P Contreras
Betsy Page Sigman Betsy Page Sigman
Author Profile Icon Betsy Page Sigman
Betsy Page Sigman
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Splunk – Getting Started 2. Bringing in Data FREE CHAPTER 3. Search Processing Language 4. Reporting, Alerts, and Search Optimization 5. Dynamic Dashboarding 6. Data Models and Pivot 7. HTTP Event Collector 8. Best Practices and Advanced Queries 9. Taking Splunk to the Organization

Search command – top/rare

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

SPL> index=main | top http_uri

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 SPL 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...

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 $19.99/month. Cancel anytime