Splunk Search

What is the best way to search, sort and group data of multiple wired and wireless networks by IP?

stubinski
Engager

Hi, I want to create a report that will graph the traffic from wireless networks and wired networks so that I can see which networks have the most usage. The graph will have two fields - wireless and wired. There are multiple subnets for each network type. There are fewer wireless networks than wired so searching for wireless networks and making everything else "other" is ok.

I've looked at eval, case, if, where, and lookups but I am unsure of the best way to search, sort, and group the data. Any help would be very much appreciated.

Sample data:

Wireless networks - 10.1.1.0 /24, 10.10.10.0/24, 10.20.20.0/24
Wired networks - 10.2.2.0/24, 10.100.100.0/24, 10.200.200.0/24

1 Solution

somesoni2
Revered Legend

You can try something like this

your base search | eval type=if(cidrmatch("10.1.1.0 /24",yourIPfield) OR cidrmatch("10.10.10.0/24",yourIPfield) OR ..other values....,"Wireless","Wired" | stats count by type

View solution in original post

somesoni2
Revered Legend

You can try something like this

your base search | eval type=if(cidrmatch("10.1.1.0 /24",yourIPfield) OR cidrmatch("10.10.10.0/24",yourIPfield) OR ..other values....,"Wireless","Wired" | stats count by type

stubinski
Engager

Thanks! This worked!

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...