<?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: Form a single statistics from two different sources on common parameters in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Form-a-single-statistics-from-two-different-sources-on-common/m-p/94213#M24269</link>
    <description>&lt;P&gt;What do you mean by "match or no match"? What rule is there for this?&lt;/P&gt;</description>
    <pubDate>Fri, 11 Oct 2013 10:44:11 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2013-10-11T10:44:11Z</dc:date>
    <item>
      <title>Form a single statistics from two different sources on common parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Form-a-single-statistics-from-two-different-sources-on-common/m-p/94212#M24268</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I am using two different sources, for e.g.source1 and source2, which contains different numeric error on same timestamps.&lt;BR /&gt;
for e.g.&lt;/P&gt;

&lt;P&gt;Source1: 03:43:15.780 errorvalue=202&lt;/P&gt;

&lt;P&gt;Source2: 03:43:15.780 errorvalue=222&lt;/P&gt;

&lt;P&gt;I want to get the statistics as a combination of both the sources where the Timestamp is a common column, second column containing the error string from source1, third column containing error string from source2 and third giving match or no match clause.&lt;/P&gt;

&lt;P&gt;such as&lt;/P&gt;

&lt;P&gt;Time Stamp           source1      source2    match&lt;/P&gt;

&lt;P&gt;03:43:15.780          202         222       yes&lt;/P&gt;

&lt;P&gt;Please help&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2013 07:02:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Form-a-single-statistics-from-two-different-sources-on-common/m-p/94212#M24268</guid>
      <dc:creator>harshal_chakran</dc:creator>
      <dc:date>2013-10-11T07:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Form a single statistics from two different sources on common parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Form-a-single-statistics-from-two-different-sources-on-common/m-p/94213#M24269</link>
      <description>&lt;P&gt;What do you mean by "match or no match"? What rule is there for this?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2013 10:44:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Form-a-single-statistics-from-two-different-sources-on-common/m-p/94213#M24269</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-10-11T10:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Form a single statistics from two different sources on common parameters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Form-a-single-statistics-from-two-different-sources-on-common/m-p/94214#M24270</link>
      <description>&lt;P&gt;I'll make a couple of assumptions:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;The &lt;STRONG&gt;errorvalue&lt;/STRONG&gt; field has the same name in both sources&lt;/LI&gt;
&lt;LI&gt;The match or no match clause means you want to know if the errorvalue from source1 matches the errorvalue from source2&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;If these are both correct, try a search like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=source1 source=source2 errorvalue=* | eval source1=if(source=source1,errorvalue,null()) | eval source2=if(source=source2,errorvalue,null()) | stats count by _time source1 source2 | eval match=if(source1=source2,"yes","no") | fields - count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm sure there is a more elegant way of writing this search, but this should do what you want.    &lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2013 12:17:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Form-a-single-statistics-from-two-different-sources-on-common/m-p/94214#M24270</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2013-10-11T12:17:40Z</dc:date>
    </item>
  </channel>
</rss>

