Deployment Architecture

range() function

m_nouman
New Member

I want to search for an Account_Name that has the maximum number of login attempts within a span of 10 minutes with range() function.....

 

I don't know how can i provide the parameters to this function....

some help will be appreciated!

Labels (1)
0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@m_nouman - You need to use time_window for streamstats command, as suggested by @PickleRick 

For timechart and bin command use span=10m

 

I hope this helps!!!

0 Karma

PickleRick
SplunkTrust
SplunkTrust

And how did you come up with the range() stats function? This function is for something completely different - it tells you what's the difference between lowest and highest value in your result set whereas you want to count things. The range() function is completely unsuited for this.

You should be doing count by Account_Name. In order to make it over sliding window, you need to use streamstats with a proper time window.

<your_initial_search>
| streamstats time_window=10m count by Account_Name

This will give you counts of logins over 10 minute windows. From this you'll be able to pick the one with the highest count. For example with

| sort - count | head 

 

0 Karma

OzRL5
New Member

from hackthebox academy it's one of their questions and the hint is to use the range() function

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...