<?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: How can I extract fields from a space delimited event with potential spaces in the field values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-fields-from-a-space-delimited-event-with/m-p/188168#M54210</link>
    <description>&lt;P&gt;A field definition is ultimately a regular expression. You can certainly write a regular expression that would include spaces - or anything else! Of course, for a complicated event, the regular expressions may be complex as well.&lt;/P&gt;

&lt;P&gt;You might be able to avoid writing your own regular expression if your data is one of the &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.5/Data/Listofpretrainedsourcetypes"&gt;pretrained sourcetypes&lt;/A&gt;, or if there is an &lt;A href="http://splunkbase.com"&gt;app&lt;/A&gt; for the data.&lt;/P&gt;

&lt;P&gt;The timestamp is a special case. Splunk's default timestamp extraction is not confused by spaces, although it might have some problem with the fact that there are 3 timestamps in the event! Which one is the event time? Again, you can use regular expressions to help Splunk identify the proper time stamp; &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.5/Data/ConfigurePositionalTimestampExtraction"&gt;here&lt;/A&gt; is some info in the documentation.&lt;/P&gt;

&lt;P&gt;I frankly think that "grouping fields" on the fly is an inconvenient way to do things. Remember that field extractions are dynamic - you can change them at any time. So even if you have already indexed the data, you can change the field definitions. [Exception: unless you used "index time" field extractions - which you should avoid as much as possible.]&lt;/P&gt;

&lt;P&gt;If you need help writing the regular expressions, tell us exactly how you want the fields broken out in this event...&lt;/P&gt;</description>
    <pubDate>Fri, 28 Aug 2015 00:35:40 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2015-08-28T00:35:40Z</dc:date>
    <item>
      <title>How can I extract fields from a space delimited event with potential spaces in the field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-fields-from-a-space-delimited-event-with/m-p/188166#M54208</link>
      <description>&lt;P&gt;How would I go along extracting fields for the below?  The challenge I am seeing is that it seems to be delimited by space, but the values themselves can contain a space.  For example, the header datatime has space, and the user agent has spaces (though the latter has quotes around it). &lt;/P&gt;

&lt;P&gt;What would be the best approach for extracting fields from this data?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Aug 27 17:48:19 10.252.22.22 Aug 27 10:46:48 10.251.106.44 2015-08-27 17:35:43 19 10.234.37.191 - - - OBSERVED "News/Media" &lt;A href="http://bits.blogs.nytimes.com/2015/08/26/facebook-tests-a-digital-assistant-for-its-messaging-app/?_r=0" target="test_blank"&gt;http://bits.blogs.nytimes.com/2015/08/26/facebook-tests-a-digital-assistant-for-its-messaging-app/?_r=0&lt;/A&gt;  200 TCP_HIT GET image/jpeg http graphics8.nytimes.com 80 /images/2015/08/28/business/28eugoogle-web/28eugoogle-web-mediumThreeByTwo210.jpg - jpg "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" 10.251.106.44 8762 4053 - "none" "none"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Aug 2015 19:36:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-fields-from-a-space-delimited-event-with/m-p/188166#M54208</guid>
      <dc:creator>jamesvz84</dc:creator>
      <dc:date>2015-08-27T19:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract fields from a space delimited event with potential spaces in the field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-fields-from-a-space-delimited-event-with/m-p/188167#M54209</link>
      <description>&lt;P&gt;What do you think about using the space as field separator and after discover all, group some fields in eventtypes for example? Also you can use eval functions.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.5/Admin/eventtypesconf"&gt;Use eventtypes&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/5726/group-by-different-fields-based-on-some-other-field.html"&gt;Group using eval&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2015 21:30:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-fields-from-a-space-delimited-event-with/m-p/188167#M54209</guid>
      <dc:creator>changux</dc:creator>
      <dc:date>2015-08-27T21:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract fields from a space delimited event with potential spaces in the field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-fields-from-a-space-delimited-event-with/m-p/188168#M54210</link>
      <description>&lt;P&gt;A field definition is ultimately a regular expression. You can certainly write a regular expression that would include spaces - or anything else! Of course, for a complicated event, the regular expressions may be complex as well.&lt;/P&gt;

&lt;P&gt;You might be able to avoid writing your own regular expression if your data is one of the &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.5/Data/Listofpretrainedsourcetypes"&gt;pretrained sourcetypes&lt;/A&gt;, or if there is an &lt;A href="http://splunkbase.com"&gt;app&lt;/A&gt; for the data.&lt;/P&gt;

&lt;P&gt;The timestamp is a special case. Splunk's default timestamp extraction is not confused by spaces, although it might have some problem with the fact that there are 3 timestamps in the event! Which one is the event time? Again, you can use regular expressions to help Splunk identify the proper time stamp; &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.5/Data/ConfigurePositionalTimestampExtraction"&gt;here&lt;/A&gt; is some info in the documentation.&lt;/P&gt;

&lt;P&gt;I frankly think that "grouping fields" on the fly is an inconvenient way to do things. Remember that field extractions are dynamic - you can change them at any time. So even if you have already indexed the data, you can change the field definitions. [Exception: unless you used "index time" field extractions - which you should avoid as much as possible.]&lt;/P&gt;

&lt;P&gt;If you need help writing the regular expressions, tell us exactly how you want the fields broken out in this event...&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2015 00:35:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-fields-from-a-space-delimited-event-with/m-p/188168#M54210</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-08-28T00:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract fields from a space delimited event with potential spaces in the field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-fields-from-a-space-delimited-event-with/m-p/188169#M54211</link>
      <description>&lt;P&gt;11/06/2018 01:31:21.784 (# 178) (58w8239-11212-2001-0078-00999393003903) Director (Director, 63) 1&lt;/P&gt;

&lt;P&gt;I need to get  (5***) as a field in the above log&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 07:34:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-fields-from-a-space-delimited-event-with/m-p/188169#M54211</guid>
      <dc:creator>bschaithnyakuma</dc:creator>
      <dc:date>2018-11-06T07:34:02Z</dc:date>
    </item>
  </channel>
</rss>

