Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Splunk Best Practices

You're reading from   Splunk Best Practices Operational intelligent made simpler

Arrow left icon
Product type Paperback
Published in Sep 2016
Publisher Packt
ISBN-13 9781785281396
Length 244 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Travis Marlette Travis Marlette
Author Profile Icon Travis Marlette
Travis Marlette
Arrow right icon
View More author details
Toc

General practices


Of course we can search whatever we want in Splunk, using it in a similar way to the way we use Google, for our log files, but there are some ways to make searching itself more efficient, and faster. There are a few things to understand when making your query practice more efficient, and I will use a few that are commonly overlooked.

This may be more editorial than technical, but it might be helpful here, to quickly describe the three components of a Splunk search before starting to explain core search. This seems to help a lot of people to understand searching as a concept:

  • Core search (what data will be included in the search?):

  • Function or calculation

  • Formatting or presentation

Let's see an example of them:

  1. Perform a Core search:

            Index=test index sourcetype=bookstuff action=purchase 
    
  2. Then add a function or calculation:

            Index=test index sourcetype=bookstuff action=purchase | 
            stats avg(latency) as Delay by host
    
  3. Then tell Splunk how to present...

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
Banner background image