<?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 correlate field values between an index and a lookup file? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-correlate-field-values-between-an-index-and-a-lookup-file/m-p/417866#M73746</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;
You could usee the inputcsv command. The syntax would be  &lt;CODE&gt;sourcetype="device_assets" | inputcsv current_assets.csv&lt;/CODE&gt;&lt;BR /&gt;
Documentation on this command &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Inputcsv"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Inputcsv&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Jan 2019 03:46:20 GMT</pubDate>
    <dc:creator>bangalorep</dc:creator>
    <dc:date>2019-01-23T03:46:20Z</dc:date>
    <item>
      <title>How to correlate field values between an index and a lookup file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-correlate-field-values-between-an-index-and-a-lookup-file/m-p/417865#M73745</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I have a CSV ( &lt;CODE&gt;current_assets.csv&lt;/CODE&gt;) with fields &lt;CODE&gt;device_name&lt;/CODE&gt; and &lt;CODE&gt;ip&lt;/CODE&gt; (and tons of values for them). Here is an example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;device_name        ip
  router1     122.145.11.2
  laptop2     11.121.44.55
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I search my index ( &lt;CODE&gt;sourcetype="device_assets"&lt;/CODE&gt;) for the CSV IPs and return whether or not each IP is found within the index?&lt;/P&gt;

&lt;P&gt;An example result would be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;device_name        ip        found
  router1     122.145.11.2    Yes
  laptop2     11.121.44.55    No
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Important note: The solution CANNOT use &lt;CODE&gt;|join&lt;/CODE&gt; command because this is very intensive/slow for my current deployment.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 20:28:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-correlate-field-values-between-an-index-and-a-lookup-file/m-p/417865#M73745</guid>
      <dc:creator>russell120</dc:creator>
      <dc:date>2019-01-22T20:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate field values between an index and a lookup file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-correlate-field-values-between-an-index-and-a-lookup-file/m-p/417866#M73746</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
You could usee the inputcsv command. The syntax would be  &lt;CODE&gt;sourcetype="device_assets" | inputcsv current_assets.csv&lt;/CODE&gt;&lt;BR /&gt;
Documentation on this command &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Inputcsv"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Inputcsv&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 03:46:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-correlate-field-values-between-an-index-and-a-lookup-file/m-p/417866#M73746</guid>
      <dc:creator>bangalorep</dc:creator>
      <dc:date>2019-01-23T03:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate field values between an index and a lookup file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-correlate-field-values-between-an-index-and-a-lookup-file/m-p/417867#M73747</link>
      <description>&lt;P&gt;@russell120 ,&lt;/P&gt;

&lt;P&gt;Try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup current_assets.csv|eval source="lookup" 
| append [search index="your index" sourcetype="device_assets"|stats count by ip|fields ip|eval source="events"]
| stats values(device_name) as device_name , values(source) as source by ip|where mvcount(source) &amp;gt;1 OR source="lookup"
| eval found=if(mvcount(source)&amp;gt;1,"Yes","No")|fields - source
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Jan 2019 03:47:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-correlate-field-values-between-an-index-and-a-lookup-file/m-p/417867#M73747</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-01-23T03:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate field values between an index and a lookup file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-correlate-field-values-between-an-index-and-a-lookup-file/m-p/417868#M73748</link>
      <description>&lt;P&gt;This returns a "Error in 'inputcsv' command: This command must be the first command of a search" error.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 13:48:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-correlate-field-values-between-an-index-and-a-lookup-file/m-p/417868#M73748</guid>
      <dc:creator>russell120</dc:creator>
      <dc:date>2019-01-23T13:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to correlate field values between an index and a lookup file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-correlate-field-values-between-an-index-and-a-lookup-file/m-p/417869#M73749</link>
      <description>&lt;P&gt;This works, thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jan 2019 16:38:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-correlate-field-values-between-an-index-and-a-lookup-file/m-p/417869#M73749</guid>
      <dc:creator>russell120</dc:creator>
      <dc:date>2019-01-23T16:38:45Z</dc:date>
    </item>
  </channel>
</rss>

