<?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 to extract the response time from below logs in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356729#M174849</link>
    <description>&lt;P&gt;If I am correct in assuming the number in bold is the response time, you an extract it via the search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR BASE SEARCH 
| rex field=_raw "\d{3} - (?&amp;lt;responsetime&amp;gt;\d+) \""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can also use the field extractor in Splunk to do this pretty easily by choosing a sample event and highlighting the value.  The field extractor will generate the regex for you, though in some cases you may need to edit that and tweak it.  In this case, I think Splunk would probably do a good job at grabbing the correct value.  With this method you will always get the field at search time without having to extract it in your searches.&lt;/P&gt;

&lt;P&gt;If you did want to tweak the regex, or write it yourself, a great tool to use is &lt;A href="http://www.regex101.com"&gt;www.regex101.com&lt;/A&gt; to build those regular expressions.&lt;/P&gt;</description>
    <pubDate>Mon, 01 May 2017 13:27:33 GMT</pubDate>
    <dc:creator>kmorris_splunk</dc:creator>
    <dc:date>2017-05-01T13:27:33Z</dc:date>
    <item>
      <title>how to extract the response time from below logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356725#M174845</link>
      <description>&lt;P&gt;The information has already changed.............&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 13:06:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356725#M174845</guid>
      <dc:creator>cholt520</dc:creator>
      <dc:date>2017-05-01T13:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract the response time from below logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356726#M174846</link>
      <description>&lt;P&gt;you can use the field extractor:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.3/Knowledge/ExtractfieldsinteractivelywithIFX"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.3/Knowledge/ExtractfieldsinteractivelywithIFX&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 13:10:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356726#M174846</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-05-01T13:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract the response time from below logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356727#M174847</link>
      <description>&lt;P&gt;This works at search time.  You could adapt it for use at index time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "\] \".*?\" \d+ - (?&amp;lt;responseTime&amp;gt;\d+)" | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 May 2017 13:15:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356727#M174847</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-05-01T13:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract the response time from below logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356728#M174848</link>
      <description>&lt;P&gt;via rex (in your search)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...| rex "\d{3}\s+-\s+(?&amp;lt;ms&amp;gt;\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;via props.conf (in search app - may require restart)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [sourcetypeName]
 EXTRACT-ms = \d{3}\s+-\s+(?&amp;lt;ms&amp;gt;\d+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 May 2017 13:16:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356728#M174848</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-05-01T13:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract the response time from below logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356729#M174849</link>
      <description>&lt;P&gt;If I am correct in assuming the number in bold is the response time, you an extract it via the search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR BASE SEARCH 
| rex field=_raw "\d{3} - (?&amp;lt;responsetime&amp;gt;\d+) \""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can also use the field extractor in Splunk to do this pretty easily by choosing a sample event and highlighting the value.  The field extractor will generate the regex for you, though in some cases you may need to edit that and tweak it.  In this case, I think Splunk would probably do a good job at grabbing the correct value.  With this method you will always get the field at search time without having to extract it in your searches.&lt;/P&gt;

&lt;P&gt;If you did want to tweak the regex, or write it yourself, a great tool to use is &lt;A href="http://www.regex101.com"&gt;www.regex101.com&lt;/A&gt; to build those regular expressions.&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 13:27:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356729#M174849</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-01T13:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract the response time from below logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356730#M174850</link>
      <description>&lt;P&gt;Fyi, the leading .* is almost always assumed with Splunk regex&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 15:20:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356730#M174850</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-05-01T15:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract the response time from below logs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356731#M174851</link>
      <description>&lt;P&gt;Point taken. =D&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 15:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-the-response-time-from-below-logs/m-p/356731#M174851</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-01T15:37:04Z</dc:date>
    </item>
  </channel>
</rss>

