14 Oct 2020
04:22 PM
- last edited on
03 Oct 2022
11:03 AM
by
Ana_Kuzmenchuk
I noticed that when using the same datapoint (timestamp) while pushing data to a timeseries on a custom device, there is a kind of average calculation - even though it is not exact.
eg. I posted 3 values : 460,480 and 0 and on the UI I got a value of 350.
Is there an option for overwriting the previous values or evenmore adding the new value to the previous one ?
Thanks in advance
Solved! Go to Solution.
14 Oct 2020 08:46 PM
I had the idea that the values were averaged. But given the values you provide that doesn't seem the case... In the UI, where does the 350 appear? In Custom Charts?
14 Oct 2020 09:15 PM
Hi and thanks for the reply
It was my mistake, I sent value 460 twice so 350 is the average.
So, the second part of my question is still to be replied :
"Is there an option for overwriting the previous values or evenmore adding the new value to the previous one ? "
I know that I can create a custom chart where I can use SUM aggregation, but I want to know what happens with Davis calculations if I send two different values for the same timestamp.
Thanks
14 Oct 2020 09:15 PM
Hi and thanks for the reply
It was my mistake, I sent value 460 twice so 350 is the average.
So, the second part of my question is still to be replied :
"Is there an option for overwriting the previous values or evenmore adding the new value to the previous one ? "
I know that I can create a custom chart where I can use SUM aggregation, but I want to know what happens with Davis calculations if I send two different values for the same timestamp.
Thanks
14 Oct 2020 10:35 PM
If you are sending the data using an ActiveGate extension, you have to option to push relative data. However, the extension query method (which you must implement for an extension) will run in minute intervals. Thus you can't send data more often using an extension.
In Dynatrace, timeseries metrics have the finest granularity of 1 minute anyway.
15 Oct 2020 07:52 AM
Hi Julius,
I am sending data through rest Api, so I control the timestamp value.
15 Oct 2020 08:50 AM
I understood that from your previous comments. I'm afraid this is how it works at the moment. and if you push more values within a minute an average is used regardless of the timestamp.
I'm not sure which API you are using (probably the "old" one - /api/v1/entity/infrastructure/custom/{customDeviceId} ). If that's correct, I'd recommend trying the new Metrics v2 API if that makes more sense for you. I guess you will love the new API.
It allows you to use delta's as well. I'm not sure about the multiple records within a minute.
See more here about the API here:
https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/
24 Apr 2026 04:03 PM - edited 24 Apr 2026 04:04 PM
Hoping someone can clarify this in 2026, if a cron job that is using https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/post-ingest-metrics REST API post to push 1 metrics with 1 unique timestamps in each line. What happens when the cron job re-sends data, so metrics with a identical timestamp and value could get pushed 2 or more times: (1) does the value get overwritten for that timestamp, (2) do the values get averaged per the same timestamp, or (3) do the values get summarized for the same timestamp?
24 Apr 2026 11:17 PM
You have two values ingested. Dynatrace takes this into account and stores min/max/sum/count/avg aggregations. So when querying your metric with count aggregation, you will have 2, sum will be the sum of all datapoints, min/max/avg will behave as expected.
There is no overwrite of datapoints.
Featured Posts