Book Image

Splunk Operational Intelligence Cookbook

Book Image

Splunk Operational Intelligence Cookbook

Overview of this book

Table of Contents (17 chapters)
Splunk Operational Intelligence Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a session state table


In this recipe, you will learn how to leverage lookups to maintain a state table that will capture the first time a session was seen and continually update the existing session's information accordingly. You can use this to determine if a session has gone stale and has been abandoned or if someone is trying to hijack an old session.

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 navigating the Splunk user interface.

How to do it...

Follow the steps in this recipe to create a state table of sessions:

  1. Log in to your Splunk server.

  2. Select the Operational Intelligence application.

  3. In the search bar, enter the search and select to run it over Last 15 minutes:

    index=main sourcetype="access_combined" | eval firsttime=_time | eval lasttime=_time |  stats last(firsttime) as firsttime, first(lasttime) as lasttime by JSESSIONID | outputlookup...