Splunk Search

Need to search all request based on IP address

varshna
New Member

I have these pattern in logs and I want to search burst of requests coming from one IP address

For example:

line: 10.196.. - - [06/Mar/2019:09:28:41 +0000] "GET /info/moin_static155a/common/ie7/ie7-overflow.js HTTP/1.1" 404 17

0 Karma

varshna
New Member

I am getting hit by different IPs at random times and their pattern is random. This is one of the example. Is there a way to detect the pattern, for ex: sudden burst of requests coming from one IP or sudden increase in 5XX or 4XX.

0 Karma

cvssravan
Path Finder

You can search directly like this:

index="your index" "10.196.x.x"

0 Karma

JPaule
Explorer

index=x IP=10.196.xx.xx | table *

Where IP is column name. That should work unless I'm missing something.

0 Karma

renjith_nair
Legend

@varshna,

If you have the IP address as a field in the events, you could search it with fieldname_of_ip="10.196..."
Or you shall extract the IP address from the events using rex and search with it
Or you can search directly in the events with index="your index" TERM(10.196...)

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

varshna
New Member

I am getting hit by different IPs at random times and their pattern is random. This is one of the example. Is there a way to detect the pattern, for ex: sudden burst of requests coming from one IP or sudden increase in 5XX or 4XX.

0 Karma

renjith_nair
Legend

@varshna,

You can count the events per IP and compare it with previous counts and see if there is a sudden increase

For eg. index=your_index earliest=-2h |bucket span=1h _time|stats count by IP,_time

Similarly for 5xx and 4xxx

---
What goes around comes around. If it helps, hit it with Karma 🙂
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 ...