<?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 Extract field from source field then run a lookup - config error? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Extract-field-from-source-field-then-run-a-lookup-config-error/m-p/189899#M37819</link>
    <description>&lt;P&gt;I want to add a field extracttion to props.conf that will extract a portion of the uri field to create a custom field called kap_uri.&lt;BR /&gt;
So eventually i can do the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined_wcookie kap_uri=* | lookup bad_url_lookup kap_uri OUTPUT maskid kap_uri | table kap_uri,maskid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;According to the docs i expected this to work as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [host::mimi]
    EXTRACT-kap_uri = (?:(http\:\/\/www\.|\w+:\/\/|www\.|)(?&amp;lt;kap_uri&amp;gt;.+)) in uri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But when I search ("host=mimi kap_uri=* | table kap_uri") for the field in splunk nothing is returned.&lt;/P&gt;

&lt;P&gt;After searching some more a transform.conf edit was suggested so i have tried, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#props.conf
[access_combined_wcookie]
REPORT-kap_uri = kapersky_uri

#transforms.conf
[kapersky_uri]
SOURCE_KEY = kap_uri
REGEX = (?:( http\:\/\/www\.|\w+:\/\/|www\.|)(?&amp;lt;kap_uri&amp;gt;.+))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any ideas why this is not working, how can I get this field extraction,I tested the regex with &lt;CODE&gt;rex field=uri "(?:(http\:\/\/www\.|\w+:\/\/|www\.|)(?&amp;amp;lt;kap_uri&amp;amp;gt;.+))" and it worked well&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 20:27:59 GMT</pubDate>
    <dc:creator>borgy95</dc:creator>
    <dc:date>2020-09-28T20:27:59Z</dc:date>
    <item>
      <title>Extract field from source field then run a lookup - config error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-field-from-source-field-then-run-a-lookup-config-error/m-p/189899#M37819</link>
      <description>&lt;P&gt;I want to add a field extracttion to props.conf that will extract a portion of the uri field to create a custom field called kap_uri.&lt;BR /&gt;
So eventually i can do the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined_wcookie kap_uri=* | lookup bad_url_lookup kap_uri OUTPUT maskid kap_uri | table kap_uri,maskid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;According to the docs i expected this to work as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [host::mimi]
    EXTRACT-kap_uri = (?:(http\:\/\/www\.|\w+:\/\/|www\.|)(?&amp;lt;kap_uri&amp;gt;.+)) in uri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But when I search ("host=mimi kap_uri=* | table kap_uri") for the field in splunk nothing is returned.&lt;/P&gt;

&lt;P&gt;After searching some more a transform.conf edit was suggested so i have tried, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#props.conf
[access_combined_wcookie]
REPORT-kap_uri = kapersky_uri

#transforms.conf
[kapersky_uri]
SOURCE_KEY = kap_uri
REGEX = (?:( http\:\/\/www\.|\w+:\/\/|www\.|)(?&amp;lt;kap_uri&amp;gt;.+))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any ideas why this is not working, how can I get this field extraction,I tested the regex with &lt;CODE&gt;rex field=uri "(?:(http\:\/\/www\.|\w+:\/\/|www\.|)(?&amp;amp;lt;kap_uri&amp;amp;gt;.+))" and it worked well&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:27:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-field-from-source-field-then-run-a-lookup-config-error/m-p/189899#M37819</guid>
      <dc:creator>borgy95</dc:creator>
      <dc:date>2020-09-28T20:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field from source field then run a lookup - config error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-field-from-source-field-then-run-a-lookup-config-error/m-p/189900#M37820</link>
      <description>&lt;P&gt;Your first method should have worked depending on the &lt;CODE&gt;uri&lt;/CODE&gt; filed (for which you have not given any examples so we cannot help you further) and the &lt;CODE&gt;host&lt;/CODE&gt;.  For the first method, switch your stanza header from &lt;CODE&gt;host&lt;/CODE&gt;-based to &lt;CODE&gt;[access_combined_wcookie]&lt;/CODE&gt;.  For your second method, you need to change &lt;CODE&gt;SOURCE_KEY = kap_uri&lt;/CODE&gt; to &lt;CODE&gt;SOURCE_KEY = uri&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2015 15:48:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-field-from-source-field-then-run-a-lookup-config-error/m-p/189900#M37820</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-02T15:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field from source field then run a lookup - config error?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-field-from-source-field-then-run-a-lookup-config-error/m-p/189901#M37821</link>
      <description>&lt;P&gt;Thank you, The source key edit fixed it. &lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2015 15:32:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-field-from-source-field-then-run-a-lookup-config-error/m-p/189901#M37821</guid>
      <dc:creator>borgy95</dc:creator>
      <dc:date>2015-07-06T15:32:58Z</dc:date>
    </item>
  </channel>
</rss>

