<?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: Can anyone help me with a query that detects when a page takes longer than 30 seconds to load? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419474#M73926</link>
    <description>&lt;P&gt;no result found .. if I am doing table duration.. that means not extracting properly right ? &lt;/P&gt;

&lt;P&gt;I got zero result.. please help me with that..&lt;/P&gt;

&lt;P&gt;Thanks, &lt;BR /&gt;
Satya&lt;/P&gt;</description>
    <pubDate>Fri, 01 Mar 2019 21:45:23 GMT</pubDate>
    <dc:creator>satyaallaparthi</dc:creator>
    <dc:date>2019-03-01T21:45:23Z</dc:date>
    <item>
      <title>Can anyone help me with a query that detects when a page takes longer than 30 seconds to load?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419467#M73919</link>
      <description>&lt;P&gt;Can anyone help me with a query that detects when a page takes longer than 30 seconds to load? I got URL extraction, and I want to know how to get startTime and endTime into results to get duration from that event, which is in JSON format.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"Name":"url","Value":"\"/Services/****/*******-Services-DynamicMenuService/GetMenuForOutlet\""}{"Name":"duration","Value":"574"},{"Name":"logSource","Value":"\"HttpInterceptor\""},{"Name":"result","Value":"\"failed\""},{"Name":"startTime","Value":"\"2019-03-01T19:07:30.368Z\""},{"Name":"endTime","Value":"\"2019-03-01T19:07:30.942Z\""},{"Name":"createDate","Value":"\"2019-03-01T19:07:30.942Z\""},{"Name":"body","Value":"\"   
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Mar 2019 19:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419467#M73919</guid>
      <dc:creator>satyaallaparthi</dc:creator>
      <dc:date>2019-03-01T19:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone help me with a query that detects when a page takes longer than 30 seconds to load?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419468#M73920</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| your search
| rex "startTime\",\"Value\":\"\\"(?&amp;lt;startTime&amp;gt;[\d\-T:\.Z]*).*?endTime\",\"Value\":\"\\"(?&amp;lt;endTime&amp;gt;[\d\-T:\.Z]*)"
|eval start = strptime(startTime, "%Y-%m-%dT%H:%M:%S.%3QZ")
|eval end = strptime(endTime, "%Y-%m-%dT%H:%M:%S.%3QZ")
| eval duration = end - start
| search duration &amp;gt; 30
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;All the best&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 19:54:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419468#M73920</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-03-01T19:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone help me with a query that detects when a page takes longer than 30 seconds to load?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419469#M73921</link>
      <description>&lt;P&gt;How are you extracting field url? You should be able to use the same method to extract startTime and endTime fields (regex will be updated of course). Then you can use strptime function to convert string formatted date to epoch to calculate duration/response time. &lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/454902/how-to-calculate-the-duration-of-a-single-event.html"&gt;https://answers.splunk.com/answers/454902/how-to-calculate-the-duration-of-a-single-event.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 20:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419469#M73921</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-01T20:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone help me with a query that detects when a page takes longer than 30 seconds to load?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419470#M73922</link>
      <description>&lt;P&gt;Error in 'rex' command: Encountered the following error while compiling the regex 'startTime","Value":"\"(?[^]&lt;EM&gt;).&lt;/EM&gt;?endTime","Value":"\"(?[^]*)': Regex: missing terminating ] for character class.&lt;/P&gt;

&lt;P&gt;The search job has failed due to an error. You may be able view the job in the Job Inspector.&lt;/P&gt;

&lt;P&gt;getting the above error and not allowing me to go further.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 20:14:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419470#M73922</guid>
      <dc:creator>satyaallaparthi</dc:creator>
      <dc:date>2019-03-01T20:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone help me with a query that detects when a page takes longer than 30 seconds to load?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419471#M73923</link>
      <description>&lt;P&gt;I have updated my answer. Can you give it another try?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 20:20:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419471#M73923</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-03-01T20:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone help me with a query that detects when a page takes longer than 30 seconds to load?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419472#M73924</link>
      <description>&lt;P&gt;Error in 'SearchParser': Missing a search command before '\'. Error at position '142' of search query 'search index=* sourcetype="mysrctpe"..{snipped} {errorcontext = tartTime&amp;gt;[\d-T:.Z]*}'.&lt;/P&gt;

&lt;P&gt;again error&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 20:32:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419472#M73924</guid>
      <dc:creator>satyaallaparthi</dc:creator>
      <dc:date>2019-03-01T20:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone help me with a query that detects when a page takes longer than 30 seconds to load?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419473#M73925</link>
      <description>&lt;P&gt;OK this one should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search
| rex "startTime\",\"Value\":\"\\\"(?&amp;lt;startTime&amp;gt;[\d\-T:\.Z]*).*?endTime\",\"Value\":\"\\\"(?&amp;lt;endTime&amp;gt;[\d\-T:\.Z]*)"
 |eval start = strptime(startTime, "%Y-%m-%dT%H:%M:%S.%3QZ")
 |eval end = strptime(endTime, "%Y-%m-%dT%H:%M:%S.%3QZ")
 | eval duration = end - start
 | search duration &amp;gt; 30
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Mar 2019 20:46:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419473#M73925</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-03-01T20:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone help me with a query that detects when a page takes longer than 30 seconds to load?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419474#M73926</link>
      <description>&lt;P&gt;no result found .. if I am doing table duration.. that means not extracting properly right ? &lt;/P&gt;

&lt;P&gt;I got zero result.. please help me with that..&lt;/P&gt;

&lt;P&gt;Thanks, &lt;BR /&gt;
Satya&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 21:45:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419474#M73926</guid>
      <dc:creator>satyaallaparthi</dc:creator>
      <dc:date>2019-03-01T21:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone help me with a query that detects when a page takes longer than 30 seconds to load?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419475#M73927</link>
      <description>&lt;P&gt;If am extracting duration from IFX.. its not extracting for all events properly.. we need startTime and endTime but I can't able to extract those.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 21:47:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419475#M73927</guid>
      <dc:creator>satyaallaparthi</dc:creator>
      <dc:date>2019-03-01T21:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone help me with a query that detects when a page takes longer than 30 seconds to load?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419476#M73928</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search
| rex "startTime[^\:]+\:[^\d]+(?&amp;lt;startTime&amp;gt;[^Z]+Z).+?endTime[^\:]+\:[^\d]+(?&amp;lt;endTime&amp;gt;[^Z]+Z)"
|eval startTime= strptime(startTime, "%Y-%m-%dT%H:%M:%S.%3QZ")
 |eval endTime= strptime(endTime, "%Y-%m-%dT%H:%M:%S.%3QZ")
 | eval duration = endTime-startTime
| table duration
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Mar 2019 22:21:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419476#M73928</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-01T22:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone help me with a query that detects when a page takes longer than 30 seconds to load?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419477#M73929</link>
      <description>&lt;P&gt;What about this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; your search
 | rex "startTime\",\"Value\":\"\\\"(?&amp;lt;startTime&amp;gt;[\d\-T:\.Z]*).*?endTime\",\"Value\":\"\\\"(?&amp;lt;endTime&amp;gt;[\d\-T:\.Z]*)"
  |eval start = strptime(startTime, "%Y-%m-%dT%H:%M:%S.%3QZ")
  |eval end = strptime(endTime, "%Y-%m-%dT%H:%M:%S.%3QZ")
  | eval duration = end - start
| table *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Mar 2019 22:46:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-anyone-help-me-with-a-query-that-detects-when-a-page-takes/m-p/419477#M73929</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-03-01T22:46:43Z</dc:date>
    </item>
  </channel>
</rss>

