Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Splunk Essentials - Second Edition

You're reading from  Splunk Essentials - Second Edition

Product type Book
Published in Sep 2016
Publisher
ISBN-13 9781785889462
Pages 236 pages
Edition 2nd Edition
Languages
Authors (3):
Betsy Page Sigman Betsy Page Sigman
Profile icon Betsy Page Sigman
Somesh Soni Somesh Soni
Profile icon Somesh Soni
Erickson Delgado Erickson Delgado
Profile icon Erickson Delgado
View More author details

Table of Contents (15) Chapters

Splunk Essentials Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Splunk in Action Bringing in Data Search Processing Language Data Models and Pivot Data Optimization, Reports, Alerts, and Accelerating Searches Panes of Glass Splunk SDK for JavaScript and D3.js HTTP Event Collector Best Practices and Advanced Queries

Chapter 4. Data Models and Pivot

Splunk data models and the Pivot tool are key features that enable users to generate statistical data and charts without the complexity of the Search Processing Language (SPL). A data model is a hierarchical mapping of data based on search results. It is analogous to the concept of schemas in a relational database. The output of the search queries associated with the data model can be visualized as a set of rows and columns in a spreadsheet. The data is further subdivided by attributes, which are essentially extracted fields that are similar to those discussed in Chapter 2, Bringing in Data. Since data models are essentially rows and columns of data, we can use them to generate a Pivot table to provide a myriad of different, summarized results.

In this chapter, we will learn how to:

  • Create a data model

  • Enable acceleration for the data model

  • Make a Pivot table

  • Visualize data using area charts, pie charts, and single value with trend sparklines

Creating a data model


Before you can create a Pivot table, you need to develop a set of rows and columns through the creation of a data model. To do this, perform the following steps:

  1. In the Destinations app, click on the Pivot link in the top menu. Observe the Select a Data Model page, which will be empty until you have created your first data model.

  2. Click on the Manage Data Models button in the upper-right corner of the screen to proceed.

  3. In the Data Models screen, click on New Data Model.

  4. Give your new data model a title and ID and ensure that it is created in the Destinations app. Refer to the following screenshot as a guide:

  5. Click on Create. You are now in the Destinations data model editing page.

  6. Click on the Add Object dropdown and select Root Event. The concept of data model hierarchy is now in play. The Root Event or Root Search is the base search that will populate the data for the entire data model tree.

  7. Populate the Root Event with the fields seen in the following screenshot. We want...

Data model acceleration


When you enable acceleration for a data model, Splunk internally summarizes the data defined by the data model in a given time range. This gives a tremendous boost to the search speed for your data model. There are a couple of things to remember when you enable data model acceleration:

  1. Once you enable acceleration for a data model, you will no longer be able to edit the data model objects. Ensure that you have properly configured your child objects and attributes before you decide to accelerate. A huge data model may take some time to complete the acceleration process, so plan accordingly. You will only be able to edit the data model again if you disable the acceleration.

  2. Select your summary range wisely. The summary range is the calculation time span that the acceleration will use against your data. The summary range can span 1 day, 7 days, 1 month, 3 months, 1 year, and so on. Search acceleration is based on time ranges. Only those that fall within the selected time...

Rearranging your dashboard


Before going on, you can rearrange your dashboard so that it looks the way you want:

  1. In the Summary Dashboard, click on the Edit button and select Edit Panels. This will convert the panels into widgets that you can drag around.

  2. Change the final layout of your Summary Dashboard to look like the following screenshot. Click on Done once you have laid the widgets out in the correct orientation:

Summary


By now, you have familiarized yourself with data models and the Pivot Editor. In this chapter, we explained what data models are and how they are created. We walked you through how to create your data model objects based on a hierarchy. You also have learned that data models consist of attributes that can be inherited from the parent objects. You created an attribute by extracting a field using regular expression. We have also shown you how to use the Pivot Editor and create three different visualizations: area chart, pie chart, and single value with trend sparkline.

In the next chapter, Chapter 5, Data Optimization, Reports, Alerts, and Accelerating Searches, you will learn how to create and use these important Splunk tools as well as how to optimize searches.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Splunk Essentials - Second Edition
Published in: Sep 2016 Publisher: ISBN-13: 9781785889462
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 $15.99/month. Cancel anytime}