AnsweredAssumed Answered

How do you get a single minute's data from the APM API?

Question asked by Sam on Mar 29, 2017
Latest reply on Mar 30, 2017 by Hallett_German

If I request one minute of data with a 60s resolution, I expect one data-point which is the sum of the four 15s datapoints.  What I get is one data point that is the sum of three of those 15s datapoints (the ones from 30, 45 and 60, but not the one from 15).

 

Examples:

https://myhost:8444/data/query?agentRegex=[^\|]*\|[^\|]*\|[^\|]*&metricRegex=myMetric&period=15&start=201703291445&end=201703291446&format=xml 

<introscope-datapoints><datapoint><agent-name>SuperDomain|Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual)</agent-name><metric-name>myMetric</metric-name><end-timestamp>29 Mar 2017 14:45:15 GMT</end-timestamp><period-in-seconds>15</period-in-seconds><data-point-count>2</data-point-count><minimum>0</minimum><value>2</value><maximum>2</maximum></datapoint><datapoint><agent-name>SuperDomain|Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual)</agent-name><metric-name>myMetric</metric-name><end-timestamp>29 Mar 2017 14:45:30 GMT</end-timestamp><period-in-seconds>15</period-in-seconds><data-point-count>3</data-point-count><minimum>0</minimum><value>3</value><maximum>3</maximum></datapoint><datapoint><agent-name>SuperDomain|Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual)</agent-name><metric-name>myMetric</metric-name><end-timestamp>29 Mar 2017 14:45:45 GMT</end-timestamp><period-in-seconds>15</period-in-seconds><data-point-count>2</data-point-count><minimum>0</minimum><value>2</value><maximum>2</maximum></datapoint><datapoint><agent-name>SuperDomain|Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual)</agent-name><metric-name>myMetric</metric-name><end-timestamp>29 Mar 2017 14:46:00 GMT</end-timestamp><period-in-seconds>15</period-in-seconds><data-point-count>4</data-point-count><minimum>0</minimum><value>4</value><maximum>4</maximum></datapoint></introscope-datapoints>

As you can see, the values here add up to 11. However, if I change the period to 60, instead of 11, I get 9:
https://myhost:8444/data/query?agentRegex=[^\|]*\|[^\|]*\|[^\|]*&metricRegex=myMetric&period=60&start=201703291445&end=201703291446&format=xml 
<introscope-datapoints><datapoint><agent-name>SuperDomain|Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual)</agent-name><metric-name>myMetric</metric-name><end-timestamp>29 Mar 2017 14:46:00 GMT</end-timestamp><period-in-seconds>60</period-in-seconds><data-point-count>9</data-point-count><minimum>0</minimum><value>9</value><maximum>9</maximum></datapoint></introscope-datapoints>


It always seems to cut off the first of the 15s values when I ask for it as a 60s value.

Outcomes