Learning Splunk Web Framework

Book description

Take your analytics online with the ease and power of the Splunk Web Framework

About This Book

  • Want to build rich applications on the Web using Splunk? This book will be your ultimate guide!
  • Learn to use web framework components with the help of this highly practical, example-rich guide
  • Perform excellent Splunk analytics on the Web and bring that knowledge to your own projects

Who This Book Is For

This book will cater to Splunk developers and administrators who now wish to further their knowledge with Splunk Web Framework and learn to improve the way they present and visualize data in Splunk. A basic knowledge of JavaScript will be beneficial but is not a prerequisite.

What You Will Learn

  • Master the fundamentals of Splunk Web Framework
  • Start thinking of Splunk as a complete development platform to build user-friendly apps
  • Extend the functionality of your apps using SimpleXML techniques
  • Set up dashboard layouts, navigation, and menus in your apps
  • Create simple dashboard elements including charts and tables
  • Master the art of interacting with searches and dashboards
  • Integrate SplunkJS to add visual appeal to your website

In Detail

Building rich applications on the Web using Splunk is now simpler than ever before with the Splunk Web Framework. It empowers developers to build their own web applications with custom dashboards, tables, charts, form searches, and other functionalities in the datasets at their disposal.

The book will start with the fundamentals of the Splunk Web Framework, teaching you the secrets of building interesting and user-friendly applications. In the first application, you will learn to analyze and monitor traffic hitting the NASA website and learn to create dashboards for it. You will then learn additional, and more detailed, techniques to enhance the functionalities of the app such as dashboards and forms, editing simple XML, using simple XML extensions, tokens, post-process searches, dynamic drill-downs, the Splunk Web Framework and REST API, and much more. The second app will use historical stock market data and will create custom dashboards using Splunk Web Framework; the book will now cover important topics such as creating HTML dashboards, enhancing the visual appeal of the app using CSS, and moving your app with SplunkJS.

The book will provide different and interesting examples instead of the usual ?Log, Index, Search, and Graph? so that Splunk will be the first tool readers think of to resolve a problem.

Style and approach

This book will follow a step-by-step approach whereby every new concept is built on top of the previous chapter, and will be highly practical in nature; the reader will learn to build apps while reading about the Splunk Web framework.

Table of contents

  1. Learning Splunk Web Framework
    1. Learning Splunk Web Framework
    2. Credits
    3. About the Author
    4. About the Reviewer
    5. www.PacktPub.com
      1. eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    6. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book 
        3. Errata
        4. Piracy
        5. Questions
    7. 1. Splunk Web Framework Fundamentals
      1. Introducing the Splunk Web Framework
        1. A quick note about advanced XML
        2. Architecture of the Splunk Web Framework
        3. Description of the architecture
        4. The Splunk web interface
        5. Simple XML
        6. SimpleXML extensions
        7. HTML
        8. SplunkJS libraries
        9. splunkd
      2. The development process and development environment
        1. The development process
        2. Development environment
        3. Data to test with
        4. Using collaboration tools... enter Git
        5. Using Git
        6. Basic usage examples of Git
        7. Create an account on GitHub
          1. Create your repository
        8. Branching and working with Git
        9. Using Git when changes go bad
      3. Introducing the example projects
        1. NASA HTTP data
        2. Game of life
        3. Historical stock market data
      4. Summary
    8. 2. Presenting Data to Users as a Splunk App
      1. Managing and creating your apps
        1. Creating our first Splunk app
        2. Alternative ways to create a Splunk app
        3. Adding your new Splunk app to Git
        4. Deleting Splunk apps
        5. The Splunk app directory structure
        6. Designing Splunk apps for your audience
        7. Creating a dashboard
        8. Field extraction for our NASA data
        9. Adding panels to our dashboard
        10. Editing existing dashboards
        11. Set your dashboard on the Splunk home screen
        12. Viewing and saving changes to GitHub
      2. Summary
    9. 3. Expand Your Splunk Apps Using Simple XML
      1. File precedence and caching
      2. Getting started with the SimpleXML code
      3. The Splunk code editor
      4. Create development branches with Git
      5. Adding charts to dashboards
      6. The Simple XML of charts
      7. Expanding our Splunk app with maps
      8. Finally, a table!
      9. Completing your development and releasing to production
      10. Summary
    10. 4. Layouts, Navigation, and Menus
      1. Setting your Splunk app's default page
      2. Manipulating the menu structure
      3. Biological cell simulation app
      4. Manipulating your dashboard layout
      5. Customizing layouts with JavaScript
      6. Color-coding values in our display
      7. Adding CSS into Simple XML
      8. Summary
    11. 5. Interacting with Your User While Speeding up App Searches
      1. Speeding up data delivery with post processing searches
      2. Using scheduled reports in dashboards
      3. Splunk forms
      4. More advanced form examples
        1. Drilldown of data within Splunk
      5. Packaging up our Splunk apps
      6. Summary
    12. 6. Moving from Simple XML to HTML
      1. Moving forward by taking a step back
      2. Converting your Simple XML code to HTML
      3. The Splunk HTML Code Editor
      4. Stepping through the HTML dashboard code
      5. Why convert to HTML?
      6. Making changes to HTML dashboards
      7. Creating a Splunk App template
      8. Summary
    13. 7. JavaScript Modules in Your HTML App
      1. JavaSript modules in the Splunk Web Framework
      2. Adding animation to Splunk dashboards
      3. Ensuring your code is correct
      4. Customizing JavaScript Modules in HTML
      5. Implementing external libraries in your HTML code
      6. Adding your icon to your Splunk App
      7. Summary
    14. 8. Utilizing CSS to Spice Up Visual Appeal
      1. CSS templates and themes
      2. Get the raw dashboard ready
      3. Implementing your own CSS style
      4. Inline style sheets
      5. Using internal style sheets in your Splunkcode
      6. CSS and dashboard menus
      7. Setting up external style sheets in Splunkapps
      8. Using the Splunk Web Framework CSS
      9. Bootstrap alerts in your Splunkdashboard
      10. Bootstrap and dashboard headings
      11. Bootstrap tool tips
      12. Losing our Bootstrap themes
      13. Summary
    15. 9. Moving Your App off Splunk with Splunk JS
      1. So what is SplunkJS?
      2. What about the Splunk SDK?
      3. Host Splunk data outside of Splunk
      4. Setting up our website
      5. Interacting with Splunk through the management port
      6. Let's get started with SplunkJS
      7. So what if your test page doesn't work?
      8. Let's create our new web page...mobile first
      9. Authenticating with your Splunkenvironment
      10. Automated testing of our web page
      11. Writing a simple test
      12. Considerations when testing
      13. Summary

Product information

  • Title: Learning Splunk Web Framework
  • Author(s): Vincent Sesto
  • Release date: August 2016
  • Publisher(s): Packt Publishing
  • ISBN: 9781786462947