Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Splunk Operational Intelligence Cookbook
Splunk Operational Intelligence Cookbook

Splunk Operational Intelligence Cookbook: Over 80 recipes for transforming your data into business-critical insights using Splunk , Third Edition

Arrow left icon
Profile Icon Raheja Profile Icon Derek Mock Profile Icon Josh Diakun Profile Icon Paul R. Johnson
Arrow right icon
£24.99 £36.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7 (3 Ratings)
eBook May 2018 541 pages 3rd Edition
eBook
£24.99 £36.99
Paperback
£45.99
Subscription
Free Trial
Renews at £16.99p/m
Arrow left icon
Profile Icon Raheja Profile Icon Derek Mock Profile Icon Josh Diakun Profile Icon Paul R. Johnson
Arrow right icon
£24.99 £36.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7 (3 Ratings)
eBook May 2018 541 pages 3rd Edition
eBook
£24.99 £36.99
Paperback
£45.99
Subscription
Free Trial
Renews at £16.99p/m
eBook
£24.99 £36.99
Paperback
£45.99
Subscription
Free Trial
Renews at £16.99p/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
Table of content icon View table of contents Preview book icon Preview Book

Splunk Operational Intelligence Cookbook

Diving into Data – Search and Report

In this chapter, we will cover the basic ways to search data in Splunk. We will cover the following recipes:

  • Making raw event data readable
  • Finding the most accessed web pages
  • Finding the most used web browsers
  • Identifying the top-referring websites
  • Charting web page response codes
  • Displaying web page response time statistics
  • Listing the top-viewed products
  • Charting the application's functional performance
  • Charting the application's memory usage
  • Counting the total number of database connections

Introduction

In the previous chapter, we learned about the various ways to get data into Splunk. In this chapter, we will dive right into the data and get our hands dirty.

The ability to search machine data is one of Splunk's core functions, and it should come as no surprise that many other features and functions of Splunk are heavily driven by searches. Everything from basic reports and dashboards through to data models and fully featured Splunk applications is powered by Splunk searches behind the scenes.

The Search Processing Language

Splunk has its own search language known as the Search Processing Language (SPL). This SPL contains hundreds of search commands, most of which also have several functions, arguments...

Making raw event data readable

When a basic search is executed in Splunk from the search bar, the search results are displayed in a raw event format by default. To many users, this raw event information is not particularly readable, and valuable information is often clouded by other less valuable data within the event. Additionally, if events span several lines, only a few events can be seen on screen at any one time.

In this recipe, we will write a Splunk search to demonstrate how we can leverage Splunk commands to make raw event data readable, tabulating events and displaying only the fields we are interested in.

Getting ready

To step through this recipe, you will need a running Splunk Enterprise server, with the sample...

Finding the most accessed web pages

One of the data samples we loaded in Chapter 1, Play Time - Getting Data In, contained access logs from our web server. These have a Splunk source type of access_combined and detail all pages accessed by users of our web application. We are particularly interested in knowing which pages are being accessed the most, as this information provides great insight into how our e-commerce web application is being used. It could also help influence changes to our web application such that rarely visited pages are removed, or our application is redesigned to be more efficient.

In this recipe, we will write a Splunk search to find the most accessed web pages over a given period of time.

Getting ready

...

Finding the most used web browsers

Users visiting our website use a variety of devices and web browsers. By analyzing the web access logs, we can understand which browsers are the most popular and therefore which browsers our site must support at the least. We can also use this same information to help identify the types of devices that people are using.

In this recipe, we will write a Splunk search to find the most used web browsers over a given period of time. We will then make use of both the eval and replace commands to clean up the data a bit.

Getting ready

To step through this recipe, you will need a running Splunk Enterprise server with the sample data loaded from Chapter 1, Play Time - Getting Data In. You should be...

Identifying the top-referring websites

Our web access logs continue to give us great information about our website and the users visiting the site. Understanding where our users are coming from provides insight into potential sales leads and/or which marketing activities might be working better than others. For this information, we look for the referer_domain field value within the log data.

In this recipe, we will write a Splunk search to find the top-referring websites.

Getting ready

To step through this recipe, you will need a running Splunk Enterprise server, with the sample data loaded from Chapter 1, Play Time – Getting Data In. You should be familiar with the Splunk search bar and the time range picker.

...

Charting web page response codes

Log data often contains seemingly cryptic codes that have all sorts of meanings. This is true of our web access logs, where there is a status code that represents a web page response. This code is very useful, as it can tell us whether certain events were successful or not. For example, error codes found in purchase events are less than ideal, and if our website was at fault, then we might have lost a sale.

In this recipe, we will write a Splunk search to chart web page responses against the various web pages on the site.

Getting ready

To step through this recipe, you will need a running Splunk Enterprise server, with the sample data loaded from Chapter 1, Play Time - Getting Data In. You should...

Displaying web page response time statistics

No one likes to wait for a web page to load, and we certainly do not want users of our web application waiting either! Within our web access logs, there is a field named response that tracks the total time the page has taken to load in milliseconds.

In this recipe, we will track the average page load time over the past week at different times of the day.

Getting ready

To step through this recipe, you will need a running Splunk Enterprise server, with the sample data loaded from Chapter 1, Play Time – Getting Data In. You should be familiar with the Splunk search bar and the time range picker.

...

Listing the top-viewed products

Our web access logs capture the product IDs (the item field in the logs) that users are viewing and adding to their shopping carts most often. Understanding the top products that people view can help influence our sales and marketing strategy, and even product direction. Additionally, products viewed on an e-commerce website might not always necessarily translate into sales of that product.

In this next recipe, we will write a Splunk search to chart the 10 ten products that users successfully view and compare against the number of successful shopping cart additions for each product. For example, if a product has a high number of views but is not being added to carts and is subsequently purchased, this could indicate that something is not right; perhaps the pricing of the product is too high.

...

Charting the application's functional performance

Another of the data samples we loaded in Chapter 1, Play Time - Getting Data In, contained application logs from our application server. These have a Splunk source type of log4j and detail the various calls that our application makes to the backend database in response to user web requests, in addition to providing insight into memory utilization and other health-related information. We are particularly interested in tracking how our application is performing in relation to the time taken to process user-driven requests for information.

In this recipe, we will write a Splunk search to find out how our application is performing. To do this, we will analyze database call transactions and chart the maximum, mean, and minimum transaction durations over the past week.

...

Charting the application's memory usage

In addition to measuring the functional performance of database transactions, we are also interested in understanding how our application is performing from a memory usage perspective. Analyzing this type of information can help identify memory leaks in our application or high memory utilization that might be affecting the user experience and causing our application to slow down.

In this recipe, we will analyze the memory usage of our application over time.

Getting ready

To step through this recipe, you will need a running Splunk Enterprise server, with the sample data loaded from Chapter 1, Play Time – Getting Data In. You should be familiar with the Splunk search bar and...

Counting the total number of database connections

Our application currently only allows for a limited number of concurrent database connections. As our application user base grows, we need to monitor these connections proactively to ensure that we do not hit our concurrency limit and we know when we need to scale out the database infrastructure further.

In the last recipe of this chapter, we will monitor database transactions over the past week to identify if there are certain times or days when we might be close to our concurrency limit.

Getting ready

To step through this recipe, you will need a running Splunk Enterprise server, with the sample data loaded from Chapter 1, Play Time - Getting Data In. You should be familiar...

Left arrow icon Right arrow icon

Key benefits

  • Tackle any problems related to searching and analyzing your data with Splunk
  • Get the latest information and business insights on Splunk 7.x
  • Explore the all new machine learning toolkit in Splunk 7.x

Description

Splunk makes it easy for you to take control of your data, and with Splunk Operational Cookbook, you can be confident that you are taking advantage of the Big Data revolution and driving your business with the cutting edge of operational intelligence and business analytics. With more than 80 recipes that demonstrate all of Splunk’s features, not only will you find quick solutions to common problems, but you’ll also learn a wide range of strategies and uncover new ideas that will make you rethink what operational intelligence means to you and your organization. You’ll discover recipes on data processing, searching and reporting, dashboards, and visualizations to make data shareable, communicable, and most importantly meaningful. You’ll also find step-by-step demonstrations that walk you through building an operational intelligence application containing vital features essential to understanding data and to help you successfully integrate a data-driven way of thinking in your organization. Throughout the book, you’ll dive deeper into Splunk, explore data models and pivots to extend your intelligence capabilities, and perform advanced searching with machine learning to explore your data in even more sophisticated ways. Splunk is changing the business landscape, so make sure you’re taking advantage of it.

Who is this book for?

This book is intended for data professionals who are looking to leverage the Splunk Enterprise platform as a valuable operational intelligence tool. The recipes provided in this book will appeal to individuals from all facets of business, IT, security, product, marketing, and many more! Even the existing users of Splunk who want to upgrade and get up and running with Splunk 7.x will find this book to be of great value.

What you will learn

  • Learn how to use Splunk to gather, analyze, and report on data
  • Create dashboards and visualizations that make data meaningful
  • Build an intelligent application with extensive functionalities
  • Enrich operational data with lookups and workflows
  • Model and accelerate data and perform pivot-based reporting
  • Apply ML algorithms for forecasting and anomaly detection
  • Summarize data for long term trending, reporting, and analysis
  • Integrate advanced JavaScript charts and leverage Splunk s API

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 28, 2018
Length: 541 pages
Edition : 3rd
Language : English
ISBN-13 : 9781788833080
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 Details

Publication date : May 28, 2018
Length: 541 pages
Edition : 3rd
Language : English
ISBN-13 : 9781788833080
Vendor :
Splunk
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£16.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
£169.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 £5 each
Feature tick icon Exclusive print discounts
£234.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 £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 120.97
Splunk 7 Essentials, Third Edition
£32.99
Splunk Operational Intelligence Cookbook
£45.99
Implementing Splunk 7, Third Edition
£41.99
Total £ 120.97 Stars icon

Table of Contents

11 Chapters
Play Time – Getting Data In Chevron down icon Chevron up icon
Diving into Data – Search and Report Chevron down icon Chevron up icon
Dashboards and Visualizations - Make Data Shine Chevron down icon Chevron up icon
Building an Operational Intelligence Application Chevron down icon Chevron up icon
Extending Intelligence – Datasets, Modeling and Pivoting Chevron down icon Chevron up icon
Diving Deeper – Advanced Searching, Machine Learning and Predictive Analytics Chevron down icon Chevron up icon
Enriching Data – Lookups and Workflows Chevron down icon Chevron up icon
Being Proactive – Creating Alerts Chevron down icon Chevron up icon
Speeding Up Intelligence – Data Summarization Chevron down icon Chevron up icon
Above and Beyond – Customization, Web Framework, HTTP Event Collector, REST API, and SDKs Chevron down icon Chevron up icon
Other Books You May Enjoy 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.7
(3 Ratings)
5 star 66.7%
4 star 33.3%
3 star 0%
2 star 0%
1 star 0%
olu babacamp Oct 22, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I was particularly drawn to the 80 recipes in the book. As an instructor and a team-lead, it’s always good to have a book like this for student’s guide, or for new Splunk users. It has really supplemented my training. My students enjoy the practical aspect of the book. My only concern is that the book only focused on the frontend of the book, nothing much for the Splunk backend, I guess that’s for another book.
Amazon Verified review Amazon
Doetak Aug 21, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great book with lots of ways to transform your business using Splunk
Amazon Verified review Amazon
busyatwork2000 Sep 06, 2019
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I love this book for the most part. My only gripe is that the book gives a regex formula that doesn't work and is critical to creating fields for later use. The formula doesn't explain what outcome you're trying to get from the regex, so you can't figure it out on your own.Edit: The correct extraction is (?i)^(?:[^"]*"){8}\s+(?P<response>.+) which is missing the "\" in the third edition but is correct in the second edition as published online. Not sure if it's correct in printed edition though.
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.