<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: returning multiple fields with multiple values from sub search to main search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/returning-multiple-fields-with-multiple-values-from-sub-search/m-p/34666#M7508</link>
    <description>&lt;P&gt;Yes, the earliest and latest time modifiers for each host take care of that. As long as &lt;EM&gt;main_search&lt;/EM&gt; is pretty generic ( sourcetype=syslog for example) you should ind what you need.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Nov 2012 11:51:51 GMT</pubDate>
    <dc:creator>alacercogitatus</dc:creator>
    <dc:date>2012-11-15T11:51:51Z</dc:date>
    <item>
      <title>returning multiple fields with multiple values from sub search to main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/returning-multiple-fields-with-multiple-values-from-sub-search/m-p/34663#M7505</link>
      <description>&lt;P&gt;I am trying to create a search where sub-search returns 2 fields. Field 1) list of servers 2) time.&lt;/P&gt;

&lt;P&gt;now for example., I get 3 results from the sub-search as host1, host2 and host3 for server field along with that I get 3 time which is host1_time, host2_time and host3_time. &lt;/P&gt;

&lt;P&gt;I want to search (host1 from host1_time to host1_time + 8 hours) and (host2 from host2_time to host2_time + 8 hours) and (host3 from host3_time to host3_time + 8 hours) I tried many type of search but it is not working.&lt;/P&gt;

&lt;P&gt;Sub-search can return n value for server field and n value for time field. Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/returning-multiple-fields-with-multiple-values-from-sub-search/m-p/34663#M7505</guid>
      <dc:creator>kvmanjunath</dc:creator>
      <dc:date>2020-09-28T12:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: returning multiple fields with multiple values from sub search to main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/returning-multiple-fields-with-multiple-values-from-sub-search/m-p/34664#M7506</link>
      <description>&lt;P&gt;I do this using time modifiers. Basically I use the subsearch to find the events, do some time based calculations, reformat the output to not include the implicit AND, and then the subsearch modifies the main search.&lt;/P&gt;

&lt;P&gt;The subsearch returns something like : &lt;CODE&gt;(host=host1 earliest=host1_time latest=host1_time+8 ) OR (host=host2 earliest=host2_time latest=host2_time+8 )&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So your whole search looks like this: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;main_search [search index=wherever| stats min(_time) as earliest by host|eval latest=earliest+(8*3600)|format "" "(" "" ")" "OR" ""]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2012 18:53:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/returning-multiple-fields-with-multiple-values-from-sub-search/m-p/34664#M7506</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2012-11-14T18:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: returning multiple fields with multiple values from sub search to main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/returning-multiple-fields-with-multiple-values-from-sub-search/m-p/34665#M7507</link>
      <description>&lt;P&gt;Does it works if sub-search returns n results? for example sub-search returns more than 5 servers and 5 different times for 5 servers.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2012 06:43:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/returning-multiple-fields-with-multiple-values-from-sub-search/m-p/34665#M7507</guid>
      <dc:creator>kvmanjunath</dc:creator>
      <dc:date>2012-11-15T06:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: returning multiple fields with multiple values from sub search to main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/returning-multiple-fields-with-multiple-values-from-sub-search/m-p/34666#M7508</link>
      <description>&lt;P&gt;Yes, the earliest and latest time modifiers for each host take care of that. As long as &lt;EM&gt;main_search&lt;/EM&gt; is pretty generic ( sourcetype=syslog for example) you should ind what you need.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2012 11:51:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/returning-multiple-fields-with-multiple-values-from-sub-search/m-p/34666#M7508</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2012-11-15T11:51:51Z</dc:date>
    </item>
  </channel>
</rss>

