Splunk Search

How to write a search to return events for a particular source IP for the last 7 days?

syed_star357
New Member

Hi,

How do I write a search to get particular source IP activities for the last 7 days?

Ex :src="122.15.158.173"

Regards,
Syed

0 Karma
1 Solution

sundareshr
Legend

Try this if src field has already been extracted.

index=yourindex sourcetype=yoursourcetype src=122.15.158.173 earliest=-7d@d | table _time src _raw

If src field has not been extracted, you will need to extract that first. If you share some data, someone here can help.

View solution in original post

0 Karma

sundareshr
Legend

Try this if src field has already been extracted.

index=yourindex sourcetype=yoursourcetype src=122.15.158.173 earliest=-7d@d | table _time src _raw

If src field has not been extracted, you will need to extract that first. If you share some data, someone here can help.

0 Karma

syed_star357
New Member

Thanks, the logs for the particular Source ip contains more than one Index and Sourcetypes and also data is containing huge, which is taking much time to get the answer.
is there any query, where can get the data in few mins, which can help us to analys the issue.

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!

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 ...

Index This | How many sevens are there between 1 and 100?

August 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...