<?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: compare results in different days in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388322#M171036</link>
    <description>&lt;P&gt;Hi @stevesmith08,&lt;/P&gt;

&lt;P&gt;You can use something like that if you want to add the date field : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=“scan_results” date=“2019-05-27”  OR date=“2019-05-28”  
| stats dc(date) as condition values(date) as date by host, port, state 
| where condition &amp;lt;2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2019 07:22:02 GMT</pubDate>
    <dc:creator>DavidHourani</dc:creator>
    <dc:date>2019-05-28T07:22:02Z</dc:date>
    <item>
      <title>compare results in different days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388320#M171034</link>
      <description>&lt;P&gt;Good day!  I have two requests for different dates.  I need to compare the results of the queries.&lt;/P&gt;

&lt;P&gt;The following comparison command works correctly:&lt;BR /&gt;
| set diff&lt;BR /&gt;
[search sourcetype=“scan_results” date=“2019-05-27” | table host, port, state]&lt;BR /&gt;
[search sourcetype=“scan_results” date=“2019-05-28” | table host, port, state]&lt;/P&gt;

&lt;P&gt;But I need to add a field “date” to each result.&lt;/P&gt;

&lt;P&gt;In the end, I want to track changes in the status of ports for different scan dates.&lt;/P&gt;

&lt;P&gt;Could you help me, please?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:41:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388320#M171034</guid>
      <dc:creator>stevesmith08</dc:creator>
      <dc:date>2020-09-30T00:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: compare results in different days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388321#M171035</link>
      <description>&lt;P&gt;hi Steve&lt;BR /&gt;
You already have got the "date" field in the event. You could add it straight away or am i not understanding the issue correctly?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| set diff
[search sourcetype=“scan_results” date=“2019-05-27” | table host, port, state, date]
[search sourcetype=“scan_results” date=“2019-05-28” | table host, port, state, date]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 07:19:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388321#M171035</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-28T07:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: compare results in different days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388322#M171036</link>
      <description>&lt;P&gt;Hi @stevesmith08,&lt;/P&gt;

&lt;P&gt;You can use something like that if you want to add the date field : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=“scan_results” date=“2019-05-27”  OR date=“2019-05-28”  
| stats dc(date) as condition values(date) as date by host, port, state 
| where condition &amp;lt;2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 07:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388322#M171036</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-28T07:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: compare results in different days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388323#M171037</link>
      <description>&lt;P&gt;If you explicitly specify the date in each subquery, the results they return differ in this field.&lt;/P&gt;

&lt;P&gt;I need to compare only fields “host”, “port”, “state”&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 07:24:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388323#M171037</guid>
      <dc:creator>stevesmith08</dc:creator>
      <dc:date>2019-05-28T07:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: compare results in different days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388324#M171038</link>
      <description>&lt;P&gt;Thanks! it works correctly&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 07:27:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388324#M171038</guid>
      <dc:creator>stevesmith08</dc:creator>
      <dc:date>2019-05-28T07:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: compare results in different days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388325#M171039</link>
      <description>&lt;P&gt;you're welcome !&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 07:30:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-results-in-different-days/m-p/388325#M171039</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-28T07:30:03Z</dc:date>
    </item>
  </channel>
</rss>

