<?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 Event Correlation in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79154#M20024</link>
    <description>&lt;P&gt;I have two events:&lt;/P&gt;

&lt;P&gt;Event 1:&lt;BR /&gt;
transactionId=123 field_x=x_value&lt;/P&gt;

&lt;P&gt;Event 2&lt;BR /&gt;
transactionId=123 status=success&lt;/P&gt;

&lt;P&gt;How can I correlate these two?&lt;BR /&gt;
I want to create a timechart for “field_x” when “status=success”&lt;/P&gt;

&lt;P&gt;So, basically, the search quey is:&lt;BR /&gt;
transactionId field_x | timechart count by field_x&lt;/P&gt;

&lt;P&gt;But I want to get all “field_x” only when status=success.&lt;/P&gt;

&lt;P&gt;So, I guess this is equivalent to SQL IN() construct:&lt;BR /&gt;
SELECT field_x from table where transactionId IN (SELECT transactionId from table where status=success);&lt;/P&gt;

&lt;P&gt;I am trying to do a subsearch like:&lt;BR /&gt;
source="source1" field_x=* transactionId  [search source="source1" AND status=success | fields transactionId] | timechart count by field_x&lt;/P&gt;

&lt;P&gt;Doesn't seem to be working.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 11:57:44 GMT</pubDate>
    <dc:creator>ninadmnaik</dc:creator>
    <dc:date>2020-09-28T11:57:44Z</dc:date>
    <item>
      <title>Event Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79154#M20024</link>
      <description>&lt;P&gt;I have two events:&lt;/P&gt;

&lt;P&gt;Event 1:&lt;BR /&gt;
transactionId=123 field_x=x_value&lt;/P&gt;

&lt;P&gt;Event 2&lt;BR /&gt;
transactionId=123 status=success&lt;/P&gt;

&lt;P&gt;How can I correlate these two?&lt;BR /&gt;
I want to create a timechart for “field_x” when “status=success”&lt;/P&gt;

&lt;P&gt;So, basically, the search quey is:&lt;BR /&gt;
transactionId field_x | timechart count by field_x&lt;/P&gt;

&lt;P&gt;But I want to get all “field_x” only when status=success.&lt;/P&gt;

&lt;P&gt;So, I guess this is equivalent to SQL IN() construct:&lt;BR /&gt;
SELECT field_x from table where transactionId IN (SELECT transactionId from table where status=success);&lt;/P&gt;

&lt;P&gt;I am trying to do a subsearch like:&lt;BR /&gt;
source="source1" field_x=* transactionId  [search source="source1" AND status=success | fields transactionId] | timechart count by field_x&lt;/P&gt;

&lt;P&gt;Doesn't seem to be working.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:57:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79154#M20024</guid>
      <dc:creator>ninadmnaik</dc:creator>
      <dc:date>2020-09-28T11:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Event Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79155#M20025</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere | 
transaction transactionId | 
search status=success | 
timechart count by field_x
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I think you were making it too hard! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 00:20:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79155#M20025</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-06-20T00:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Event Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79156#M20026</link>
      <description>&lt;P&gt;Oh yes, that does make sense. But this isn't working either. Splunk isn't finding any matching events.&lt;/P&gt;

&lt;P&gt;Here's the updated query as per your suggestion.&lt;/P&gt;

&lt;P&gt;source="source1" field_x=* | &lt;BR /&gt;
transaction transactionId | &lt;BR /&gt;
search status=success | &lt;BR /&gt;
timechart count by field_x&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:57:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79156#M20026</guid>
      <dc:creator>ninadmnaik</dc:creator>
      <dc:date>2020-09-28T11:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Event Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79157#M20027</link>
      <description>&lt;P&gt;No, you are right. Updated my query to:&lt;/P&gt;

&lt;P&gt;source="source1" field_x=* OR status=success | &lt;BR /&gt;
transaction transactionId | &lt;BR /&gt;
search status=success | &lt;BR /&gt;
timechart count by field_x&lt;/P&gt;

&lt;P&gt;Now it's giving me the chart. &lt;/P&gt;

&lt;P&gt;However, one little thing. Along with the four values of "field_x" it's also showing a value "NULL". Wonder why is that. &lt;/P&gt;

&lt;P&gt;Will update this when I find out about NULL. &lt;/P&gt;

&lt;P&gt;Please let me know if you have an idea. &lt;/P&gt;

&lt;P&gt;Thanks a bunch for your answer.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:57:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79157#M20027</guid>
      <dc:creator>ninadmnaik</dc:creator>
      <dc:date>2020-09-28T11:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Event Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79158#M20028</link>
      <description>&lt;P&gt;I think that you have some transactions that do not have field_x in them.  Try this&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;source="source1" field_x=* OR status=success | &lt;BR /&gt;
transaction transactionId | &lt;BR /&gt;
search status=success AND field_x="*" | &lt;BR /&gt;
timechart count by field_x&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 01:39:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79158#M20028</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-06-20T01:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Event Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79159#M20029</link>
      <description>&lt;P&gt;No, I take it back. When I said it was working, I missed the following line (bold) in the query:&lt;/P&gt;

&lt;P&gt;source="source1" field_x=* OR status=success | &lt;BR /&gt;
transaction transactionId | &lt;BR /&gt;
&lt;STRONG&gt;search status=success |&lt;/STRONG&gt; &lt;BR /&gt;
timechart count by field_x&lt;/P&gt;

&lt;P&gt;If I add this line "search status=success", I don't get any results. And without checking whether "status=success" I will get all "field_x" values for which "status=failed" as well.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:58:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79159#M20029</guid>
      <dc:creator>ninadmnaik</dc:creator>
      <dc:date>2020-09-28T11:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Event Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79160#M20030</link>
      <description>&lt;P&gt;As per your new suggestion, that won't work, because: &lt;BR /&gt;
&lt;STRONG&gt;search status=success AND field_x="*"&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;For the above to work, both the fields should be in the same logging event right? But they aren't.&lt;BR /&gt;
I have two different logging events as:&lt;/P&gt;

&lt;P&gt;Event 1:&lt;BR /&gt;
transactionId=123 field_x=x_value&lt;/P&gt;

&lt;P&gt;Event 2&lt;BR /&gt;
transactionId=123 status=success&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:58:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79160#M20030</guid>
      <dc:creator>ninadmnaik</dc:creator>
      <dc:date>2020-09-28T11:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Event Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79161#M20031</link>
      <description>&lt;P&gt;What do you get when you just do&lt;/P&gt;

&lt;P&gt;source="source1" field_x=* OR status=success | &lt;BR /&gt;
transaction transactionId&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 18:52:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79161#M20031</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-06-20T18:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Event Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79162#M20032</link>
      <description>&lt;P&gt;The transaction consists of a set of events, all with the same transactionId. The search command applies to the entire transaction, not the individual events. So the AND should be okay.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 18:52:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79162#M20032</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-06-20T18:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Event Correlation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79163#M20033</link>
      <description>&lt;P&gt;Oh yeah, you're right. That did it. Thanks a bunch !!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2012 19:39:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Event-Correlation/m-p/79163#M20033</guid>
      <dc:creator>ninadmnaik</dc:creator>
      <dc:date>2012-06-20T19:39:44Z</dc:date>
    </item>
  </channel>
</rss>

