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.
Get Updates on the Splunk Community!

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...