<?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 Search split value with spaces in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87474#M22379</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Newbie here &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
trying to search value that actually split with spaces:&lt;/P&gt;

&lt;P&gt;DEBUG PerformanceMonitor [(null)] - PerformanceMonitor resource: DataBase  &lt;STRONG&gt;elapsed : 3250&lt;/STRONG&gt;  details:  DataBase:&lt;BR /&gt;
DEBUG PerformanceMonitor [(null)] - PerformanceMonitor resource: DataBase  &lt;STRONG&gt;elapsed : 11204&lt;/STRONG&gt;  details:  DataBase:&lt;/P&gt;

&lt;P&gt;im trying to create a search or chart that will min and max the values of the elapsed.&lt;BR /&gt;
since the values are seperated with spaces i cannot achieve that.&lt;/P&gt;

&lt;P&gt;any ideas?&lt;/P&gt;

&lt;P&gt;thanks,&lt;BR /&gt;
ofer&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2013 15:18:04 GMT</pubDate>
    <dc:creator>oferprtz</dc:creator>
    <dc:date>2013-07-08T15:18:04Z</dc:date>
    <item>
      <title>Search split value with spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87474#M22379</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Newbie here &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
trying to search value that actually split with spaces:&lt;/P&gt;

&lt;P&gt;DEBUG PerformanceMonitor [(null)] - PerformanceMonitor resource: DataBase  &lt;STRONG&gt;elapsed : 3250&lt;/STRONG&gt;  details:  DataBase:&lt;BR /&gt;
DEBUG PerformanceMonitor [(null)] - PerformanceMonitor resource: DataBase  &lt;STRONG&gt;elapsed : 11204&lt;/STRONG&gt;  details:  DataBase:&lt;/P&gt;

&lt;P&gt;im trying to create a search or chart that will min and max the values of the elapsed.&lt;BR /&gt;
since the values are seperated with spaces i cannot achieve that.&lt;/P&gt;

&lt;P&gt;any ideas?&lt;/P&gt;

&lt;P&gt;thanks,&lt;BR /&gt;
ofer&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 15:18:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87474#M22379</guid>
      <dc:creator>oferprtz</dc:creator>
      <dc:date>2013-07-08T15:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Search split value with spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87475#M22380</link>
      <description>&lt;P&gt;I'd suggest creating a field extraction for your values. That way you can later reference the field in your chart and / or search.&lt;/P&gt;

&lt;P&gt;You'll need to use some regex to get the values properly. You can use something like this:&lt;BR /&gt;
"elapsed\s:\s(?&lt;FIELDNAME&gt;[^\s]+)\s"&lt;/FIELDNAME&gt;&lt;/P&gt;

&lt;P&gt;Here's some documentation on field extraction:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/Addfieldsatsearchtime"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/Addfieldsatsearchtime&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 16:00:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87475#M22380</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2013-07-08T16:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Search split value with spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87476#M22381</link>
      <description>&lt;P&gt;the regex above is supposed to escape all the "s" after elapsed, but due to formatting it was lost when I pasted it in the comment. Here it is again:&lt;BR /&gt;
"elapsed\s:\s(?&lt;FIELDNAME&gt;[^\s]+)\s"&lt;/FIELDNAME&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 20:57:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87476#M22381</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2013-07-08T20:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Search split value with spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87477#M22382</link>
      <description>&lt;P&gt;Thanks for the quick response aholzer!! &lt;BR /&gt;
one more question &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
ive created new field extraction and saved it, but when i do a search the field 'elapsed' wouldnt show in the fields.&lt;BR /&gt;
its shows up only when i use this line:&lt;BR /&gt;
PerformanceMonitor  | rex "elapsed\s:\s(?&lt;ELAPSED&gt;[^\s]+)\s" &lt;BR /&gt;
in the search line. &lt;BR /&gt;
what im missing here?&lt;/ELAPSED&gt;&lt;/P&gt;

&lt;P&gt;thanks,&lt;BR /&gt;
ofer.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 10:44:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87477#M22382</guid>
      <dc:creator>oferprtz</dc:creator>
      <dc:date>2013-07-09T10:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Search split value with spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87478#M22383</link>
      <description>&lt;P&gt;you can use the following command rex command to extract the elapsed field :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | rex field=_raw ".*\s+elapsed\s+:\s+(?&amp;lt;elapsed&amp;gt;\d+)\s"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and then use timechart, table, stats etc commands based upon your requirement.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 12:31:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87478#M22383</guid>
      <dc:creator>ranjyotiprakash</dc:creator>
      <dc:date>2013-07-09T12:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Search split value with spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87479#M22384</link>
      <description>&lt;P&gt;I'd have to take a look at your field extraction definition, but I'm guessing that you stored it for the wrong sourcetype, or you have a typo.&lt;/P&gt;

&lt;P&gt;The other thing that could be happening is that your "elapsed" field occurs so rarely that it isn't one of your "interesting fields", since it doesn't appear in 50% or more of your events. In which case you would see it if you clicked on the "edit" button next to "selected fields" and look for "elapsed".&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 13:09:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87479#M22384</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2013-07-09T13:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Search split value with spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87480#M22385</link>
      <description>&lt;P&gt;@oferprtz, what @ranjyotiprakash says here is also a good method. I simply prefer creating a field extraction, for a couple of reasons:&lt;BR /&gt;
1) It helps to be consistent where you store fields of interest to you&lt;BR /&gt;
2) you don't have to reuse the code in every search you want this field included in&lt;/P&gt;

&lt;P&gt;But what @ranjyotiprakash says is a great method to confirm that the regex for the field extraction is in fact working.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 13:19:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87480#M22385</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2013-07-09T13:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Search split value with spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87481#M22386</link>
      <description>&lt;P&gt;Thank you! found the issue, it was set as wrong sourcetype, now its working perfect!&lt;/P&gt;

&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 14:39:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87481#M22386</guid>
      <dc:creator>oferprtz</dc:creator>
      <dc:date>2013-07-09T14:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Search split value with spaces</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87482#M22387</link>
      <description>&lt;P&gt;great stuff ranjyotiprakash! seems that the search works flawless, now ive got 2 methods of use!&lt;/P&gt;

&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 14:40:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-split-value-with-spaces/m-p/87482#M22387</guid>
      <dc:creator>oferprtz</dc:creator>
      <dc:date>2013-07-09T14:40:43Z</dc:date>
    </item>
  </channel>
</rss>

