<?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: Extract field values in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Extract-field-values/m-p/114360#M23924</link>
    <description>&lt;P&gt;Thank you. This works!&lt;/P&gt;</description>
    <pubDate>Fri, 25 Oct 2013 13:35:59 GMT</pubDate>
    <dc:creator>shangshin</dc:creator>
    <dc:date>2013-10-25T13:35:59Z</dc:date>
    <item>
      <title>Extract field values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-field-values/m-p/114356#M23920</link>
      <description>&lt;P&gt;Hi, I have having the following stanza in transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[apache_fields]
DELIMS = "\t"
FIELDS = clientip,remotelogname,user_id,timestamp,resource_requested,http_status_code,content_length,referrer,user_agent,response_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;clientip field value could be 1 or 2 IP separated by comma&lt;BR /&gt;
10.39.127.164&lt;BR /&gt;
10.39.127.164, 10.183.135.2&lt;/P&gt;

&lt;P&gt;Is it possible to add another stanza so I can extract ip1 and ip2 if it exists.&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2013 21:32:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-field-values/m-p/114356#M23920</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2013-10-24T21:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-field-values/m-p/114357#M23921</link>
      <description>&lt;P&gt;So, there is white space for a delimiter, but only a comma between the IPs?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2013 21:36:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-field-values/m-p/114357#M23921</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-24T21:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-field-values/m-p/114358#M23922</link>
      <description>&lt;P&gt;yes, the delimiter is comma. I tried to add a new stanza below but it didn't work out. Thank you!&lt;/P&gt;

&lt;P&gt;[clientip]&lt;BR /&gt;
DELIMS = ", "&lt;BR /&gt;
FIELDS = aip1, aip2&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2013 21:38:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-field-values/m-p/114358#M23922</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2013-10-24T21:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-field-values/m-p/114359#M23923</link>
      <description>&lt;P&gt;Have you considered replacing the DELIMS and FIELDS statements with a REGEX?  For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[apache_fields]
REGEX = (?&amp;lt;ip1&amp;gt;.*?)(,\s(?&amp;lt;ip2&amp;gt;.*?))?\s(?&amp;lt;remotelogname&amp;gt;.*?)\s(?&amp;lt;user_id&amp;gt;.*?)\s(?&amp;lt;timestamp&amp;gt;.*?)\s(?&amp;lt;resource_requested&amp;gt;.*?)\s(?&amp;lt;http_status_code&amp;gt;.*?)\s(?&amp;lt;content_length&amp;gt;.*?)\s(?&amp;lt;referrer&amp;gt;.*?)\s(?&amp;lt;user_agent&amp;gt;.*?)\s(?&amp;lt;response_time&amp;gt;.*)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Oct 2013 12:10:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-field-values/m-p/114359#M23923</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2013-10-25T12:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field values</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-field-values/m-p/114360#M23924</link>
      <description>&lt;P&gt;Thank you. This works!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2013 13:35:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-field-values/m-p/114360#M23924</guid>
      <dc:creator>shangshin</dc:creator>
      <dc:date>2013-10-25T13:35:59Z</dc:date>
    </item>
  </channel>
</rss>

