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/