<?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 Simple extraction regex to parse out space seperated logs? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303255#M91240</link>
    <description>&lt;P&gt;I'm dealing with a highly customized access log that isn't being processed properly by access_combined sourcetype during indexing. Fields aren't being pulled out. &lt;/P&gt;

&lt;P&gt;Is there a way to write a regex in search time extractions that will simply do something similar to a split(_raw," ")?&lt;/P&gt;

&lt;P&gt;I CANNOT do something like because it's way too slow to rex out or split the entire data set (it's huge):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=blah | rex field=_raw "(?&amp;lt;field1&amp;gt;.+)\s(?&amp;lt;field2&amp;gt;.+)\s | search field1=wowthiswasslow"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It needs to be streaming so that I can search like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=blah extracted_field1=thatwasfast
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 11 Jan 2018 22:52:32 GMT</pubDate>
    <dc:creator>thisissplunk</dc:creator>
    <dc:date>2018-01-11T22:52:32Z</dc:date>
    <item>
      <title>Simple extraction regex to parse out space seperated logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303255#M91240</link>
      <description>&lt;P&gt;I'm dealing with a highly customized access log that isn't being processed properly by access_combined sourcetype during indexing. Fields aren't being pulled out. &lt;/P&gt;

&lt;P&gt;Is there a way to write a regex in search time extractions that will simply do something similar to a split(_raw," ")?&lt;/P&gt;

&lt;P&gt;I CANNOT do something like because it's way too slow to rex out or split the entire data set (it's huge):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=blah | rex field=_raw "(?&amp;lt;field1&amp;gt;.+)\s(?&amp;lt;field2&amp;gt;.+)\s | search field1=wowthiswasslow"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It needs to be streaming so that I can search like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=blah extracted_field1=thatwasfast
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jan 2018 22:52:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303255#M91240</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2018-01-11T22:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Simple extraction regex to parse out space seperated logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303256#M91241</link>
      <description>&lt;P&gt;&lt;CODE&gt;| eval allfields=_raw | makemv allfields&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This may not work will for your specific use case, but it will split into as many values as it needs.  &lt;CODE&gt;delim&lt;/CODE&gt; defaults to , so I left it out of the command.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Makemv"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Makemv&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 22:55:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303256#M91241</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-11T22:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Simple extraction regex to parse out space seperated logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303257#M91242</link>
      <description>&lt;P&gt;Hmm ok, I'm looking for it now, but how do I search for something like allfields[0]=blah?&lt;/P&gt;

&lt;P&gt;Found it: | eval field7=mvindex(allfields,7) | search field7=200&lt;/P&gt;

&lt;P&gt;Still left wondering if this will be slow due to the extra | search&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 23:16:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303257#M91242</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2018-01-11T23:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Simple extraction regex to parse out space seperated logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303258#M91243</link>
      <description>&lt;P&gt;&lt;CODE&gt;mvindex&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 23:24:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303258#M91243</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-11T23:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Simple extraction regex to parse out space seperated logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303259#M91244</link>
      <description>&lt;P&gt;Actually I was making this harder than it had to be. Just go to "Extract more fields" then choose "Delimiter" then choose Space as the delimiter.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 23:28:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303259#M91244</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2018-01-11T23:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Simple extraction regex to parse out space seperated logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303260#M91245</link>
      <description>&lt;P&gt;Yup, that’s a better way to parse delimited fields long term.&lt;/P&gt;

&lt;P&gt;I honestly can’t imagine splitting by spaces is going to work for web logs, though. What about useragents?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 23:30:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-extraction-regex-to-parse-out-space-seperated-logs/m-p/303260#M91245</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-11T23:30:29Z</dc:date>
    </item>
  </channel>
</rss>

