<?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 How do I parse a text line and grab only 1 value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-text-line-and-grab-only-1-value/m-p/44861#M10603</link>
    <description>&lt;P&gt;New to splunk so don't laugh too much at this -&lt;/P&gt;

&lt;P&gt;I have many strings that look similiar to this:&lt;/P&gt;

&lt;P&gt;[71] 20130226.015959.650 3512.380251 RESULT success 0 entries 1 msecs&lt;/P&gt;

&lt;P&gt;I want to be able to grab the msecs number and graph the avg per minute.  I tried this:&lt;/P&gt;

&lt;P&gt;index=blah blah blah |regex _raw="entries (?P&lt;MSECS&gt;\d+) msecs" | timechart span=1m avg(msecs)&lt;/MSECS&gt;&lt;/P&gt;

&lt;P&gt;Obviously that doesn't give me what I want.  Any assistance would be most appreciated.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Feb 2013 02:17:29 GMT</pubDate>
    <dc:creator>zkxi98m</dc:creator>
    <dc:date>2013-02-27T02:17:29Z</dc:date>
    <item>
      <title>How do I parse a text line and grab only 1 value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-text-line-and-grab-only-1-value/m-p/44861#M10603</link>
      <description>&lt;P&gt;New to splunk so don't laugh too much at this -&lt;/P&gt;

&lt;P&gt;I have many strings that look similiar to this:&lt;/P&gt;

&lt;P&gt;[71] 20130226.015959.650 3512.380251 RESULT success 0 entries 1 msecs&lt;/P&gt;

&lt;P&gt;I want to be able to grab the msecs number and graph the avg per minute.  I tried this:&lt;/P&gt;

&lt;P&gt;index=blah blah blah |regex _raw="entries (?P&lt;MSECS&gt;\d+) msecs" | timechart span=1m avg(msecs)&lt;/MSECS&gt;&lt;/P&gt;

&lt;P&gt;Obviously that doesn't give me what I want.  Any assistance would be most appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2013 02:17:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-text-line-and-grab-only-1-value/m-p/44861#M10603</guid>
      <dc:creator>zkxi98m</dc:creator>
      <dc:date>2013-02-27T02:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I parse a text line and grab only 1 value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-text-line-and-grab-only-1-value/m-p/44862#M10604</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Give this a shot:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=blah blah blah |rex field=_raw "entries (?&amp;lt;msecs&amp;gt;\d+) msecs" | timechart span=1m avg(msecs)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The regex command is for filtering results and the rex command is used for extracting values. Take a look at both commands in the docs for more info on syntax and usage. &lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2013 02:57:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-parse-a-text-line-and-grab-only-1-value/m-p/44862#M10604</guid>
      <dc:creator>Rob</dc:creator>
      <dc:date>2013-02-27T02:57:17Z</dc:date>
    </item>
  </channel>
</rss>

