<?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 Create new customer access-extractions in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Create-new-customer-access-extractions/m-p/106522#M97579</link>
    <description>&lt;P&gt;We use a custom access log format which, as far as I can tell, matches the &lt;CODE&gt;access-extractions&lt;/CODE&gt; except has a preceding IP.&lt;/P&gt;

&lt;P&gt;By copying the &lt;CODE&gt;access-extractions&lt;/CODE&gt;, I assumed that this is what I need in my transforms.conf:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[custom_access-extractions]&lt;BR /&gt;
    REGEX = ^[[nspaces:true_client_ip]]\s++[[nspaces:clientip]]\s++[[nspaces:ident]]\s++[[nspaces:user]]\s++[[sbstring:req_time]]\s++[[access-request]]\s++[[nspaces:status]]\s++[[nspaces:bytes]](?:\s++"(?&amp;lt;referer&amp;gt;[[bc_domain:referer_]]?+[^"]*+)"(?:\s++[[qstring:useragent]](?:\s++[[qstring:cookie]])?+)?+)?[[all:other]]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Notice the preceding &lt;CODE&gt;true_client_ip&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;When I step through this with rex on the Web UI search box, it seems to fall apart after the 'bytes'.  I tried escaping the quotes and removing the &lt;CODE&gt;(?:&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I'm guessing someone else has run into this already...So...anyone know what I'm doing wrong such that this isn't working?&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2013 18:59:01 GMT</pubDate>
    <dc:creator>sloshburch</dc:creator>
    <dc:date>2013-10-18T18:59:01Z</dc:date>
    <item>
      <title>Create new customer access-extractions</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-new-customer-access-extractions/m-p/106522#M97579</link>
      <description>&lt;P&gt;We use a custom access log format which, as far as I can tell, matches the &lt;CODE&gt;access-extractions&lt;/CODE&gt; except has a preceding IP.&lt;/P&gt;

&lt;P&gt;By copying the &lt;CODE&gt;access-extractions&lt;/CODE&gt;, I assumed that this is what I need in my transforms.conf:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[custom_access-extractions]&lt;BR /&gt;
    REGEX = ^[[nspaces:true_client_ip]]\s++[[nspaces:clientip]]\s++[[nspaces:ident]]\s++[[nspaces:user]]\s++[[sbstring:req_time]]\s++[[access-request]]\s++[[nspaces:status]]\s++[[nspaces:bytes]](?:\s++"(?&amp;lt;referer&amp;gt;[[bc_domain:referer_]]?+[^"]*+)"(?:\s++[[qstring:useragent]](?:\s++[[qstring:cookie]])?+)?+)?[[all:other]]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Notice the preceding &lt;CODE&gt;true_client_ip&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;When I step through this with rex on the Web UI search box, it seems to fall apart after the 'bytes'.  I tried escaping the quotes and removing the &lt;CODE&gt;(?:&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I'm guessing someone else has run into this already...So...anyone know what I'm doing wrong such that this isn't working?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2013 18:59:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-new-customer-access-extractions/m-p/106522#M97579</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2013-10-18T18:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create new customer access-extractions</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-new-customer-access-extractions/m-p/106523#M97580</link>
      <description>&lt;P&gt;On the command line, Splunk sometimes chokes when there are quotation marks in the regular expression. Not because of the regular expression, but because the command line parser is just not that smart.&lt;/P&gt;

&lt;P&gt;Put a backslash (&lt;CODE&gt;\&lt;/CODE&gt;) in front of the quotation marks, and see if that helps. And it shouldn't &lt;EM&gt;hurt&lt;/EM&gt; the regular expression, either. Also, you probably &lt;EM&gt;do&lt;/EM&gt; need the &lt;CODE&gt;(?:&lt;/CODE&gt; - otherwise Splunk may think that you want to create a capture group - the &lt;CODE&gt;?:&lt;/CODE&gt; means that you &lt;EM&gt;don't&lt;/EM&gt; want to capture. If you tried each of these edits independently, then sorry for repeating what you have already done...&lt;/P&gt;

&lt;P&gt;Or avoid the command line: set up the input on a test instance somewhere. This is probably best.&lt;/P&gt;

&lt;P&gt;Just a suggestion - I would not mix dashes (-) and underscores (_) in the same sourcetype name (&lt;CODE&gt;custom_access-extractions&lt;/CODE&gt;). It tends to confuse some people (me) a lot.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-new-customer-access-extractions/m-p/106523#M97580</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2020-09-28T15:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create new customer access-extractions</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-new-customer-access-extractions/m-p/106524#M97581</link>
      <description>&lt;P&gt;Thanks for the tips.&lt;/P&gt;

&lt;P&gt;When I mentioned "I tried escaping the quotes..." I meant I tried putting a backlash in front of them.&lt;/P&gt;

&lt;P&gt;When I said "command line" I mean the splunk search box in the web UI.  Not sure why I put the wrong thing. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2013 21:11:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-new-customer-access-extractions/m-p/106524#M97581</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2013-10-18T21:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create new customer access-extractions</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-new-customer-access-extractions/m-p/106525#M97582</link>
      <description>&lt;P&gt;Funny, I should have said "Splunk search box", too. Same comments apply for the search box. I looked it up, and you should escape quotation marks in the search box by using the backslash, as in &lt;CODE&gt;\"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2013 03:32:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-new-customer-access-extractions/m-p/106525#M97582</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-10-20T03:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create new customer access-extractions</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Create-new-customer-access-extractions/m-p/106526#M97583</link>
      <description>&lt;P&gt;Thanks - yea, that's what I had done but it wasn't working.  Regardless, I finally got it regardless once I noticed an extra field in the middle of the log which was causing my failures.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2013 17:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Create-new-customer-access-extractions/m-p/106526#M97583</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2013-10-25T17:47:42Z</dc:date>
    </item>
  </channel>
</rss>

