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

Extracting new fields


Most raw data that you will encounter will have some form of structure. Just like a CSV (comma-separated value file) or a web log file, it is assumed that each entry in the log corresponds to some sort of format. Splunk 6.3+ makes custom field extraction very easy, especially for delimited files. Let's take the case of our Eventgen data and look at the following example. If you look closely, the _raw data is actually delimited by white spaces:

2016-01-21 21:19:20:013632 130.253.37.97 GET /home - 80 - 10.2.1.33 "Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J3 Safari/6533.18.5" 200 0 0 186 3804 

Since there is a distinct separation of fields in this data, we can use Splunk's out-of-the-box field extraction tool to automatically classify these fields. In your Destinations app Search page, run the following search command:

 SPL> index=main sourcetype=access_custom

This sourcetype access_custom...

lock icon The rest of the chapter is locked
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}