Splunk Search

How do I set the result of one search to be used in another search string?

joseph_lodrigui
New Member

In this search: (for example)

index="_internal" source="*metrics.log" group="per_host_thruput" series = ( result of another search indicating a specific index ) | chart sum(kb) by series | sort - sum(kb)

So that it will just display all the hosts that are related to a specific index.

Tags (3)
0 Karma

gfreitas
Builder

You can simply use a subsearch in "[ ]" Like this:

index=_internal source=*metrics.log group="per_host_thruput" [search something that will result in series=something] | chat sum(kb) by series | sort -sum(kb)

Hope this can help you!

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...