Hi
I am trying to get the max value of metric data point using API for last 1 hour. I want the exact timestamp returned in response. But I am always getting the timestamp as to value I framed in query. In the below example I am getting timestamp as 2022-10-11T10:00:00.
https://abc.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:host.cpu.usage:fold(max):filter(or(eq("dt.entity.host","HOST")))&from=2022-10-11T00:00:00.000%2B05:30&to=2022-10-11T10:00:00.000%2B05:30
response:
“timestamps”: [ 1665462600000 ], “values”: [ 100 ]
Please help me to overcome this problem
Thanks!
The finest resolution that Dynatrace is able to provide is 1 minute. You will not be able to get the exact timestamp in seconds, milliseconds, etc.; because Dynatrace does not store it.
If minute resolution is good enough for you, you can request it by using the resolution parameter: Metrics API - GET metric data points — Dynatrace Docs