Splunk Search

Need help top 2 division

duenguyen
Explorer

Hello I am a newbie on Splunk. I need to create an alert if #1 IP generated >2X of the #2 IP
and this is my search

sourcetype=csv | top sipAddress | head 2

sipAddress count
10.10.9.23 200
12.12.3.4 50

basically I will need to have first one divided by second if > 2 then I could put in my alert to send to customer.

Please help
Thanks

0 Karma
1 Solution

Damien_Dallimor
Ultra Champion

Try something like this :

sourcetype=csv | top limit=2 sipAddress |streamstats first(count) as count_B window=1 global=f current=f | tail 1 |eval count_ratio=count_B/count | table count_ratio

View solution in original post

Damien_Dallimor
Ultra Champion

Try something like this :

sourcetype=csv | top limit=2 sipAddress |streamstats first(count) as count_B window=1 global=f current=f | tail 1 |eval count_ratio=count_B/count | table count_ratio
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...