Book Image

Splunk 7 Essentials - Third Edition

By : J-P Contreras, Steven Koelpin, Erickson Delgado, Betsy Page Sigman
Book Image

Splunk 7 Essentials - Third Edition

By: J-P Contreras, Steven Koelpin, Erickson Delgado, Betsy Page Sigman

Overview of this book

Splunk is a search, reporting, and analytics software platform for machine data, which has an ever-growing market adoption rate. More organizations than ever are adopting Splunk to make informed decisions in areas such as IT operations, information security, and the Internet of Things. The first two chapters of the book will get you started with a simple Splunk installation and set up of a sample machine data generator, called Eventgen. After this, you will learn to create various reports, dashboards, and alerts. You will also explore Splunk's Pivot functionality to model data for business users. You will then have the opportunity to test-drive Splunk's powerful HTTP Event Collector. After covering the core Splunk functionality, you'll be provided with some real-world best practices for using Splunk, and information on how to build upon what you've learned in this book. Throughout the book, there will be additional comments and best practice recommendations from a member of the SplunkTrust Community, called "Tips from the Fez".
Table of Contents (10 chapters)

Use the fields command to improve search performance

Traditionally when building a Splunk search, you will write the search first to get the correct layout and accurate results. Then using Splunk's fields command, the performance of the search can be improved, sometimes dramatically depending the logic contained in the search.

By default, when you search an index and return events, Splunk will query and return all of the event fields. However in most searches producing statistical results, having all the fields from the event is not necessary because they are not all required to create the output.

An example of a Splunk search before the fields command:

index=main http_uri=/booking/reservation http_status_code=200 | stats count by http_user_agent

An example of the search after applying the fields command will produce the same results more quickly:

index=main http_uri=...