<?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 filter out the list of hosts that are in the lookup but not in my search result? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-the-list-of-hosts-that-are-in-the-lookup-but/m-p/318809#M95341</link>
    <description>&lt;P&gt;the set command can help you, i think. your question didn't post the search query, make sure you use the 101 010 code button to format it properly.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|set diff [search 1] [|inputlookup hosts_list.csv]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.0/SearchReference/Set"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.0/SearchReference/Set&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2017 18:55:12 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2017-10-19T18:55:12Z</dc:date>
    <item>
      <title>How to filter out the list of hosts that are in the lookup but not in my search result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-the-list-of-hosts-that-are-in-the-lookup-but/m-p/318807#M95339</link>
      <description>&lt;P&gt;I have a query as follows which displays the list of hosts and their host details as follows &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host    field_A   field_B    field_C
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I have an Excel sheet which I'm trying to use as a lookup "hosts_list.csv"&lt;/P&gt;

&lt;P&gt;Now I am trying to filter out the list of hosts that are in the lookup but not in my query result. &lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 18:47:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-the-list-of-hosts-that-are-in-the-lookup-but/m-p/318807#M95339</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2017-10-19T18:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out the list of hosts that are in the lookup but not in my search result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-the-list-of-hosts-that-are-in-the-lookup-but/m-p/318808#M95340</link>
      <description>&lt;P&gt;Hello, Can you share your search query?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 18:52:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-the-list-of-hosts-that-are-in-the-lookup-but/m-p/318808#M95340</guid>
      <dc:creator>lloydknight</dc:creator>
      <dc:date>2017-10-19T18:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out the list of hosts that are in the lookup but not in my search result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-the-list-of-hosts-that-are-in-the-lookup-but/m-p/318809#M95341</link>
      <description>&lt;P&gt;the set command can help you, i think. your question didn't post the search query, make sure you use the 101 010 code button to format it properly.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|set diff [search 1] [|inputlookup hosts_list.csv]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.0/SearchReference/Set"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.0/SearchReference/Set&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 18:55:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-the-list-of-hosts-that-are-in-the-lookup-but/m-p/318809#M95341</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-10-19T18:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out the list of hosts that are in the lookup but not in my search result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-the-list-of-hosts-that-are-in-the-lookup-but/m-p/318810#M95342</link>
      <description>&lt;P&gt;and should this not work, just read this answer &lt;A href="https://answers.splunk.com/answers/73268/search-for-hosts-in-a-lookup-but-not-in-splunk.html"&gt;https://answers.splunk.com/answers/73268/search-for-hosts-in-a-lookup-but-not-in-splunk.html&lt;/A&gt; to get a different approach to make it work &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 19:00:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-the-list-of-hosts-that-are-in-the-lookup-but/m-p/318810#M95342</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2017-10-19T19:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out the list of hosts that are in the lookup but not in my search result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-the-list-of-hosts-that-are-in-the-lookup-but/m-p/318811#M95343</link>
      <description>&lt;P&gt;Hi pavanae,&lt;BR /&gt;
try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
| eval host=upper(host)
| stats count by host
| append [ | inputlookup host_lookup.csv | eval host=upper(host), count=0 | fields host count ]
| stats sum(count) AS Total by host
| where Total=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in this way you have the list of the hosts from your lookup that doesn't match in the main search.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 12:19:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-the-list-of-hosts-that-are-in-the-lookup-but/m-p/318811#M95343</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-10-20T12:19:48Z</dc:date>
    </item>
  </channel>
</rss>

