<?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 Automatic field extractions from a quoted string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Automatic-field-extractions-from-a-quoted-string/m-p/140965#M39003</link>
    <description>&lt;P&gt;Our nginx access logs use a quoted string when dumping cookies. It ends up looking something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"cookie_a=value_a; cookie_b=value_b; cookie_c=value_c" 192.168.1.1 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The trouble comes when the auto-extractor hits cookie_c and sees the quote as the beginning of a quoted string. It then gobbles up all the fields after the cookie and dumps them into that field. Because cookie order isn't deterministic, you end up with a certain percentage of cookie_c values that are correct and a smaller number that are not.&lt;/P&gt;

&lt;P&gt;Is there anyway to offer a hint to the auto-extractor to make this not happen?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 19:30:23 GMT</pubDate>
    <dc:creator>sfrazer</dc:creator>
    <dc:date>2020-09-28T19:30:23Z</dc:date>
    <item>
      <title>Automatic field extractions from a quoted string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Automatic-field-extractions-from-a-quoted-string/m-p/140965#M39003</link>
      <description>&lt;P&gt;Our nginx access logs use a quoted string when dumping cookies. It ends up looking something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"cookie_a=value_a; cookie_b=value_b; cookie_c=value_c" 192.168.1.1 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The trouble comes when the auto-extractor hits cookie_c and sees the quote as the beginning of a quoted string. It then gobbles up all the fields after the cookie and dumps them into that field. Because cookie order isn't deterministic, you end up with a certain percentage of cookie_c values that are correct and a smaller number that are not.&lt;/P&gt;

&lt;P&gt;Is there anyway to offer a hint to the auto-extractor to make this not happen?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:30:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Automatic-field-extractions-from-a-quoted-string/m-p/140965#M39003</guid>
      <dc:creator>sfrazer</dc:creator>
      <dc:date>2020-09-28T19:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic field extractions from a quoted string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Automatic-field-extractions-from-a-quoted-string/m-p/140966#M39004</link>
      <description>&lt;P&gt;Yes of course! your can create your search time field extraction with &lt;STRONG&gt;props.conf&lt;/STRONG&gt; edit. &lt;BR /&gt;
 Let's suppose that The field should be extracted from events related to the &lt;CODE&gt;accesslogs&lt;/CODE&gt; sourcetype.&lt;BR /&gt;
 1. Create your own &lt;STRONG&gt;props.conf&lt;/STRONG&gt; file, and put it in &lt;CODE&gt;$SPLUNK_HOME/etc/apps/yourappname/local&lt;/CODE&gt;.&lt;BR /&gt;
 2. configure your stanza like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[acceslogs]
EXTRACT-cookiec = cookie_c=(?&amp;lt;cookie_c&amp;gt;[^"]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;OL&gt;
&lt;LI&gt;and restart splunk&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Sat, 11 Apr 2015 12:14:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Automatic-field-extractions-from-a-quoted-string/m-p/140966#M39004</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-04-11T12:14:08Z</dc:date>
    </item>
  </channel>
</rss>

