<?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: Splunk inputlookup comparison and rex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-inputlookup-comparison-and-rex/m-p/654143#M226034</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259606"&gt;@sbondred&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to configure your second lookup to match cidr:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;go in [Settings &amp;gt; Lookup Definitions]&lt;/LI&gt;&lt;LI&gt;flag on Advanced options&lt;/LI&gt;&lt;LI&gt;put CIDR in the Match Type option&lt;/LI&gt;&lt;LI&gt;save&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and the run a simple search like the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup1.csv
| lookup lookup2.csv cidr AS ipaddress OUTPUT location
| table name designation server ipaddress dept location&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Sat, 12 Aug 2023 05:51:08 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-08-12T05:51:08Z</dc:date>
    <item>
      <title>Splunk inputlookup comparison and rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-inputlookup-comparison-and-rex/m-p/654142#M226033</link>
      <description>&lt;P&gt;I have 2 lookup files as&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;lookup1.csv and&lt;/LI&gt;&lt;LI&gt;lookup2.csv&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;lookup1.csv has the data as below&lt;/P&gt;&lt;PRE&gt;name, designation, server, ipaddress, dept
tim, ceo, hostname.com, 1.2.3.5, alldept
jim, vp, myhost.com, 1.0.3.5, marketing
pim, staff, nohost.com, 4.0.4.8, hr&lt;/PRE&gt;&lt;P&gt;lookup2.csv has the data as below&lt;/P&gt;&lt;PRE&gt;cidr, location
1.2.3.0/24, dc
1.0.3.0/24, carolina
3.4.7.0/24, tx&lt;/PRE&gt;&lt;P&gt;I would like to lookup for the field ipaddress in lookup1.csv with the field cidr in lookup2.csv for the first 3 digits as in x.x.x and get the location field if they match. If the ipaddress doesn't match the first 3 digit of cidr , the location should be marked as "unknown".&lt;/P&gt;&lt;P&gt;Expected o/p&lt;/P&gt;&lt;PRE&gt;tim, ceo,1.2.4.5, dc
jim, vp, 1.0.3.5, carolina
pim, staff, 4.0.4.8, unkown&lt;/PRE&gt;&lt;P&gt;I am looking for the search command in splunk using the 2 lookup tables. Thanks in advance. My search so far has not yield any good results but I am still working on it.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2023 03:20:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-inputlookup-comparison-and-rex/m-p/654142#M226033</guid>
      <dc:creator>sbondred</dc:creator>
      <dc:date>2023-08-12T03:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk inputlookup comparison and rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-inputlookup-comparison-and-rex/m-p/654143#M226034</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259606"&gt;@sbondred&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to configure your second lookup to match cidr:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;go in [Settings &amp;gt; Lookup Definitions]&lt;/LI&gt;&lt;LI&gt;flag on Advanced options&lt;/LI&gt;&lt;LI&gt;put CIDR in the Match Type option&lt;/LI&gt;&lt;LI&gt;save&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and the run a simple search like the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup1.csv
| lookup lookup2.csv cidr AS ipaddress OUTPUT location
| table name designation server ipaddress dept location&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2023 05:51:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-inputlookup-comparison-and-rex/m-p/654143#M226034</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-08-12T05:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk inputlookup comparison and rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-inputlookup-comparison-and-rex/m-p/654154#M226041</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I setup the lookup definition to match type as CIDR(cidr) as that is the field name in the file and used the same search as mentioned below. For some reason, it does't provide me the location. It seems like it is not able to lookup for some reason. Still troubleshooting.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2023 13:04:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-inputlookup-comparison-and-rex/m-p/654154#M226041</guid>
      <dc:creator>sbondred</dc:creator>
      <dc:date>2023-08-12T13:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk inputlookup comparison and rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-inputlookup-comparison-and-rex/m-p/654155#M226042</link>
      <description>&lt;P&gt;Actually, it was my lookuptable name I was using wrong. Its working. Thanks again&amp;nbsp;&lt;A href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352" target="_blank"&gt;@gcusello&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2023 13:53:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-inputlookup-comparison-and-rex/m-p/654155#M226042</guid>
      <dc:creator>sbondred</dc:creator>
      <dc:date>2023-08-12T13:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk inputlookup comparison and rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-inputlookup-comparison-and-rex/m-p/654166#M226045</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/259606"&gt;@sbondred&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Aug 2023 05:23:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-inputlookup-comparison-and-rex/m-p/654166#M226045</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-08-13T05:23:46Z</dc:date>
    </item>
  </channel>
</rss>

