cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Synthetic API does not give aggregated availability

Synthetic API gives availability by location, but not the aggregated value. I think the following image explains the idea:

7 REPLIES 7

davide_diana1
Participant

It would be great to get this!

Philipp_Kastner
Dynatrace Pro
Dynatrace Pro

Hi Antonio, did you have a look at the metrics API? I think this should be possible with the merge transformation. See https://www.dynatrace.com/support/help/shortlink/api-metrics-v2-selector#merge-transformation for details.

Kind regards, Philipp

Yes, you are right!. Just changed my script and it's not splitting the value any more.

Now, this is not an RFE anymore. Can this be changed to a question?

Done 😉

If you have any questions about the Forum, you can contact me at maciej.neumann@dynatrace.com

pushpakala_devi
Newcomer

@Antonio S. , Could you help me fetching synthetic monitor availability and response time using API method ? where shall I find the list of metric selector to fetch the above 2 metrics ?

I mainly use v2 of the API:

https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/

One example would be like the following, which is for yesterday's values (mind you have to put your environment as yyyyyy and your API as zzzzzzzzzzzzzzzzzzzzzzzzz):

curl -X GET "https://yyyyyy.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin%3Asynthetic.browser.availability.location.total&resolution=Inf&from=1589760000000&to=1589846400000" -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token zzzzzzzzzzzzzzzzzzzzzzzzz"

Thank you so much @Antonio S. This is really helpful.