Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (2024)

Hi there,

I guess that if you are here, you've already read the first part of this series and want some help to quickly get value from your NetFlow data, building trend analysis and advanced analytics with long term data (i.e months), in addition to playing with real-time data.

You can take advantage of Splunk’ssuper flexible schema on read architecture to exploit your real-time data from the very first moment you get the data in. Plus you can make use of Splunk’s Data Model Acceleration to get maximum performance for longer term data and enjoy a schema on write experience. You’ll get the best of both worlds! On top of that, you will configure it easily in a couple of clicks with the help of Splunk’s CIM.

This second part is based on a joint work Raúl Marín and I did in his own blog: NetFlow traffic ingestion with Splunk Stream and an Independent Stream Forwarder: Part 2. To help you through this journey, I built an app (sample dashboards for NetFlow) with a couple of dashboards and visualizations that you could use as examples of the insights you could easily get once NetFlow traffic is indexed in Splunk.

For this journey, we will assume that we have a Splunk deployment with the Splunk Stream app and NetFlow traffic being indexed in Splunk, preferably from aNetFlow traffic generator. If that is not the case, please have a look at part one of this series.

Ready to get to the next level? Let’s conquer Everest camp 2!

Step 1 – Deploy Netflow sample dashboards app

First of all, you need to download the app for sample dashboards for NetFlow from Github. This is a sample app that I built with a couple of dashboards with several visualizations of the NetFlow traffic that was ingested into Splunk using an open-source NetFlow traffic generator already mentioned in part 1 of this series. Follow the installation steps explained in the app README. The 'sample dashboards for NetFlow' app assumes that you are indexing NetFlow (from a generator or network) to an index called netflow_index. If this isn't the case, you'll need to modify the app's SPL accordingly.

After the sample dashboards for the NetFlow app is installed, you will be able to access it like any other Splunk deployed app:

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (1)

Step 2 – Install required splunkbase apps

To be able to enjoy the schema on write experience and some cool visualizations we will need to install the following apps from Splunkbase:

  • Splunk Common Information Model (CIM) app
  • Splunk Sankey Diagram - Custom Visualization
  • Force Directed App for Splunk

To install Splunk Common Information Model (CIM) app, we will follow the Common Information Model Add-on Manual.

To install Splunk Sankey Diagram - Custom Visualization and Force Directed App for Splunk just download the app and unzip to $SPLUNK_HOME/etc/apps on your Search Head before restarting Splunk. You can also use the web ui at the Search Head to install both apps fromSplunkbase by clicking in the “+ Find More Apps” section at the left-hand side of the landing page:

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (2)

Step 3 – Set up data model acceleration

Now we will configure the data model acceleration to get the desired schema on write experience for long-tail data. To have a look at the fields managed at the Network Traffic Data model at Splunk CIM have a look at the Common information model add-on manual. To perform the configuration we will follow the next steps:

1) Click on Datasets and filter by Network traffic and choose Network Traffic > All Traffic click on Manage and select Edit Data Model

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (3)Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (4)

2) Before configuring the acceleration of the data model you will need to add an index constraint to the data model. That is not necessary for a demo/dev environment but in a production environment, you should set an index constraint to optimize the performance of the data model acceleration. Default the constraint will be: (`cim_Network_Traffic_indexes`) tag=network tag=communicate . Click on Edit at the left of the constraint definition and set the constraint toindex=netflow_index (`cim_Network_Traffic_indexes`) tag=network tag=communicate so that the acceleration will only be made on the netflow_index. Then click on the greenSavebutton.

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (5)Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (6)

3) Now let’s review how the CIM can map NetFlow traffic fields contained at netflow_index to CIM: For that click on Datasets and filter by Network traffic: click on Network traffic > All Traffic:

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (7)

4) This leads you to a table view of the Network Traffic > All Traffic mappings to the fields contained in NetFlow logs from the netflow_index index. Note that many of the fields are left blank as the Network Traffic>All Traffic model is broader than the set of fields provided by the NetFlow log.

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (8)

5) Now let’s explore at search time how the CIM model extracts fields. For that, click on Datasets and filter by Network traffic: chooseNetwork traffic > All Traffic and click on Investigate on Search. You will be redirected to Search in Splunk and you will be able to look at how a list of fields in grey have appeared after the JSON log info. Those are the list of fields that are compatible with the CIM model and that will be extracted for fast long-tail searches when it will be accelerated. The field protoid is not in the list of extracted fields but since you will need it for some of the dashboards of the 'sample dashboards for NetFlow' app, you have to manually modify the CIM data model and add it in the next step.

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (9)Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (10)

6) Click on Datasets,filter by Network traffic and choose Network Traffic > All Traffic click on Manage and select Edit Data Model. In the next step click on the Add Field button and select Auto-Extracted.

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (11)

7) Splunk will help you by proposing a number of fields that could be extracted from the netflow_index and add it to the data model to later be accelerated. Choose the one we were looking for: protoid, set it as number and optional. Click on save.

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (12)

8) Click on Datasets and filter by Network traffic and I will choose Network Traffic > All Traffic and click on Investigate on Search to have a look at how a list of fields in grey have appeared after the json log info. See that protoid field has been included!

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (13)Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (14)

9) Now let’s finally set up data model acceleration. For that click on Datasets,filter by Network traffic and choose Network Traffic > All Traffic click on Manage and select Edit Data Model.

10) On the top right of the menu, click on Edit and select Edit Acceleration.

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (15)

11) Then, you need to enable acceleration by clicking in the white box next to Accelerate and set the Summary Range depending on the range of data you want to search. Set it to 3 months. In advanced settings, you could define other parameters such as Backfill Range, Max Summarization Search Time, etc. But we won't modify these this time. If you want to know more about configuring Data model Acceleration have a look at Accelerate Data Models documentation. Finally, we will click on save.

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (16)

12) After performing the previous configuration steps check that the acceleration icon has turned yellow to the NetFlow Traffic Data model signalling that acceleration is turned on.

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (17)

Step 4 – Explore the dashboards app

Cool! Now you can click on dashboards at the NetFlow sample dashboards app and begin playing with the two existing dashboards:

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (18)

  • @demo: NetFlow Dashboards: here I will have examples with long-tail data using Splunk’s tstats command that is used to exploit the accelerated data model we configured previously to obtain extremely fast results from long-tail searches. Note that tstats is used with summaries only parameter=false so that the search generates results from both summarized data and raw data. That will allow us, in one dashboard, to seamlessly enjoy the real-time experience of schema on read against raw data plus the long tail performance of the schema on write against data model accelerated data.
  • @demo: Hosts: here I will have examples using real-time data based on Splunk’s stats command that is used to exploit the raw real-time data indexed at Splunk.

For those who are not familiar with Splunk’s tstats command or Splunk’s stats command, let me give you a brief introduction.

We use Splunk’s stats command to calculate aggregate statistics, such as average, count, and sum, over the results set coming from a raw data search in Splunk.Splunk’s tstats commandis also applied to perform pretty similar operations to Splunk’s stats command but over tsidx files indexed fields. Those indexed fields can be from normal index data, tscollect data, or accelerated data models. Splunk Enterprise creates a separate set of tsidx files for data model acceleration. In this case, it uses the tsidx files as summaries of the data returned by the data model.

Splunk’s tstats commandis faster than Splunk’s stats commandsince tstats only looks at the indexed fields whereas stats examines the raw data. Since Splunk’s tstats command can only look at the indexed metadata it can only search fields that are in the indexed fields.

To explore the SPL contained in each dashboard just click on Open in Search at the button of the panel of interest and you will see the search that created the panel:

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (19)

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (20)

@demo: NetFlow Dashboards

Find here some snapshots of the panels included in this dashboard:

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (21)

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (22)

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (23)

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (24)

@demo: Hosts

Find here some snapshots of the panels included in this dashboard:

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (25)

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (26)

Credit to Matthieu Araman for this technical guidance on this topic.

Credit toMatt Olsonfor his guidance and support in the publication of this blog series.

What’s Next?

Awesome, we have reached Everest camp 2.

From here, we can build on this foundation using trend analysis, and ML to get predictive and to identify anomalies - helping capacity management, informing routing and peering strategies, and protecting our networks by finding bad actors and nefarious activities. The possibilities are almost endless, and we’ll explore more Splunky NetFlow goodness in future instalments.

Do not miss part 1 of this blog series:Splunking NetFlow with Splunk Stream - Part 1: Getting NetFlow data into Splunk.

Meanwhile...happy Splunking!

----------------------------------------------------
Thanks!
Lucas Alados

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (27)

Splunk

The world’s leading organizations trustSplunkto help keep their digital systems secure and reliable. Our software solutions and services help to prevent major issues, absorb shocks and accelerate transformation. Learnwhat Splunk doesandwhy customers choose Splunk.

Splunking Netflow with Splunk Stream - Part 2: Basic Netflow Analytics | Splunk (2024)
Top Articles
WSOP Free Chips: Top 5 Ways to get Free WSOP Chips
Binomial Coefficient Calculator
scotty rasmussen paternity court
Irela Torres Only Fans
Propnight Player Count
Barber Gym Quantico Hours
Rickrolling Link Generator
Who Owns Po Box 17316 Salt Lake City Utah
دانلود فیلم Toc Toc بدون سانسور
Realidades 2 Capitulo 2B Answers
Keanu Reeves cements his place in action genre with ‘John Wick: Chapter 4’
NYC Drilled on Variant Response as Vaccine Limits Push State Appointments to Mid-April
Tyson Employee Paperless
Configuring Fail2ban with Traefik
Espn Major League Baseball Standings
Localhotguy
Integrations | Information Technology
2887 Royce Road Varysburg Ny 14167
Wells Fargo Banks In Florida
Francine weakens moving inland as the storm leaves behind flooding and widespread power outages
Fgo Spirit Root
Director, Regional People
Prey For The Devil Showtimes Near Amc Ford City 14
Wharton Funeral Home Wharton Tx
Mychart University Of Iowa Hospital
Teddy Torres Machoflix
Kaelis Dahlias
Lux Nails Columbia Mo
South Louisiana Community College Bookstore
Clinical Pharmacology Quality Assurance (CPQA) Program: Models for Longitudinal Analysis of Antiretroviral (ARV) Proficiency Testing for International Laboratories
Ltlv Las Vegas
Cheeksorpillows
Odu Csnbbs
Culvers Flavor Of The Day Freeport Il
Does Iherb Accept Ebt
Pack & Ship Electronics, Artwork, Antiques and more at The UPS Store Newnan, GA at 90-F Glenda Trace
Jodie Sweetin Breast Reduction
Sessional Dates U Of T
Mercantilism - Econlib
Bianca Censo
Sam's Club Gas Price Mechanicsburg Pa
New York Rangers Hfboards
NCCAC
Currently Confined Coles County
Is The Rubber Ducks Game Cancelled Today
Destep: 10 tips voor de scherpste destep-analyse ooit!
Workspace.emory.og
Before Trump, neo-Nazis pushed false claims about Haitians as part of hate campaign
Rubrankings Austin
Fintechzoommortgagecalculator.live Hours
Closest Asian Supermarket
H'aanit's Third Chapter | Gamer Guides: Your ultimate sou...
Latest Posts
Article information

Author: Rubie Ullrich

Last Updated:

Views: 6449

Rating: 4.1 / 5 (52 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Rubie Ullrich

Birthday: 1998-02-02

Address: 743 Stoltenberg Center, Genovevaville, NJ 59925-3119

Phone: +2202978377583

Job: Administration Engineer

Hobby: Surfing, Sailing, Listening to music, Web surfing, Kitesurfing, Geocaching, Backpacking

Introduction: My name is Rubie Ullrich, I am a enthusiastic, perfect, tender, vivacious, talented, famous, delightful person who loves writing and wants to share my knowledge and understanding with you.