<?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 achieve average response (span) and convert from ms to secs? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/615844#M50570</link>
    <description>&lt;P&gt;The string is not converting the response time (tmdEvntMs) from milliseconds to seconds.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Oct 2022 15:36:42 GMT</pubDate>
    <dc:creator>msarkaus</dc:creator>
    <dc:date>2022-10-04T15:36:42Z</dc:date>
    <item>
      <title>How to achieve average response (span) and convert from ms to secs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/615666#M50541</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm struggling to convert two status codes (200 and 400) from ms to secs and display the values in a line chart.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;tmdEvntMs&lt;/EM&gt; is the API response time in ms, and &lt;EM&gt;httpStatus&lt;/EM&gt; is my status codes.&lt;/P&gt;
&lt;P&gt;I tried using &lt;EM&gt;foreach&lt;/EM&gt;, and&amp;nbsp; it just converts the response time back to ms.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;timechart span=6h avg(tmdEvntMs) AS avg_response by httpStatus&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;| foreach * [eval avg_response=round(avg_response/1000, 2)]&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="msarkaus_0-1664811028929.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21828i451CAEDA36E3CA2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="msarkaus_0-1664811028929.png" alt="msarkaus_0-1664811028929.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any suggestions would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 16:01:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/615666#M50541</guid>
      <dc:creator>msarkaus</dc:creator>
      <dc:date>2022-10-03T16:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve average response (span) and convert from ms to secs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/615669#M50542</link>
      <description>&lt;P&gt;Since there's only one avg_response field there's no need for the foreach command.&amp;nbsp; Just use an eval to make the desired conversion.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; timechart span=6h avg(tmdEvntMs) AS avg_response by httpStatus
| eval avg_response=round(avg_response/1000, 2)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 03 Oct 2022 17:08:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/615669#M50542</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-10-03T17:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve average response (span) and convert from ms to secs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/615683#M50544</link>
      <description>&lt;P&gt;I used the&amp;nbsp;&lt;EM&gt;foreach&lt;/EM&gt;&amp;nbsp;command because,&amp;nbsp;I couldn't get the response time(tmdEvntMs) to&amp;nbsp;convert from ms to secs. It would return the 6 hour average for both httpstatus codes (200 and 400) but it was showing ms.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart span=6h avg(tmdEvntMs) AS avg_response by httpStatus
| eval avg_response=round(avg_response/1000, 2)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="msarkaus_3-1664818358593.png" style="width: 759px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21837iEE47C8B2DCF6266B/image-dimensions/759x132?v=v2" width="759" height="132" role="button" title="msarkaus_3-1664818358593.png" alt="msarkaus_3-1664818358593.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I remove by httpStatus, it converts the response from ms to secs.&lt;/P&gt;&lt;P&gt;| timechart span=6h avg(tmdEvntMs) AS avg_response&lt;BR /&gt;| eval avg_response=round(avg_response/1000, 2)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="msarkaus_2-1664818129289.png" style="width: 599px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21836i861F23582C39051F/image-dimensions/599x102?v=v2" width="599" height="102" role="button" title="msarkaus_2-1664818129289.png" alt="msarkaus_2-1664818129289.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm apologize if I was not clear, I would like to show the 6 hour average for both status codes (200 and 400).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 17:43:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/615683#M50544</guid>
      <dc:creator>msarkaus</dc:creator>
      <dc:date>2022-10-03T17:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve average response (span) and convert from ms to secs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/615844#M50570</link>
      <description>&lt;P&gt;The string is not converting the response time (tmdEvntMs) from milliseconds to seconds.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 15:36:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/615844#M50570</guid>
      <dc:creator>msarkaus</dc:creator>
      <dc:date>2022-10-04T15:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve average response (span) and convert from ms to secs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/615863#M50572</link>
      <description>&lt;P&gt;Why don't you convert the milliseconds to seconds before running the timechart?&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval tmdEvntSec=ROUND(tmdEvntMs/1000, 4)
| timechart span=6h avg(tmdEvntSec) AS avg_response by httpStatus&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 17:15:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/615863#M50572</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2022-10-04T17:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve average response (span) and convert from ms to secs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/616232#M50601</link>
      <description>&lt;P&gt;This worked.. Thank you!!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 21:37:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/616232#M50601</guid>
      <dc:creator>msarkaus</dc:creator>
      <dc:date>2022-10-06T21:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve average response (span) and convert from ms to secs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/616247#M50603</link>
      <description>&lt;P&gt;If your problem is resolved, then please click the "Accept as Solution" button to help future readers.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 00:00:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-achieve-average-response-span-and-convert-from-ms-to-secs/m-p/616247#M50603</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-10-07T00:00:18Z</dc:date>
    </item>
  </channel>
</rss>

