<?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 simple correlation in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32991#M6965</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
Basically, I'm trying to correlate 2 datasources with 2 fields. For example, I have datasource1 and datasource2 then I need to be able to return all field1 with corresponding field2. But I also need to validate if field1 with corresponding field2 exists in datasource2 before it is dispalyed or returned. Finally show in a graph which fields exists in both datasources and which fields do not exists. I tried the ff:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=* field1=* field2=2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;also tried join and sub query approach but no luck&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=datasource1 | join field1 [sourcetype=datasource2]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please point me in the right direction. TIA.&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2013 13:57:24 GMT</pubDate>
    <dc:creator>adomila</dc:creator>
    <dc:date>2013-05-14T13:57:24Z</dc:date>
    <item>
      <title>simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32991#M6965</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Basically, I'm trying to correlate 2 datasources with 2 fields. For example, I have datasource1 and datasource2 then I need to be able to return all field1 with corresponding field2. But I also need to validate if field1 with corresponding field2 exists in datasource2 before it is dispalyed or returned. Finally show in a graph which fields exists in both datasources and which fields do not exists. I tried the ff:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=* field1=* field2=2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;also tried join and sub query approach but no luck&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=datasource1 | join field1 [sourcetype=datasource2]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please point me in the right direction. TIA.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2013 13:57:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32991#M6965</guid>
      <dc:creator>adomila</dc:creator>
      <dc:date>2013-05-14T13:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32992#M6966</link>
      <description>&lt;P&gt;I think you need to give us more specific details and log samples, because at least I have troubles understanding what exactly you want to achieve and how.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2013 19:52:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32992#M6966</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-05-14T19:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32993#M6967</link>
      <description>&lt;P&gt;Sorry for not being clear. Basically, I'm trying to join 2 datasources by 2 fields. The said 2 fields should be present on each datasource. And those said 2 fields should also exists on the other datasource. In other words; the existence of those said 2 fields should be the joining factor for the 2 datasources. In the end, I should be able to present a list of all existing fields. Something like the ff:&lt;/P&gt;

&lt;P&gt;datasource=abc cp_num=(all_values) ref_num=(all_values)&lt;/P&gt;

&lt;P&gt;datasource=def cp_num=(all_values) ref_num=(all_values)&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;The cp_num and ref_num should have an exact match on both datasources, Something like&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;[abc.cp_num = def.cp_num] AND [abc.ref_num = def.ref_num]&lt;/P&gt;

&lt;P&gt;I tried join with sub-search&lt;/P&gt;

&lt;P&gt;datasource=abc  |  join cp_num=(all values) ref_num=(all_values)  [datasource=def cp_num=(all values) ref_num=(all_values)]&lt;BR /&gt;
But I'm not so sure about this idea &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Btw, I tried to join even with just a single field but I'm getting a limit or max warning/error. Now I'm not sure if this is still feasible?&lt;/P&gt;

&lt;P&gt;I hope I have provide a better detail . . . ?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:54:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32993#M6967</guid>
      <dc:creator>adomila</dc:creator>
      <dc:date>2020-09-28T13:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32994#M6968</link>
      <description>&lt;P&gt;Can splunk handle this?&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2013 14:33:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32994#M6968</guid>
      <dc:creator>adomila</dc:creator>
      <dc:date>2013-05-16T14:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32995#M6969</link>
      <description>&lt;P&gt;Hi, any updates?&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2013 14:45:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32995#M6969</guid>
      <dc:creator>adomila</dc:creator>
      <dc:date>2013-05-19T14:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32996#M6970</link>
      <description>&lt;P&gt;As Ayn said, please provide some real events (mask ip-addresses, usernames etc as needed) and some sketch of how you want the results presented.&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2013 06:48:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32996#M6970</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-05-20T06:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32997#M6971</link>
      <description>&lt;P&gt;Thank you for being patient with my question. Allow me to try again with specific details:&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;datasource = xta cp_num=9996631244 ref_num=333556144&lt;/P&gt;

&lt;P&gt;datasource = xta cp_num=9396631341 ref_num=224556141&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;datasource = mru cp_num=9996631244 ref_num=333556144&lt;/P&gt;

&lt;P&gt;datasource = mru cp_num=9166631243 ref_num=434566143&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Basically, I need to result presented with all the cp_num and/with ref_num on xta that matches on the mru datasource. Somtthing like this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;XTA_MRU MATCHES:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;cp_num=9996631244 ref_num=333556144&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;STRONG&gt;NOT XTA_MRU MATCHES:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;cp_num=9396631341 ref_num=224556144&lt;/P&gt;

&lt;P&gt;cp_num=9166631243 ref_num=434566143&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Please take note that both cp_num and ref_num should be exactly the same match. Kindly let me know if this ok already.Tia.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:56:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32997#M6971</guid>
      <dc:creator>adomila</dc:creator>
      <dc:date>2020-09-28T13:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32998#M6972</link>
      <description>&lt;P&gt;Please allow me to elaborate or clarify. Something like this; in sql&lt;/P&gt;

&lt;P&gt;select cp_num, ref_num from xta and mru where (xta.cp_num = mru.cp_num) AND (xta.ref_num = mru.ref_num)&lt;/P&gt;

&lt;P&gt;so this should return all matching cp_num and/with ref_num. I hope this helps clarify...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:56:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32998#M6972</guid>
      <dc:creator>adomila</dc:creator>
      <dc:date>2020-09-28T13:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32999#M6973</link>
      <description>&lt;P&gt;You could try a subsearch approach&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;datasource=xta [search datasouce=mru | fields + cp_num, ref_num] | table cp_num ref_num
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The inner search (within the square brackets) will be executed first, and return the fields from &lt;CODE&gt;mru&lt;/CODE&gt;. Effectively the search will then be (if there are three events in the &lt;CODE&gt;mru&lt;/CODE&gt; set);&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;datasource=xta ((cp_num=X AND ref_num=Y) OR (cp_num=Z AND ref_num=Q) OR (cp_num=W AND ref_NUM=Y))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So the result will be the events (or what ever you choose to &lt;CODE&gt;table&lt;/CODE&gt;) that match on both fields. However there are some limits (configurable) on how many events can be returned from a subsearch, so this may not be optimal. &lt;/P&gt;

&lt;P&gt;Hope this works as a start, at least.&lt;/P&gt;

&lt;P&gt;/Kristian&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2013 16:09:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/32999#M6973</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-05-21T16:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/33000#M6974</link>
      <description>&lt;P&gt;Many thanks Kristian, I already tried the sub-search approach, I just forgot to mention, it does not work for me as there is a 500k something limitation. Nevertheless, you replied so it means I have convened the problem statement clearly already. Are there any other options/approach available? Or is this considered a splunk limitation? TIA.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2013 14:52:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/33000#M6974</guid>
      <dc:creator>adomila</dc:creator>
      <dc:date>2013-05-22T14:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/33001#M6975</link>
      <description>&lt;P&gt;There is a setting in limits.conf (&lt;CODE&gt;maxresults&lt;/CODE&gt; I believe). It is configurable, but the default limit is probably there for a reason. You could try to change that.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2013 19:42:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/33001#M6975</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-05-24T19:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: simple correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/33002#M6976</link>
      <description>&lt;P&gt;I've tried this but its really slow. Are there any other options?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2013 01:27:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/simple-correlation/m-p/33002#M6976</guid>
      <dc:creator>adomila</dc:creator>
      <dc:date>2013-06-17T01:27:32Z</dc:date>
    </item>
  </channel>
</rss>

