<?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: How to compare events from two sources to find outliers in data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187061#M53915</link>
    <description>&lt;P&gt;May be something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=source1 | eval source1Data=Field1."##".Field2."##"...&amp;lt;&amp;lt;all 10 fields concatenated&amp;gt;&amp;gt;."##".Field10 | appendcols [search source=source2 | eval source2Data=Field1."##".Field2."##"...&amp;lt;&amp;lt;all 10 fields concatenated&amp;gt;&amp;gt;."##".Field10]
| eval result=if(source1Data=source2Data,"Matched","Unmatched")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 19 Aug 2014 18:40:15 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-08-19T18:40:15Z</dc:date>
    <item>
      <title>How to compare events from two sources to find outliers in data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187058#M53912</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to compare events from two sources to show where the outliers are (they "should" be the same but we know that there are discrepancies.&lt;/P&gt;

&lt;P&gt;I can compare "number of rows/events" easily with a "chart count by source" command, but I also want to check the integrity of the field values.&lt;/P&gt;

&lt;P&gt;Basically, each event has 10 fields (same ten fields in each source). How do I check that they are the same, and return some kind of message/raw event/field value if they are not the same?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 15:52:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187058#M53912</guid>
      <dc:creator>bcusick</dc:creator>
      <dc:date>2014-08-19T15:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare events from two sources to find outliers in data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187059#M53913</link>
      <description>&lt;P&gt;Does both sources have timestamp and do they differ? What should be the order of rows/events for field comparison;first row of source1 with first row of source2?? Are field names static?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 15:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187059#M53913</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-19T15:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare events from two sources to find outliers in data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187060#M53914</link>
      <description>&lt;P&gt;This is for reporting to regulators, so everything should be EXACTLY the same. Same timestamp, same field order, etc. I want to be able to check if any fieldname is different (I can pivot on field TRANSACTION_ID) for everything else. All field names static, and yes, If row numbers are the same (which they should be) I should be able to compare row1.source1 to row1.source2&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 16:19:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187060#M53914</guid>
      <dc:creator>bcusick</dc:creator>
      <dc:date>2014-08-19T16:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare events from two sources to find outliers in data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187061#M53915</link>
      <description>&lt;P&gt;May be something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=source1 | eval source1Data=Field1."##".Field2."##"...&amp;lt;&amp;lt;all 10 fields concatenated&amp;gt;&amp;gt;."##".Field10 | appendcols [search source=source2 | eval source2Data=Field1."##".Field2."##"...&amp;lt;&amp;lt;all 10 fields concatenated&amp;gt;&amp;gt;."##".Field10]
| eval result=if(source1Data=source2Data,"Matched","Unmatched")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Aug 2014 18:40:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187061#M53915</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-19T18:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare events from two sources to find outliers in data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187062#M53916</link>
      <description>&lt;P&gt;This looks like it will work. Will provide an update tomorrow. Will this know to compare source1 event1 with source2 event1?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 21:13:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187062#M53916</guid>
      <dc:creator>bcusick</dc:creator>
      <dc:date>2014-08-19T21:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare events from two sources to find outliers in data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187063#M53917</link>
      <description>&lt;P&gt;Since I used appendcols, it will compare source1 event1 with source2 event1. It would fail for the cases no of rows differ in the sources.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 21:57:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187063#M53917</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-19T21:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare events from two sources to find outliers in data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187064#M53918</link>
      <description>&lt;P&gt;This keeps telling me I have mismatched "]" but I checked multiple times to ensure it's correct. Could the fact that my fields contain "." and "-" have anything to do with this?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2014 19:30:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187064#M53918</guid>
      <dc:creator>bcusick</dc:creator>
      <dc:date>2014-08-20T19:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare events from two sources to find outliers in data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187065#M53919</link>
      <description>&lt;P&gt;Can you post your query? and may be some sample data?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2014 20:35:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187065#M53919</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-20T20:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare events from two sources to find outliers in data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187066#M53920</link>
      <description>&lt;P&gt;Would it be possible to do this with raw data? Meaning using the field "_raw"? This runs, but results are incorrect due to the sources being different..Here's that example:&lt;/P&gt;

&lt;P&gt;source="D:\Bluesheets\ExtractFromFES.csv"  eval FESdata=_raw | appendcols [search source="D:\Bluesheets\SentToReg.csv" | eval Regdata=_raw] | eval result=if(FESdata=Regdata,"Matched","Unmatched") | table result&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/187066#M53920</guid>
      <dc:creator>bcusick</dc:creator>
      <dc:date>2020-09-28T17:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare events from two sources to find outliers in data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/509946#M142558</link>
      <description>&lt;P&gt;Ok it's maybe a bit late … but for future searchers the other answers are to complicated, no help or wrong&lt;BR /&gt;```&lt;BR /&gt;index=main sourcetype="test2" | stats values(source) as sources by _raw | eval sources=if(mvcount(sources)&amp;gt;1,"match","no match")&lt;BR /&gt;```&lt;BR /&gt;Beware of linecounts&amp;gt;1 in the main search, this could create false "no match"&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 04:41:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-events-from-two-sources-to-find-outliers-in-data/m-p/509946#M142558</guid>
      <dc:creator>SierraX</dc:creator>
      <dc:date>2020-07-20T04:41:02Z</dc:date>
    </item>
  </channel>
</rss>

