<?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 Problem with set command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-set-command/m-p/56570#M179881</link>
    <description>&lt;P&gt;I'm trying to get use the set command to monitor differences between two sets of DNS records.&lt;/P&gt;

&lt;P&gt;I've looked through the documentation and previous questions on the topic and still can't make it work.&lt;/P&gt;

&lt;P&gt;This search has 10 results:&lt;/P&gt;

&lt;P&gt;index=dns_processed earliest=-8d | top Hostname | fields Hostname&lt;/P&gt;

&lt;P&gt;This search has 49 results:&lt;/P&gt;

&lt;P&gt;index=dns_processed earliest=-8d | fields Hostname&lt;/P&gt;

&lt;P&gt;But for some reason, this search has 0 results:&lt;/P&gt;

&lt;P&gt;set union [search index=dns_processed earliest=-8d | top Hostname | fields Hostname] [search index=dns_processed earliest=-8d | fields Hostname]&lt;/P&gt;

&lt;P&gt;Any hints?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:55:21 GMT</pubDate>
    <dc:creator>megancarney</dc:creator>
    <dc:date>2020-09-28T12:55:21Z</dc:date>
    <item>
      <title>Problem with set command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-set-command/m-p/56570#M179881</link>
      <description>&lt;P&gt;I'm trying to get use the set command to monitor differences between two sets of DNS records.&lt;/P&gt;

&lt;P&gt;I've looked through the documentation and previous questions on the topic and still can't make it work.&lt;/P&gt;

&lt;P&gt;This search has 10 results:&lt;/P&gt;

&lt;P&gt;index=dns_processed earliest=-8d | top Hostname | fields Hostname&lt;/P&gt;

&lt;P&gt;This search has 49 results:&lt;/P&gt;

&lt;P&gt;index=dns_processed earliest=-8d | fields Hostname&lt;/P&gt;

&lt;P&gt;But for some reason, this search has 0 results:&lt;/P&gt;

&lt;P&gt;set union [search index=dns_processed earliest=-8d | top Hostname | fields Hostname] [search index=dns_processed earliest=-8d | fields Hostname]&lt;/P&gt;

&lt;P&gt;Any hints?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:55:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-with-set-command/m-p/56570#M179881</guid>
      <dc:creator>megancarney</dc:creator>
      <dc:date>2020-09-28T12:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with set command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-set-command/m-p/56571#M179882</link>
      <description>&lt;P&gt;It's been a while since I've used &lt;CODE&gt;set&lt;/CODE&gt; now, but from what I recall I had similar problems which in the end were due to that internal fields such as &lt;CODE&gt;_time&lt;/CODE&gt; were implicitly returned from the subsearches. So the sets being compared didn't just consist of the field I wanted to check (which in your case would be Hostname), but also of timestamps and various other stuff. I solved it by adding &lt;CODE&gt;| fields -_*&lt;/CODE&gt; at the end of my subsearches. Let me know if this is the problem you're running into as well.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2012 18:07:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-with-set-command/m-p/56571#M179882</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-12-06T18:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with set command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-set-command/m-p/56572#M179883</link>
      <description>&lt;P&gt;Didn't help. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2012 19:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-with-set-command/m-p/56572#M179883</guid>
      <dc:creator>megancarney</dc:creator>
      <dc:date>2012-12-06T19:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with set command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-set-command/m-p/56573#M179884</link>
      <description>&lt;P&gt;Okay, the problem was stupid-simple.  The set command needs a pipe before it or splunk doesn't interpret 'set' as a command.&lt;/P&gt;

&lt;P&gt;So:&lt;BR /&gt;
| set union [search index=dns_processed earliest=-8d | top Hostname | fields Hostname] [search index=dns_processed earliest=-8d | fields Hostname]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:58:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-with-set-command/m-p/56573#M179884</guid>
      <dc:creator>megancarney</dc:creator>
      <dc:date>2020-09-28T12:58:37Z</dc:date>
    </item>
  </channel>
</rss>

