<?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 exclude Host using Inputlookup? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-Host-using-Inputlookup/m-p/355456#M64972</link>
    <description>&lt;P&gt;Change the subsearch to output only the server name for the servers with status N, and rename the field name to whatever the field will be called on the other index...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[|inputlookup serverBP.csv | where Status=="N"| table Servers | rename Servers as host]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can see what the output of the implicit format command will be -- that is, what will be returned by the square brackets -- by running the search independently, and piping it to the explicit format command....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |inputlookup serverBP.csv | where Status=="N"| table Servers | rename Servers as host | format
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...which in this case will probably look like... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(host="server3")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 16 Jun 2017 11:21:05 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-06-16T11:21:05Z</dc:date>
    <item>
      <title>How to exclude Host using Inputlookup?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-Host-using-Inputlookup/m-p/355455#M64971</link>
      <description>&lt;P&gt;index=bp_prod NOT ([|inputlookup serverBP.csv|fields Servers Status |where Status=="N"] ) |eventstats count as "totalCount" | eventstats count as "choiceCount" by host| eval percent=(choiceCount/totalCount)*100 | stats values(choiceCount) as Count , values(percent) as Percentage by host&lt;/P&gt;

&lt;P&gt;In my serverBP.csv i have following coloumn:&lt;/P&gt;

&lt;P&gt;Servers Status&lt;/P&gt;

&lt;P&gt;server1  Y&lt;BR /&gt;
server2  Y&lt;BR /&gt;
server3  N&lt;/P&gt;

&lt;P&gt;I have to exclude server 3 in my query &lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2017 07:16:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-Host-using-Inputlookup/m-p/355455#M64971</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2017-06-16T07:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude Host using Inputlookup?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-Host-using-Inputlookup/m-p/355456#M64972</link>
      <description>&lt;P&gt;Change the subsearch to output only the server name for the servers with status N, and rename the field name to whatever the field will be called on the other index...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[|inputlookup serverBP.csv | where Status=="N"| table Servers | rename Servers as host]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can see what the output of the implicit format command will be -- that is, what will be returned by the square brackets -- by running the search independently, and piping it to the explicit format command....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |inputlookup serverBP.csv | where Status=="N"| table Servers | rename Servers as host | format
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...which in this case will probably look like... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(host="server3")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Jun 2017 11:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-exclude-Host-using-Inputlookup/m-p/355456#M64972</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-16T11:21:05Z</dc:date>
    </item>
  </channel>
</rss>

