<?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: Index to lookup match IP address in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Index-to-lookup-match-IP-address-Why-is-quot-target-ip-quot-not/m-p/611675#M13804</link>
    <description>&lt;P&gt;The lookup is failing because there is no 'ip' field in the indexed data to look up.&amp;nbsp; Use the as option to tell &lt;FONT face="courier new,courier"&gt;lookup&lt;/FONT&gt; where to find the field.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| lookup name.csv ip as src OUTPUT target_ip as src_target_ip
| lookup name.csv ip as dest OUTPUT target_ip as dest_target_ip&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2022 20:10:18 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-09-01T20:10:18Z</dc:date>
    <item>
      <title>Index to lookup match IP address- Why is "target_ip" not showing up on table?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Index-to-lookup-match-IP-address-Why-is-quot-target-ip-quot-not/m-p/611670#M13803</link>
      <description>&lt;P&gt;Hello all, Hoping someone may be able to help. I have an internal tool I have an export from in the from of a CSV that has a column named ip. I uploaded this as a inputlookup (name.csv). I verifed I can see the ip information by |inputlookup (name.csv) and the rows of IP addresses show.&lt;/P&gt;
&lt;P&gt;I have a base search that returns data , and I want to see if any of the src, or dest IP's from my search match the IP addresses listed in my name.csv. I keep running into a search, that returns a few thousand events, although I can search the event between src, and dest and it shows without the lookup.&lt;/P&gt;
&lt;P&gt;Currently my search looks like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(index=name1 OR index=name2 OR index=name3) src_ip_country=United States action=allowed

| stats count by  src, dest

| sort count

| reverse

| lookup name.csv ip OUTPUT target_ip

| table target_ip, src, dest&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This search provides me a tabled output with src, and dest fields populated, but nothing in the "target_ip" field.&amp;nbsp; Any ideas? Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Sep 2022 22:14:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Index-to-lookup-match-IP-address-Why-is-quot-target-ip-quot-not/m-p/611670#M13803</guid>
      <dc:creator>ATEsiveL</dc:creator>
      <dc:date>2022-09-04T22:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Index to lookup match IP address</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Index-to-lookup-match-IP-address-Why-is-quot-target-ip-quot-not/m-p/611675#M13804</link>
      <description>&lt;P&gt;The lookup is failing because there is no 'ip' field in the indexed data to look up.&amp;nbsp; Use the as option to tell &lt;FONT face="courier new,courier"&gt;lookup&lt;/FONT&gt; where to find the field.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| lookup name.csv ip as src OUTPUT target_ip as src_target_ip
| lookup name.csv ip as dest OUTPUT target_ip as dest_target_ip&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 20:10:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Index-to-lookup-match-IP-address-Why-is-quot-target-ip-quot-not/m-p/611675#M13804</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-09-01T20:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Index to lookup match IP address</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Index-to-lookup-match-IP-address-Why-is-quot-target-ip-quot-not/m-p/611755#M13807</link>
      <description>&lt;P&gt;Thank you for the response. I made this modification this morning, and am still having the same results. No data from the lookup being placed in the target_ip field to determine if there was a match. There may be a better method of trying to match this data, this is just what I had came up with originally. Also, after I added the lookup I am no longer getting the stats count on the right side, or the sort.&amp;nbsp; Sorry if this is an easy question, I am new to lookup matching. Thank you.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=name1 OR index=name2 OR index=name3) src_ip_country=United States action=allowed
| stats count by  src, dest
| sort count
| reverse
| lookup name.csv ip AS src OUTPUT target_ip AS src_target_ip
| lookup name.csv ip AS dest OUTPUT target_ip AS dest_target_ip
| table target_ip, src, dest&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 11:35:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Index-to-lookup-match-IP-address-Why-is-quot-target-ip-quot-not/m-p/611755#M13807</guid>
      <dc:creator>ATEsiveL</dc:creator>
      <dc:date>2022-09-02T11:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Index to lookup match IP address</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Index-to-lookup-match-IP-address-Why-is-quot-target-ip-quot-not/m-p/611813#M13808</link>
      <description>&lt;P&gt;I guess I should have been more explicit in my first reply. Since the &lt;FONT face="courier new,courier"&gt;lookup&lt;/FONT&gt; commands are returning target_ip as src_target_ip or dest_target_ip there no longer is a target_ip field for the &lt;FONT face="courier new,courier"&gt;table&lt;/FONT&gt; command to display.&lt;/P&gt;&lt;P&gt;Also, the count is not displayed because the table command did not specify it.&amp;nbsp; That's not related to the lookups.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=name1 OR index=name2 OR index=name3) src_ip_country=United States action=allowed
| stats count by  src, dest
| sort - count
| lookup name.csv ip AS src OUTPUT target_ip AS src_target_ip
| lookup name.csv ip AS dest OUTPUT target_ip AS dest_target_ip
| table src_target_ip, src, dest_target_ip, dest, count&lt;/LI-CODE&gt;&lt;P&gt;BTW, there's no need for &lt;FONT face="courier new,courier"&gt;reverse&lt;/FONT&gt; after &lt;FONT face="courier new,courier"&gt;sort&lt;/FONT&gt; if you sort in descending order.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 20:21:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Index-to-lookup-match-IP-address-Why-is-quot-target-ip-quot-not/m-p/611813#M13808</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-09-02T20:21:21Z</dc:date>
    </item>
  </channel>
</rss>

