<?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 Add a lookup csv colum information to the results of a inputlookup search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Add-a-lookup-csv-colum-information-to-the-results-of-a/m-p/83554#M21285</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a lookup search that works fine but I would like to add information from the lookup table that the source log does not have. let me explain:&lt;/P&gt;

&lt;P&gt;example of lookup table called ipwatchlist.csv:&lt;/P&gt;

&lt;P&gt;category      ip_address isbad &lt;/P&gt;

&lt;P&gt;Fake-AV 109.235.251.49  TRUE&lt;/P&gt;

&lt;P&gt;Fake-AV 109.235.251.51  TRUE&lt;/P&gt;

&lt;P&gt;This is my search:&lt;BR /&gt;
sourcetype=firewall [|inputlookup ipwatchlist.csv | fields ip_address | rename ip_address as dest_ip] | stats count by src_ip dest_ip | sort desc - count&lt;/P&gt;

&lt;P&gt;This gives me a result of:&lt;/P&gt;

&lt;P&gt;src_ip               dest_ip             count&lt;/P&gt;

&lt;P&gt;192.168.1.1        109.235.251.49         50&lt;/P&gt;

&lt;P&gt;Now I would like to add the field in the ipwatchlist.csv of category to see what is the IP associated with, I would like to get a result like: &lt;/P&gt;

&lt;P&gt;src_ip               dest_ip         Category      count&lt;/P&gt;

&lt;P&gt;192.168.1.1        109.235.251.49     Fake-AV       50&lt;/P&gt;

&lt;P&gt;Does anyone has an idea how to do this?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 11:28:22 GMT</pubDate>
    <dc:creator>Mannyi31</dc:creator>
    <dc:date>2020-09-28T11:28:22Z</dc:date>
    <item>
      <title>Add a lookup csv colum information to the results of a inputlookup search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-lookup-csv-colum-information-to-the-results-of-a/m-p/83554#M21285</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a lookup search that works fine but I would like to add information from the lookup table that the source log does not have. let me explain:&lt;/P&gt;

&lt;P&gt;example of lookup table called ipwatchlist.csv:&lt;/P&gt;

&lt;P&gt;category      ip_address isbad &lt;/P&gt;

&lt;P&gt;Fake-AV 109.235.251.49  TRUE&lt;/P&gt;

&lt;P&gt;Fake-AV 109.235.251.51  TRUE&lt;/P&gt;

&lt;P&gt;This is my search:&lt;BR /&gt;
sourcetype=firewall [|inputlookup ipwatchlist.csv | fields ip_address | rename ip_address as dest_ip] | stats count by src_ip dest_ip | sort desc - count&lt;/P&gt;

&lt;P&gt;This gives me a result of:&lt;/P&gt;

&lt;P&gt;src_ip               dest_ip             count&lt;/P&gt;

&lt;P&gt;192.168.1.1        109.235.251.49         50&lt;/P&gt;

&lt;P&gt;Now I would like to add the field in the ipwatchlist.csv of category to see what is the IP associated with, I would like to get a result like: &lt;/P&gt;

&lt;P&gt;src_ip               dest_ip         Category      count&lt;/P&gt;

&lt;P&gt;192.168.1.1        109.235.251.49     Fake-AV       50&lt;/P&gt;

&lt;P&gt;Does anyone has an idea how to do this?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:28:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-lookup-csv-colum-information-to-the-results-of-a/m-p/83554#M21285</guid>
      <dc:creator>Mannyi31</dc:creator>
      <dc:date>2020-09-28T11:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Add a lookup csv colum information to the results of a inputlookup search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-lookup-csv-colum-information-to-the-results-of-a/m-p/83555#M21286</link>
      <description>&lt;P&gt;Well you already have ipwatchlist.csv as a lookup table to just use that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=firewall [|inputlookup ipwatchlist.csv | fields ip_address | rename ip_address as dest_ip] | stats count by src_ip dest_ip | sort desc - count | lookup ipwatchlist.csv dest_ip OUTPUT Category | table src_ip dest_ip Category count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Mar 2012 16:12:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-lookup-csv-colum-information-to-the-results-of-a/m-p/83555#M21286</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-03-02T16:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Add a lookup csv colum information to the results of a inputlookup search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-lookup-csv-colum-information-to-the-results-of-a/m-p/83556#M21287</link>
      <description>&lt;P&gt;Thanks Ayn, Your answer worked after I made some modifications and below is the end result:&lt;/P&gt;

&lt;P&gt;sourcetype=firewall [|inputlookup ipwatchlist.csv | fields ip_address | rename ip_address as dest_ip] | stats count by src_ip dest_ip | sort desc - count | lookup ipwatchlist ip_address as dest_ip OUTPUT category | table src_ip dest_ip category count&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:28:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-lookup-csv-colum-information-to-the-results-of-a/m-p/83556#M21287</guid>
      <dc:creator>Mannyi31</dc:creator>
      <dc:date>2020-09-28T11:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Add a lookup csv colum information to the results of a inputlookup search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-a-lookup-csv-colum-information-to-the-results-of-a/m-p/83557#M21288</link>
      <description>&lt;P&gt;Awesome. Could you please mark my answer as accepted? Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Mar 2012 15:34:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-a-lookup-csv-colum-information-to-the-results-of-a/m-p/83557#M21288</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-03-05T15:34:50Z</dc:date>
    </item>
  </channel>
</rss>

