<?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 do you compare two results? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396873#M6998</link>
    <description>&lt;P&gt;@btawiah-can you extract the filed that has location from your raw logs? If not then you will have to provide a log sample.&lt;BR /&gt;
Once you extract the field say loc , the query can be something like this-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |inputlookup maintable.csv| join type=outer location[search index=* | rename loc as location| fields source]| where ISNULL(source)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 02 Apr 2019 16:38:59 GMT</pubDate>
    <dc:creator>Vijeta</dc:creator>
    <dc:date>2019-04-02T16:38:59Z</dc:date>
    <item>
      <title>How do you compare two results?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396872#M6997</link>
      <description>&lt;P&gt;I have a table(main table).csv with field location.&lt;/P&gt;

&lt;P&gt;I have raw logs that includes field location&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;main table.csv
location_field
A
B
C

Raw logs 
location_field
A 
B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please, I need help with a query that will check raw logs against main table and give a result of C missing&lt;/P&gt;

&lt;P&gt;search result should return C&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 16:26:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396872#M6997</guid>
      <dc:creator>btawiah</dc:creator>
      <dc:date>2019-04-02T16:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do you compare two results?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396873#M6998</link>
      <description>&lt;P&gt;@btawiah-can you extract the filed that has location from your raw logs? If not then you will have to provide a log sample.&lt;BR /&gt;
Once you extract the field say loc , the query can be something like this-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |inputlookup maintable.csv| join type=outer location[search index=* | rename loc as location| fields source]| where ISNULL(source)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Apr 2019 16:38:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396873#M6998</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-04-02T16:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do you compare two results?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396874#M6999</link>
      <description>&lt;P&gt;@Vijeta i actually updated the question. I dont have to extract fields because that already exist. I only need to get the difference and output the one from raw logs since that is not in the main table location field. &lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 16:50:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396874#M6999</guid>
      <dc:creator>btawiah</dc:creator>
      <dc:date>2019-04-02T16:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do you compare two results?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396875#M7000</link>
      <description>&lt;P&gt;@btawiah Try running this query, write the name of your index instead of "yourindexname"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  |inputlookup maintable.csv| join type=outer location_field[search index="yourindexname"| fields source]| where ISNULL(source)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Apr 2019 16:57:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396875#M7000</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-04-02T16:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do you compare two results?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396876#M7001</link>
      <description>&lt;P&gt;I got it done.  Thanks&lt;BR /&gt;
| inputlookup main_table.csv &lt;BR /&gt;
| fields location&lt;BR /&gt;
| eval count=0 &lt;BR /&gt;
| append &lt;BR /&gt;
    [ search index=someindex* &lt;BR /&gt;
    | fields location&lt;BR /&gt;
    | stats count BY location ] &lt;BR /&gt;
| stats sum(count)  by location &lt;BR /&gt;
| where count= 0&lt;/P&gt;

&lt;P&gt;Whenever results return 0 that means those locations are not in main table &lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 16:28:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396876#M7001</guid>
      <dc:creator>btawiah</dc:creator>
      <dc:date>2019-04-03T16:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do you compare two results?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396877#M7002</link>
      <description>&lt;P&gt;I got it done. Thanks&lt;BR /&gt;
| inputlookup main_table.csv &lt;BR /&gt;
| fields location&lt;BR /&gt;
| eval count=0 &lt;BR /&gt;
| append &lt;BR /&gt;
[ search index=someindex* &lt;BR /&gt;
| fields location&lt;BR /&gt;
| stats count BY location ] &lt;BR /&gt;
| stats sum(count) AS missing by location &lt;BR /&gt;
| where missing= 0&lt;/P&gt;

&lt;P&gt;Whenever results return 0 that means those locations are not in main table &lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 16:28:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-you-compare-two-results/m-p/396877#M7002</guid>
      <dc:creator>btawiah</dc:creator>
      <dc:date>2019-04-03T16:28:27Z</dc:date>
    </item>
  </channel>
</rss>

