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

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...