17 Jul 2020 10:46 PM - last edited on 21 Aug 2024 11:33 AM by Michal_Gebacki
i want to use the rest api in dynatrace one-agent to get a count of requests under 1 second using the dynatrace one-agent rest api
Solved! Go to Solution.
17 Jul 2020 11:00 PM
To get anything like that out through the API it first needs to be a metric. There is no metric for this out of the box so you would need to create a calculated service metric like below where your base metric is Request count and your condition is the Response time is under 1000ms.
Once you have done that this new metric will be calculated for all of your services (you can filter this down to only certain services with additional conditions). As a metric it will be available through the metrics API.
https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/
18 Jul 2020 11:20 AM
I usually do it at the service level, in multidimensional analysis. I do it that way so it doesn't consume more than the custom metrics I need.
@James K.: correct me if I'm wrong: the way you suggested will consume one custom metric for each existing service, right?
20 Jul 2020 06:05 PM
That is correct - this essentially turns the output of the MDA into a first class metric that you can use like any of the built in ones. Each dimensions (in this case service) consumes one metric. Keep an eye out though there are going to be some changes in how metrics are licensed coming up.
20 Jul 2020 07:54 PM
Regarding DDUs, I think everything is public already, and has been communicated to clients...
Interesting, because there is not a single reference here in the Community yet, but has been available for some weeks now in the documentation:
https://www.dynatrace.com/support/help/reference/davis-data-units/