<?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 inputlookup a csv file which contains only the hostnames and get the field values of A,b and C? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-inputlookup-a-csv-file-which-contains-only-the-hostnames/m-p/353682#M104673</link>
    <description>&lt;P&gt;Is this what you’re looking for?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[| inputlookup hosts.csv host as Host | fields host | format ] | stats values(a) by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 15 Mar 2018 01:43:14 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2018-03-15T01:43:14Z</dc:date>
    <item>
      <title>How to inputlookup a csv file which contains only the hostnames and get the field values of A,b and C?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-inputlookup-a-csv-file-which-contains-only-the-hostnames/m-p/353680#M104671</link>
      <description>&lt;P&gt;I have a lookup file which contains a list of hostnames under the field Host like below &lt;/P&gt;

&lt;P&gt;Host&lt;BR /&gt;
abd&lt;BR /&gt;
addf&lt;BR /&gt;
fdfs&lt;/P&gt;

&lt;P&gt;Now how can I get the field values for those hosts in lookup from splunk for A,B and C like below&lt;/P&gt;

&lt;P&gt;Host   A    B     C&lt;/P&gt;

&lt;P&gt;I am trying to find a simplified way if there is any in splunk instead of searching manually in splunk like below for each host &lt;/P&gt;

&lt;P&gt;Host="chdg" OR Host="jkhgsdjh"........ | stats values (A), values(B), values(C) by Host&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 21:29:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-inputlookup-a-csv-file-which-contains-only-the-hostnames/m-p/353680#M104671</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2018-03-14T21:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to inputlookup a csv file which contains only the hostnames and get the field values of A,b and C?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-inputlookup-a-csv-file-which-contains-only-the-hostnames/m-p/353681#M104672</link>
      <description>&lt;P&gt;@pavanae, you might have to add more details on what you need. Whether you do not want to write the &lt;CODE&gt;Host names in base search&lt;/CODE&gt; or &lt;CODE&gt;fields names in stats functions&lt;/CODE&gt;? Try the following and confirm:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_base_search_with_index_and_sourcetype&amp;gt; [| inputlookup &amp;lt;yourCSVFile&amp;gt;.csv | table Host]
| stats values(*) as * by Host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please add more details also the context of what field names are and their corresponding value.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 22:03:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-inputlookup-a-csv-file-which-contains-only-the-hostnames/m-p/353681#M104672</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-03-14T22:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to inputlookup a csv file which contains only the hostnames and get the field values of A,b and C?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-inputlookup-a-csv-file-which-contains-only-the-hostnames/m-p/353682#M104673</link>
      <description>&lt;P&gt;Is this what you’re looking for?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[| inputlookup hosts.csv host as Host | fields host | format ] | stats values(a) by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Mar 2018 01:43:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-inputlookup-a-csv-file-which-contains-only-the-hostnames/m-p/353682#M104673</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2018-03-15T01:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to inputlookup a csv file which contains only the hostnames and get the field values of A,b and C?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-inputlookup-a-csv-file-which-contains-only-the-hostnames/m-p/353683#M104674</link>
      <description>&lt;P&gt;Yes. Thank you. Although there is a small type on the query and corrected below :-&lt;/P&gt;

&lt;P&gt;[| inputlookup hosts.csv | rename Host as host | fields host | format ] | stats values(a) by host&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 13:52:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-inputlookup-a-csv-file-which-contains-only-the-hostnames/m-p/353683#M104674</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2018-03-15T13:52:23Z</dc:date>
    </item>
  </channel>
</rss>

