<?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 Correlating data between two searches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Correlating-data-between-two-searches/m-p/459583#M129700</link>
    <description>&lt;P&gt;I have a query that goes into an index and filter a particular type of events of interest using stats and returns something like:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;search Event_Class = EVENT_TYPE_1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The results get pipped into &lt;CODE&gt;| stats count as Stats1 dc as Stats2 avg(data) as Stats3 by Hostname .   String_Field_One, Numeric_Field_One, Dest_IP&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This results into something like:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;Hostname       String _Field_One      Numeric_Field_One      Dest_IP     Stats1    Stats2    Stats3&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;now the challenge. I would like to use Hostname, String_Field_One to &lt;EM&gt;"lookup"&lt;/EM&gt; against data from a separate query, resulting in an additional field being added to the results of the original data.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;search Event_Class = EVENT_TYPE_1 HostName=&amp;lt;value_from_hostname_would_go_here&amp;gt; AND String_Field_One=&amp;lt;value_from_String_Field_One_should_go_here&amp;gt; AND Numeric_Field_One=&amp;lt;value_from_numeric_field_one_would_go_here&amp;gt; | head 1 | table String_Field_That_I_Want_To_Join&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Can Splunk do this?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 20:38:33 GMT</pubDate>
    <dc:creator>rhinomike</dc:creator>
    <dc:date>2020-09-29T20:38:33Z</dc:date>
    <item>
      <title>Correlating data between two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlating-data-between-two-searches/m-p/459583#M129700</link>
      <description>&lt;P&gt;I have a query that goes into an index and filter a particular type of events of interest using stats and returns something like:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;search Event_Class = EVENT_TYPE_1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The results get pipped into &lt;CODE&gt;| stats count as Stats1 dc as Stats2 avg(data) as Stats3 by Hostname .   String_Field_One, Numeric_Field_One, Dest_IP&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This results into something like:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;Hostname       String _Field_One      Numeric_Field_One      Dest_IP     Stats1    Stats2    Stats3&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;now the challenge. I would like to use Hostname, String_Field_One to &lt;EM&gt;"lookup"&lt;/EM&gt; against data from a separate query, resulting in an additional field being added to the results of the original data.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;search Event_Class = EVENT_TYPE_1 HostName=&amp;lt;value_from_hostname_would_go_here&amp;gt; AND String_Field_One=&amp;lt;value_from_String_Field_One_should_go_here&amp;gt; AND Numeric_Field_One=&amp;lt;value_from_numeric_field_one_would_go_here&amp;gt; | head 1 | table String_Field_That_I_Want_To_Join&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Can Splunk do this?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:38:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlating-data-between-two-searches/m-p/459583#M129700</guid>
      <dc:creator>rhinomike</dc:creator>
      <dc:date>2020-09-29T20:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Correlating data between two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlating-data-between-two-searches/m-p/459584#M129701</link>
      <description>&lt;P&gt;Perhaps sub search can help??&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.2/SearchTutorial/Useasubsearch"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.2/SearchTutorial/Useasubsearch&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.1.2/Search/Usesubsearchtocorrelateevents"&gt;https://docs.splunk.com/Documentation/Splunk/7.1.2/Search/Usesubsearchtocorrelateevents&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 09:57:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlating-data-between-two-searches/m-p/459584#M129701</guid>
      <dc:creator>mwdbhyat</dc:creator>
      <dc:date>2018-07-25T09:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Correlating data between two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlating-data-between-two-searches/m-p/459585#M129702</link>
      <description>&lt;P&gt;I had a look on those, however subsearches seem to behave more like SQL's UNION or Sub-SELECT statements than a proper lookup. They are just not powerful enough (or incredibly poorly documented)...&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jul 2018 01:07:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlating-data-between-two-searches/m-p/459585#M129702</guid>
      <dc:creator>rhinomike</dc:creator>
      <dc:date>2018-07-27T01:07:49Z</dc:date>
    </item>
  </channel>
</rss>

