<?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: Is it possible to create a data model lookup attribute that is based on a CSV file that contains a name column and a CIDR column? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-a-data-model-lookup-attribute-that-is/m-p/359271#M106221</link>
    <description>&lt;P&gt;Lookups are defined in transforms.conf. This is an example of the configuration that you need.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mylookup]
filename = ../lookups/thefilename.csv
max_matches = 1
min_matches = 1
default_match = Unknown
match_type = CIDR
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the search could be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| lookup mylookup dest_IP as cidr OUTPUT environment as destination_environment
| lookup mylookup source_IP as cidr OUTPUT environment as source_environment
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;HTH!&lt;/P&gt;</description>
    <pubDate>Thu, 16 Mar 2017 23:33:59 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2017-03-16T23:33:59Z</dc:date>
    <item>
      <title>Is it possible to create a data model lookup attribute that is based on a CSV file that contains a name column and a CIDR column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-a-data-model-lookup-attribute-that-is/m-p/359270#M106220</link>
      <description>&lt;P&gt;Is it possible to create a data model lookup attribute that is based on a CSV file that contains a name column and a CIDR column?&lt;/P&gt;

&lt;P&gt;Example file&lt;/P&gt;

&lt;P&gt;environment, cidr&lt;BR /&gt;
foo, 123.123.123/24&lt;BR /&gt;
bar, 321.321.321/24&lt;/P&gt;

&lt;P&gt;So I can match a source IP or a destination IP against the CIDR to get the "environment" name? Creating two fields like source_environment and destination_environment&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:15:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-a-data-model-lookup-attribute-that-is/m-p/359270#M106220</guid>
      <dc:creator>yacht_rock</dc:creator>
      <dc:date>2020-09-29T13:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to create a data model lookup attribute that is based on a CSV file that contains a name column and a CIDR column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-a-data-model-lookup-attribute-that-is/m-p/359271#M106221</link>
      <description>&lt;P&gt;Lookups are defined in transforms.conf. This is an example of the configuration that you need.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mylookup]
filename = ../lookups/thefilename.csv
max_matches = 1
min_matches = 1
default_match = Unknown
match_type = CIDR
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the search could be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| lookup mylookup dest_IP as cidr OUTPUT environment as destination_environment
| lookup mylookup source_IP as cidr OUTPUT environment as source_environment
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;HTH!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 23:33:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-create-a-data-model-lookup-attribute-that-is/m-p/359271#M106221</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2017-03-16T23:33:59Z</dc:date>
    </item>
  </channel>
</rss>

