<?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 How to dynamically add results / correlate in a search with a sub-search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-add-results-correlate-in-a-search-with-a-sub/m-p/382552#M111778</link>
    <description>&lt;P&gt;I want to dynamically add fields to my result set depending on a search I did.&lt;/P&gt;

&lt;P&gt;How do I can add fields/new columns based on a search from a result of the main-search ? &lt;/P&gt;

&lt;P&gt;index=test&lt;BR /&gt;
*&lt;BR /&gt;
| table Computer&lt;BR /&gt;
| appendcols [ search (index=another_test) Computer=$ParentSearch$.Computer) | head 1 | table Name ] &lt;BR /&gt;
| table Computer, Name&lt;/P&gt;

&lt;P&gt;dynamically. I cant work with lookups for each result because I want to generate the end result each time.&lt;BR /&gt;
Cant do that manually. I need to be to process this automatically.&lt;/P&gt;

&lt;P&gt;Another example:&lt;/P&gt;

&lt;P&gt;Lets say I am building a resultset with an query.&lt;BR /&gt;
When results show up, how can I enrich my resultset with values from another index?&lt;/P&gt;

&lt;P&gt;What I am looking is at writing SPLs which run once and during this one-shot they should correlate multiply events from multiply indexes. So result should be further processed and enriched by information from other indexes/columns.&lt;/P&gt;

&lt;P&gt;What is the best way to do that with Splunk in one SPL ?&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jul 2019 20:12:03 GMT</pubDate>
    <dc:creator>bahndg</dc:creator>
    <dc:date>2019-07-09T20:12:03Z</dc:date>
    <item>
      <title>How to dynamically add results / correlate in a search with a sub-search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-add-results-correlate-in-a-search-with-a-sub/m-p/382552#M111778</link>
      <description>&lt;P&gt;I want to dynamically add fields to my result set depending on a search I did.&lt;/P&gt;

&lt;P&gt;How do I can add fields/new columns based on a search from a result of the main-search ? &lt;/P&gt;

&lt;P&gt;index=test&lt;BR /&gt;
*&lt;BR /&gt;
| table Computer&lt;BR /&gt;
| appendcols [ search (index=another_test) Computer=$ParentSearch$.Computer) | head 1 | table Name ] &lt;BR /&gt;
| table Computer, Name&lt;/P&gt;

&lt;P&gt;dynamically. I cant work with lookups for each result because I want to generate the end result each time.&lt;BR /&gt;
Cant do that manually. I need to be to process this automatically.&lt;/P&gt;

&lt;P&gt;Another example:&lt;/P&gt;

&lt;P&gt;Lets say I am building a resultset with an query.&lt;BR /&gt;
When results show up, how can I enrich my resultset with values from another index?&lt;/P&gt;

&lt;P&gt;What I am looking is at writing SPLs which run once and during this one-shot they should correlate multiply events from multiply indexes. So result should be further processed and enriched by information from other indexes/columns.&lt;/P&gt;

&lt;P&gt;What is the best way to do that with Splunk in one SPL ?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 20:12:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-add-results-correlate-in-a-search-with-a-sub/m-p/382552#M111778</guid>
      <dc:creator>bahndg</dc:creator>
      <dc:date>2019-07-09T20:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically add results / correlate in a search with a sub-search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-add-results-correlate-in-a-search-with-a-sub/m-p/382553#M111779</link>
      <description>&lt;P&gt;I do not understand much what I want to do&lt;/P&gt;

&lt;P&gt;For example, what about this search statement?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=test OR index=another_test)
|stats latest(Name) as Name by Computer
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jul 2019 04:23:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-add-results-correlate-in-a-search-with-a-sub/m-p/382553#M111779</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2019-07-10T04:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically add results / correlate in a search with a sub-search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-add-results-correlate-in-a-search-with-a-sub/m-p/382554#M111780</link>
      <description>&lt;P&gt;You are looking for the join command, i.e:&lt;/P&gt;

&lt;P&gt;index=test&lt;BR /&gt;
| table Computer&lt;BR /&gt;
| join Computer [ search (index=another_test) | head 1 | table Name Computer]&lt;/P&gt;

&lt;P&gt;This correlates the Computer field both on index test and another_test and join the subsearch fields (except for the matching one).&lt;/P&gt;

&lt;P&gt;Dont forget to upvote &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 12:28:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-add-results-correlate-in-a-search-with-a-sub/m-p/382554#M111780</guid>
      <dc:creator>sonny_monti</dc:creator>
      <dc:date>2019-07-10T12:28:28Z</dc:date>
    </item>
  </channel>
</rss>

