Training + Certification Discussions

Is there any better query to search for a particular IOC (IP) across all indexes?

ashokoban
Engager

Hi,

Is there any better query to search for a particular IOC (IP) across all indexes.

I generally use,

index=* "x.x.x.x"

This is consuming more time. Is there any efficient query to overcome the delay.

Tags (2)

inventsekar
SplunkTrust
SplunkTrust

most probably, the ip addresses are already captured and assigned to some fields.. for example.. sourceip, srcip, etc.. so just find out what field you are looking for(if you want to include two or more fields, then you can use OR option). then you can speed up the search like this.. this one will be much faster than the search you mentioned(because as it searches the already extracted fields)

index=* srcip="x.x.x.x"

 as said in the previous reply.. the datamodel, saved search are the best options.. 

or if you manually search, last 1 day logs with the ip address, then it may take around two/three or few mins.. 

instead, try to create a report, which runs every 6 hrs or so, when there is a match, it should email you the details. hope you got the idea. let us know if any further details required. thanks. 

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !

gcusello
SplunkTrust
SplunkTrust

Hi @ashokoban,

if you want to search in the full row, this is the only choice.

If instead you want to search only in some fields, you could use a DataModel or schedule a search to save in a summary index only the fields to use in your search and then use the summary index for your search.

Ciao.

Giuseppe

Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

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