Splunk Search

Query Help

gozdeyildiz
New Member

Hi,

I am trying to search logs from specific source and with specific name and to search IP found in previous search in all indexes.

Ex: index=firewall and name="malicious IP' (this will give a log with IP address and I want to search that IP address in all indexes.

Thanks in advance.
Bests,
Gozde

Tags (1)
0 Karma

gcusello
Esteemed Legend

Hi @gozdeyildiz,
please try something like this (if the field is called IP in every index:

index=* [ search index=firewall name="malicious IP" | fields IP ]
| ...

If you cannot be sure that IP field has the same name in every index, you could try something like this:

index=* [ search index=firewall name="malicious IP" | rename IP AS query | fields query ]
| ...

In both the searches check if the number of results of subsearch is more or less than 50,000, because there's this limit in subsearches.

Ciao.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Build Scalable Security While Moving to Cloud - Guide From Clayton Homes

 Clayton Homes faced the increased challenge of strengthening their security posture as they went through ...

Mission Control | Explore the latest release of Splunk Mission Control (2.3)

We’re happy to announce the release of Mission Control 2.3 which includes several new and exciting features ...

Cloud Platform | Migrating your Splunk Cloud deployment to Python 3.7

Python 2.7, the last release of Python 2, reached End of Life back on January 1, 2020. As part of our larger ...