<?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-to retrieve fine grain metric values for a time period in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-retrieve-fine-grain-metric-values-for-a-time-period/m-p/47818#M199</link>
    <description>&lt;P&gt;&lt;BR /&gt;I am attempting to retrieve distinct datapoints from a custom plugin via the API and I can only retrieve a summary of the data, not individual data points. This is the query I am running.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;https://XXX.dynatrace-managed.com/e/XXX-XXX-XXX-XXX-XXX-XXX/api/v1/timeseries?Api-Token=XXXXXX&amp;amp;amptimeseriesId=custom.python.XX_XXX_Queue_Plugin:XXXIOWaits&amp;amp;ampqueryMode=series&amp;amp;ampstartTimestamp=1514648927000&amp;amp;ampendTimestamp=1514652527000&amp;amp;ampaggregationType=avg&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;It returns the expected payload:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{&lt;BR /&gt;    "result": {&lt;BR /&gt;        "dataPoints": {},&lt;BR /&gt;        "timeseriesId": "custom.python.XX_XXX_Queue_Plugin:XXXIOWaits",&lt;BR /&gt;        "unit": "Count (count)",&lt;BR /&gt;        "entities": {},&lt;BR /&gt;        "resolutionInMillisUTC": 3610000,&lt;BR /&gt;        "aggregationType": "AVG"&lt;BR /&gt;    }&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;However this is a summary of the whole 1 hour period. (3610000 MilliSec)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I would like to return the values by the minute, or the values for every 30 minutes. (i.e. resolutionInMillisUTC = 180000000, or = 60000.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In the end, I'd like to increase the timeframe to 1 month and pull the SUM of the data over every 30 minutes.&lt;/P&gt;</description>
    <pubDate>Wed, 26 May 2021 11:42:50 GMT</pubDate>
    <dc:creator>matt_brend1</dc:creator>
    <dc:date>2021-05-26T11:42:50Z</dc:date>
    <item>
      <title>How-to retrieve fine grain metric values for a time period</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-retrieve-fine-grain-metric-values-for-a-time-period/m-p/47818#M199</link>
      <description>&lt;P&gt;&lt;BR /&gt;I am attempting to retrieve distinct datapoints from a custom plugin via the API and I can only retrieve a summary of the data, not individual data points. This is the query I am running.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;https://XXX.dynatrace-managed.com/e/XXX-XXX-XXX-XXX-XXX-XXX/api/v1/timeseries?Api-Token=XXXXXX&amp;amp;amptimeseriesId=custom.python.XX_XXX_Queue_Plugin:XXXIOWaits&amp;amp;ampqueryMode=series&amp;amp;ampstartTimestamp=1514648927000&amp;amp;ampendTimestamp=1514652527000&amp;amp;ampaggregationType=avg&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;It returns the expected payload:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{&lt;BR /&gt;    "result": {&lt;BR /&gt;        "dataPoints": {},&lt;BR /&gt;        "timeseriesId": "custom.python.XX_XXX_Queue_Plugin:XXXIOWaits",&lt;BR /&gt;        "unit": "Count (count)",&lt;BR /&gt;        "entities": {},&lt;BR /&gt;        "resolutionInMillisUTC": 3610000,&lt;BR /&gt;        "aggregationType": "AVG"&lt;BR /&gt;    }&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;However this is a summary of the whole 1 hour period. (3610000 MilliSec)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I would like to return the values by the minute, or the values for every 30 minutes. (i.e. resolutionInMillisUTC = 180000000, or = 60000.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In the end, I'd like to increase the timeframe to 1 month and pull the SUM of the data over every 30 minutes.&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 11:42:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/How-to-retrieve-fine-grain-metric-values-for-a-time-period/m-p/47818#M199</guid>
      <dc:creator>matt_brend1</dc:creator>
      <dc:date>2021-05-26T11:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: How-to retrieve fine grain metric values for a time period</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-retrieve-fine-grain-metric-values-for-a-time-period/m-p/47819#M200</link>
      <description>&lt;P&gt;&lt;BR /&gt;	I might have answered part of my own question.  Looking at the results payload the dataPoints and entities are missing.  I tried a different query:&lt;/P&gt;&lt;BR /&gt;&lt;PRE&gt;https://XXX.dynatrace-managed.com/e/XXX-XXX-XXX-XXX-XXX-XXX/api/v1/timeseries?Api-Token=XXXXXX&amp;amp;amptimeseriesId=custom.python.XX_XXX_Queue_Plugin:XXXCPUWaits&amp;amp;amprelativeTime=day&amp;amp;ampaggregationType=sum&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;	And this one returned &lt;EM&gt;some&lt;/EM&gt; data.&lt;/P&gt;&lt;BR /&gt;&lt;PRE&gt;{&lt;BR /&gt;    "result": {&lt;BR /&gt;        "dataPoints": {&lt;BR /&gt;            "PROCESS_GROUP_INSTANCE-077D7A9E5A605D64": [&lt;BR /&gt;                [&lt;BR /&gt;                    1514568600000,&lt;BR /&gt;                    1522320&lt;BR /&gt;                ],&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;                [&lt;BR /&gt;                    1514654400000,&lt;BR /&gt;                    null&lt;BR /&gt;                ],&lt;BR /&gt;                [&lt;BR /&gt;                    1514655000000,&lt;BR /&gt;                    null&lt;BR /&gt;                ]&lt;BR /&gt;            ]&lt;BR /&gt;        },&lt;BR /&gt;        "timeseriesId": "custom.python.XXX_XXX_Queue_Plugin:XXXCPUWaits",&lt;BR /&gt;        "unit": "Count (count)",&lt;BR /&gt;        "entities": {&lt;BR /&gt;            "PROCESS_GROUP_INSTANCE-077D7A9E5A605D64": "CUSTOMXXX"&lt;BR /&gt;        },&lt;BR /&gt;        "resolutionInMillisUTC": 600000,&lt;BR /&gt;        "aggregationType": "SUM"&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;&amp;lt;br&amp;gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;So it appears that this is working to retrieve data, however I don't know why the later time periods in the day are null.  If I look in the console I see data for all of today.&lt;/P&gt;&lt;P&gt;I then tried to pull data for a month and see that it's aggregated to 12 hours.&lt;/P&gt;&lt;P&gt;So the two outstanding questions are:&lt;/P&gt;&lt;P&gt;1. Why is the API not pulling all available data&lt;/P&gt;&lt;P&gt;2. Is it possible to specify the aggregation to a shorter time period?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Dec 2017 17:40:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/How-to-retrieve-fine-grain-metric-values-for-a-time-period/m-p/47819#M200</guid>
      <dc:creator>matt_brend1</dc:creator>
      <dc:date>2017-12-30T17:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: How-to retrieve fine grain metric values for a time period</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/How-to-retrieve-fine-grain-metric-values-for-a-time-period/m-p/47820#M201</link>
      <description>&lt;P&gt;Hi Matthew.&lt;/P&gt;&lt;P&gt;The API is pulling all of the data and does not artificially miss data points out BUT it reacts dynamically upon your selected timeframe in order to not deliver too large payload sizes and to cope with the aggregation retention strategy. Dynatrace typically stores one minute resolution for all metrics for 14 days. So if you select any hour timeframe within the last 2 weeks you will get all minute data points. &lt;/P&gt;&lt;P&gt;One aspect to note here is that if one data point shows a null value no measurement was stored in that minute. If you query a larger timeframe the same data point will get aggregated to a 5 minute data points. If any of the individual 5 minute data points contained a measurement the resulting aggregated data point will contain the aggregated measurement. &lt;/P&gt;&lt;P&gt;This explains why the highest resolution contains null values while the aggregated metric does probably not show null measurements.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 08:28:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/How-to-retrieve-fine-grain-metric-values-for-a-time-period/m-p/47820#M201</guid>
      <dc:creator>wolfgang_beer</dc:creator>
      <dc:date>2018-01-02T08:28:39Z</dc:date>
    </item>
  </channel>
</rss>

