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 7, Third Edition
Implementing Splunk 7, Third Edition

Implementing Splunk 7, Third Edition: Effective operational intelligence to transform machine-generated data into valuable business insight , Third Edition

eBook
₹799 ₹3276.99
Paperback
₹4096.99
Subscription
Free Trial
Renews at ₹800p/m

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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

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

Implementing Splunk 7, Third Edition

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
  • Event annotation

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. One of the most important factors 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.
  • 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 these later.
  • 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...

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 so as not to 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 will find any event that contains all of these words, but not necessarily in that order.
  • Parentheses ( ( ) ) are used for grouping terms. Parentheses can help avoid confusion...

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, as shown in the following screenshot:
  • 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 previously, create a new search, as shown in the following screenshot:

Event segmentation

In prior versions of Splunk, event segmentation was configurable through a setting in the Options dialog...

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

Using wildcards efficiently

Though the index is based on words, it is possible to use wildcards when necessary, 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,...

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

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

Making searches faster

We have talked about using the index to make searches faster. When starting a new investigation, following a 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...

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. One of the most important factors 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.
  • 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 these later.
  • 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 be queried.
  • Search terms are words, including parts...

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 so as not to 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 will find any event that contains all of these words, but not necessarily in that order.
  • Parentheses ( ( ) ) are 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...

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, as shown in the following screenshot:
  • 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 previously, create a new search, as shown in the following screenshot:

Event segmentation

In prior 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) 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...

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 necessary, 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...

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

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 a GMT epoch. Epoch time is the number of seconds since January 1, 1970...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Enrich machine-generated data and transform it into useful, meaningful insights
  • Perform search operations and configurations, build dashboards, and manage logs
  • Extend Splunk services with scripts and advanced configurations to process optimal results

Description

Splunk is the leading platform that fosters an efficient methodology and delivers ways to search, monitor, and analyze growing amounts of big data. This book will allow you to implement new services and utilize them to quickly and efficiently process machine-generated big data. We introduce you to all the new features, improvements, and offerings of Splunk 7. We cover the new modules of Splunk: Splunk Cloud and the Machine Learning Toolkit to ease data usage. Furthermore, you will learn to use search terms effectively with Boolean and grouping operators. You will learn not only how to modify your search to make your searches fast but also how to use wildcards efficiently. Later you will learn how to use stats to aggregate values, a chart to turn data, and a time chart to show values over time; you'll also work with fields and chart enhancements and learn how to create a data model with faster data model acceleration. Once this is done, you will learn about XML Dashboards, working with apps, building advanced dashboards, configuring and extending Splunk, advanced deployments, and more. Finally, we teach you how to use the Machine Learning Toolkit and best practices and tips to help you implement Splunk services effectively and efficiently. By the end of this book, you will have learned about the Splunk software as a whole and implemented Splunk services in your tasks at projects

Who is this book for?

This book is intended for data analysts, business analysts, and IT administrators who want to make the best use of big data, operational intelligence, log management, and monitoring within their organization. Some knowledge of Splunk services will help you get the most out of the book

What you will learn

  • Focus on the new features of the latest version of Splunk Enterprise 7
  • Master the new offerings in Splunk: Splunk Cloud and the Machine Learning Toolkit
  • Create efficient and effective searches within the organization
  • Master the use of Splunk tables, charts, and graph enhancements
  • Use Splunk data models and pivots with faster data model acceleration
  • Master all aspects of Splunk XML dashboards with hands-on
  • applications
  • Create and deploy advanced Splunk dashboards to share valuable business insights with peers

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 29, 2018
Length: 576 pages
Edition : 3rd
Language : English
ISBN-13 : 9781788830508
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
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Mar 29, 2018
Length: 576 pages
Edition : 3rd
Language : English
ISBN-13 : 9781788830508
Vendor :
Splunk
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
₹800 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
₹4500 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 ₹400 each
Feature tick icon Exclusive print discounts
₹5000 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 ₹400 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 11,916.97
Implementing Splunk 7, Third Edition
₹4096.99
Splunk Operational Intelligence Cookbook
₹4542.99
Splunk 7 Essentials, Third Edition
₹3276.99
Total 11,916.97 Stars icon
Banner background image

Table of Contents

14 Chapters
The Splunk Interface Chevron down icon Chevron up icon
Understanding Search Chevron down icon Chevron up icon
Tables, Charts, and Fields Chevron down icon Chevron up icon
Data Models and Pivots Chevron down icon Chevron up icon
Simple XML Dashboards Chevron down icon Chevron up icon
Advanced Search Examples Chevron down icon Chevron up icon
Extending Search Chevron down icon Chevron up icon
Working with Apps Chevron down icon Chevron up icon
Building Advanced Dashboards Chevron down icon Chevron up icon
Summary Indexes and CSV Files Chevron down icon Chevron up icon
Configuring Splunk Chevron down icon Chevron up icon
Advanced Deployments Chevron down icon Chevron up icon
Extending Splunk Chevron down icon Chevron up icon
Machine Learning Toolkit Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(4 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Pooja Autade Jun 26, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very helpful
Amazon Verified review Amazon
Brandy Jul 25, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book will give you all of what you need as an engineer
Amazon Verified review Amazon
M. Eagles Jul 22, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Book does a good job of covering most Splunk topics.I recommend this book to anyone just getting started with Splunk.
Amazon Verified review Amazon
Gregory CHRISTINE Jun 25, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
hate de faire le tour
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.