<?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 how to show added and deleted in set diff in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-show-added-and-deleted-in-set-diff/m-p/263336#M189802</link>
    <description>&lt;P&gt;I am using | set diff to find the names that have been changed yesterday compared to a week using the search as below&lt;/P&gt;

&lt;P&gt;What i am trying to get is to show the ones that have been added and dropped in search it currently gives all together as one list.&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;|     set diff [ search index=infra_service_perf sourcetype="XXX" itemKey ="XXXX" value &amp;gt;= 0.000   earliest=-1d@d latest=@m  | stats count by name | table name ]&lt;BR /&gt;&lt;BR /&gt;
 [ search index=infra_service_perf sourcetype="XXX" itemKey ="XXXX"  value &amp;gt;= 0.000   earliest=-7d@d latest=-1d@d  | stats count by name | table name ]&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 07:30:03 GMT</pubDate>
    <dc:creator>vinay4444</dc:creator>
    <dc:date>2020-09-29T07:30:03Z</dc:date>
    <item>
      <title>how to show added and deleted in set diff</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-show-added-and-deleted-in-set-diff/m-p/263336#M189802</link>
      <description>&lt;P&gt;I am using | set diff to find the names that have been changed yesterday compared to a week using the search as below&lt;/P&gt;

&lt;P&gt;What i am trying to get is to show the ones that have been added and dropped in search it currently gives all together as one list.&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;|     set diff [ search index=infra_service_perf sourcetype="XXX" itemKey ="XXXX" value &amp;gt;= 0.000   earliest=-1d@d latest=@m  | stats count by name | table name ]&lt;BR /&gt;&lt;BR /&gt;
 [ search index=infra_service_perf sourcetype="XXX" itemKey ="XXXX"  value &amp;gt;= 0.000   earliest=-7d@d latest=-1d@d  | stats count by name | table name ]&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:30:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-show-added-and-deleted-in-set-diff/m-p/263336#M189802</guid>
      <dc:creator>vinay4444</dc:creator>
      <dc:date>2020-09-29T07:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to show added and deleted in set diff</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-show-added-and-deleted-in-set-diff/m-p/263337#M189803</link>
      <description>&lt;P&gt;Unfortunately, there is no such option in &lt;CODE&gt;| set&lt;/CODE&gt; command, but you can achieve the same using an append-stats combination, like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=infra_service_perf sourcetype="XXX" itemKey ="XXXX" value &amp;gt;= 0.000 earliest=-1d@d latest=@m | stats count by name | table name | eval Action="Today" | append [ search index=infra_service_perf sourcetype="XXX" itemKey ="XXXX" value &amp;gt;= 0.000 earliest=-7d@d latest=-1d@d | stats count by name | table name | Action="Last7Days" ] | stats values(*) by name | where mvcount(Action)=1 | replace "Today" with "Added" "Last7Days" with "Deleted" in Action
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Oct 2015 21:16:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-show-added-and-deleted-in-set-diff/m-p/263337#M189803</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-10-09T21:16:10Z</dc:date>
    </item>
  </channel>
</rss>

