Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Implementing Splunk (Update)
Implementing Splunk (Update)

Implementing Splunk (Update): A comprehensive guide to help you transform Big Data into valuable business insights with Splunk 6.2

Arrow left icon
Profile Icon VINCENT BUMGARNER Profile Icon James D. Miller
Arrow right icon
₱2241.89 ₱2490.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5 (4 Ratings)
eBook Jul 2015 506 pages 1st Edition
eBook
₱2241.89 ₱2490.99
Paperback
₱3112.99
Subscription
Free Trial
Arrow left icon
Profile Icon VINCENT BUMGARNER Profile Icon James D. Miller
Arrow right icon
₱2241.89 ₱2490.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5 (4 Ratings)
eBook Jul 2015 506 pages 1st Edition
eBook
₱2241.89 ₱2490.99
Paperback
₱3112.99
Subscription
Free Trial
eBook
₱2241.89 ₱2490.99
Paperback
₱3112.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Implementing Splunk (Update)

Chapter 2. Understanding Search

To successfully use Splunk, it is vital that you write effective searches. Using the index efficiently will make your initial discoveries faster, and the reports you create will run faster for you and for others. In this chapter, we will cover the following topics:

  • How to write effective searches
  • How to search using fields
  • Understanding time
  • Saving and sharing searches

Using search terms effectively

The key to creating an effective search is to take advantage of the index. The Splunk index is effectively a huge word index, sliced by time. The single most important factor for the performance of your searches is how many events are pulled from the disk. The following few key points should be committed to memory:

  • Search terms are case insensitive: Searches for error, Error, ERROR, and ErRoR are all the same thing.
  • Search terms are additive: Given the search item, mary error, only events that contain both words will be found. There are Boolean and grouping operators to change this behavior; we will discuss in this chapter under Boolean and grouping operators.
  • Only the time frame specified is queried: This may seem obvious, but it's very different from a database, which would always have a single index across all events in a table. Since each index is sliced into new buckets over time, only the buckets that contain events for the time frame in question...

Boolean and grouping operators

There are a few operators that you can use to refine your searches (note that these operators must be in uppercase to not be considered search terms):

  • AND is implied between terms. For instance, error mary (two words separated by a space) is the same as error AND mary.
  • OR allows you to specify multiple values. For instance, error OR mary means find any event that contains either word.
  • NOT applies to the next term or group. For example, error NOT mary would find events that contain error but do not contain mary.
  • The quote marks ("") identify a phrase. For example, "Out of this world" will find this exact sequence of words. Out of this world would find any event that contains all of these words, but not necessarily in that order.
  • Parentheses ( ( ) ) is used for grouping terms. Parentheses can help avoid confusion in logic. For instance, these two statements are equivalent:
    • bob error OR warn NOT debug
    • bob AND (error OR warn)) AND NOT debug
  • The equal...

Clicking to modify your search

Though you can probably figure it out by just clicking around, it is worth discussing the behavior of the GUI when moving your mouse around and clicking.

  • Clicking on any word or field value will give you the option to Add to search or Exclude from search (the existing search) or (create a) New search:
    Clicking to modify your search
  • Clicking on a word or a field value that is already in the query will give you the option to remove it (from the existing query) or, as above, (create a) new (search):
    Clicking to modify your search

Event segmentation

In previous versions of Splunk, event segmentation was configurable through a setting in the Options dialog. In version 6.2, the options dialog is not present – although segmentation (discussed later in this chapter under field widgets section) is still an important concept, it is not accessible through the web interface/options dialog in this version.

Field widgets

Clicking on values in the Select Fields dialog (the field picker), or in the field value widgets underneath an...

Using fields to search

When we explored the GUI in Chapter 1, The Splunk Interface, you probably noticed fields everywhere. Fields appear in the field picker on the left and under every event. Where fields actually come from is transparent to the user, who simply searches for key=value. We will discuss adding new fields in Chapter 3, Tables, Charts, and Fields, and in Chapter 11, Configuring Splunk.

Using the field picker

The field picker gives us easy access to the fields (currently defined) for the results of our query. Splunk will extract some fields from event data without your help, such as host, source, and sourcetype values, timestamps, and others. Additional fields to be extracted can be defined by you. Clicking on any field presents us with the details about that field in our current search results:

Using the field picker

As we go through the following items in this widget, we see a wealth of information right away:

  • N Value, X% of events is a good indication of whether we are getting the results we think...

Using wildcards efficiently

Though the index is based on words, it is possible to use wildcards when needed, albeit a little carefully. Take a look at some interesting facts about wildcards:

  • Only trailing wildcards are efficient: Stated simply, bob* will find events containing Bobby efficiently, but *by or *ob* will not. The latter cases will scan all events in the time frame specified.
  • Wildcards are tested last: Wildcards are tested after all other terms. Given the search: authclass *ob* hello world, all other terms besides *ob* will be searched first. The more you can limit the results using full words and fields, the better your search will perform.

Supplementing wildcards in fields

Given the following events, a search for world would return both events:

2012-02-07T01:04:31.102-0600 INFO AuthClass Hello world. [user=Bobby, ip=1.2.3.3]
2012-02-07T01:23:34.204-0600 INFO BarClass Goodbye. [user=Bobby, ip=1.2.3.3, message="Out of this world"]

What if you only wanted the second event...

Using search terms effectively


The key to creating an effective search is to take advantage of the index. The Splunk index is effectively a huge word index, sliced by time. The single most important factor for the performance of your searches is how many events are pulled from the disk. The following few key points should be committed to memory:

  • Search terms are case insensitive: Searches for error, Error, ERROR, and ErRoR are all the same thing.

  • Search terms are additive: Given the search item, mary error, only events that contain both words will be found. There are Boolean and grouping operators to change this behavior; we will discuss in this chapter under Boolean and grouping operators.

  • Only the time frame specified is queried: This may seem obvious, but it's very different from a database, which would always have a single index across all events in a table. Since each index is sliced into new buckets over time, only the buckets that contain events for the time frame in question need to...

Boolean and grouping operators


There are a few operators that you can use to refine your searches (note that these operators must be in uppercase to not be considered search terms):

  • AND is implied between terms. For instance, error mary (two words separated by a space) is the same as error AND mary.

  • OR allows you to specify multiple values. For instance, error OR mary means find any event that contains either word.

  • NOT applies to the next term or group. For example, error NOT mary would find events that contain error but do not contain mary.

  • The quote marks ("") identify a phrase. For example, "Out of this world" will find this exact sequence of words. Out of this world would find any event that contains all of these words, but not necessarily in that order.

  • Parentheses ( ( ) ) is used for grouping terms. Parentheses can help avoid confusion in logic. For instance, these two statements are equivalent:

    • bob error OR warn NOT debug

    • bob AND (error OR warn)) AND NOT debug

  • The equal sign (=) is reserved...

Clicking to modify your search


Though you can probably figure it out by just clicking around, it is worth discussing the behavior of the GUI when moving your mouse around and clicking.

  • Clicking on any word or field value will give you the option to Add to search or Exclude from search (the existing search) or (create a) New search:

  • Clicking on a word or a field value that is already in the query will give you the option to remove it (from the existing query) or, as above, (create a) new (search):

Event segmentation

In previous versions of Splunk, event segmentation was configurable through a setting in the Options dialog. In version 6.2, the options dialog is not present – although segmentation (discussed later in this chapter under field widgets section) is still an important concept, it is not accessible through the web interface/options dialog in this version.

Field widgets

Clicking on values in the Select Fields dialog (the field picker), or in the field value widgets underneath an event,...

Using fields to search


When we explored the GUI in Chapter 1, The Splunk Interface, you probably noticed fields everywhere. Fields appear in the field picker on the left and under every event. Where fields actually come from is transparent to the user, who simply searches for key=value. We will discuss adding new fields in Chapter 3, Tables, Charts, and Fields, and in Chapter 11, Configuring Splunk.

Using the field picker

The field picker gives us easy access to the fields (currently defined) for the results of our query. Splunk will extract some fields from event data without your help, such as host, source, and sourcetype values, timestamps, and others. Additional fields to be extracted can be defined by you. Clicking on any field presents us with the details about that field in our current search results:

As we go through the following items in this widget, we see a wealth of information right away:

  • N Value, X% of events is a good indication of whether we are getting the results we think...

Using wildcards efficiently


Though the index is based on words, it is possible to use wildcards when needed, albeit a little carefully. Take a look at some interesting facts about wildcards:

  • Only trailing wildcards are efficient: Stated simply, bob* will find events containing Bobby efficiently, but *by or *ob* will not. The latter cases will scan all events in the time frame specified.

  • Wildcards are tested last: Wildcards are tested after all other terms. Given the search: authclass *ob* hello world, all other terms besides *ob* will be searched first. The more you can limit the results using full words and fields, the better your search will perform.

Supplementing wildcards in fields

Given the following events, a search for world would return both events:

2012-02-07T01:04:31.102-0600 INFO AuthClass Hello world. [user=Bobby, ip=1.2.3.3]
2012-02-07T01:23:34.204-0600 INFO BarClass Goodbye. [user=Bobby, ip=1.2.3.3, message="Out of this world"]

What if you only wanted the second event, but all you...

All about time


Time is an important and confusing topic in Splunk. If you want to skip this section, absorb one concept—time must be parsed properly on the way into the index as it cannot be changed later without indexing the raw data again.

How Splunk parses time

If given the date 11-03-04, how would you interpret this date? Your answer probably depends on where you live. In the United States, you would probably read this as November 3, 2004. In Europe, you would probably read this as March 11, 2004. It would also be reasonable to read this as March 4, 2011.

Luckily, most dates are not this ambiguous, and Splunk makes a good effort to find and extract them, but it is absolutely worth the trouble to give Splunk a little help by configuring the time format. We'll discuss the relevant configurations in Chapter 11, Configuring Splunk.

How Splunk stores time

Once the date is parsed, the date stored in Splunk is always stored as GMT epoch. Epoch time is the number of seconds since January 1, 1970...

Making searches faster


We have talked about using the index to make searches faster. When starting a new investigation, the following few steps will help you get results faster:

  1. Set the time to the minimum time that you believe will be required to locate relevant events. For a chatty log, this may be as little as a minute. If you don't know when the events occurred, you might search a larger time frame and then zoom in by clicking on the timeline while the search is running.

  2. Specify the index if you have multiple indexes. It's good to get into the habit of starting your queries with the index name. For example, index=myapplicationindex error bob.

  3. Specify other fields that are relevant. The most common fields to specify are sourcetype and host. For example, index=myapplicationindex sourcetype="impl_splunk_gen" error bob. If you find yourself specifying the field source on a regular basis, you could probably benefit from defining more source types. Avoid using the sourcetype field to capture...

Left arrow icon Right arrow icon

Description

If you are a data analyst with basic knowledge of Big Data analysis but no knowledge of Splunk, then this book will help you get started with Splunk. The book assumes that you have access to a copy of Splunk, ideally not in production, and many examples also assume you have administrator rights.

Who is this book for?

If you are a data analyst with basic knowledge of Big Data analysis but no knowledge of Splunk, then this book will help you get started with Splunk. The book assumes that you have access to a copy of Splunk, ideally not in production, and many examples also assume you have administrator rights.

What you will learn

  • Enrich your data with lookups and commands
  • Transform your data into useful and beautiful reports
  • Build professionallooking, informative dashboards
  • Get to know what Splunk data models and pivots are
  • Learn about pivot editor, pivot elements, filters, Sparklines, and more
  • Manage configurations from one to thousands of instances
  • Extend Splunk with scripts and advanced configuration
  • Create fields from your unstructured data
  • Write searches that are fast and lean

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 28, 2015
Length: 506 pages
Edition : 1st
Language : English
ISBN-13 : 9781784399306
Vendor :
Splunk
Category :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jul 28, 2015
Length: 506 pages
Edition : 1st
Language : English
ISBN-13 : 9781784399306
Vendor :
Splunk
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱260 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱260 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 8,726.97
Implementing Splunk (Update)
₱3112.99
Mastering Splunk
₱2806.99
Advanced Splunk
₱2806.99
Total 8,726.97 Stars icon

Table of Contents

14 Chapters
1. The Splunk Interface Chevron down icon Chevron up icon
2. Understanding Search Chevron down icon Chevron up icon
3. Tables, Charts, and Fields Chevron down icon Chevron up icon
4. Data Models and Pivots Chevron down icon Chevron up icon
5. Simple XML Dashboards Chevron down icon Chevron up icon
6. Advanced Search Examples Chevron down icon Chevron up icon
7. Extending Search Chevron down icon Chevron up icon
8. Working with Apps Chevron down icon Chevron up icon
9. Building Advanced Dashboards Chevron down icon Chevron up icon
10. Summary Indexes and CSV Files Chevron down icon Chevron up icon
11. Configuring Splunk Chevron down icon Chevron up icon
12. Advanced Deployments Chevron down icon Chevron up icon
13. Extending Splunk Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(4 Ratings)
5 star 50%
4 star 50%
3 star 0%
2 star 0%
1 star 0%
Ed P Aug 20, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This massive volume (clocking in at over 450 pages!) is easily one of the better IT books I've read in the past few years. Although its called Implementing Splunk it DOES NOT cover installing the software. Check the documentation for that. What it does cover is getting started with using the software, and working towards more in-depth scenarios and configurations so you can handle a wider variety of data, with better dashboards and visualizations. I think one of the best parts of this book is the number of screenshots with clearly marked emphasis on the areas that the author is referring to in the text. That in itself makes following the text much easier, since you aren't hunting around trying to find the setting, menu or piece of information, but you can immediately see it. Need touch!
Amazon Verified review Amazon
Ishaan Shekhar Aug 10, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very nice book! Much better than the first edition. Good for beginners and medium-pros.
Amazon Verified review Amazon
Gary Jun 10, 2017
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Good starter book
Amazon Verified review Amazon
SM Lawson Aug 19, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
First and foremost let me say I enjoyed the first book and was very excited to purchase this book on theexpectations that this would surpass it. I was not disappointed the book delves into the extensive concepts ofBig Data and intelligence gathering concepts used in the real world, that said I have one extensive criticism and thatwould be the instructions given on setting up the tutorial data. The Event generator is not really windows friendly and instructionsare not quite clear on setting it up... the instructions given do not work within windows as given and I suppose were only tested in a Linuxenvironment. It would help immensely if the Writers could address this issue with a solution for windows installs concerning the event generator propagated by Splunk making sure step by step instructions are given to make the data work with Splunk. Much easier to work with examples in book.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.

Modal Close icon
Modal Close icon