24 Apr 2020 04:09 PM
Synthetic API gives availability by location, but not the aggregated value. I think the following image explains the idea:
Solved! Go to Solution.
27 Apr 2020 09:30 AM
It would be great to get this!
04 May 2020 09:38 AM
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
04 May 2020 10:27 AM
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?
04 May 2020 10:40 AM
Done 😉
18 May 2022 01:30 AM
@Antonio, Could you please share the sample script which worked for you to get the above details?
18 May 2022 01:32 AM
Also, am looking to get the synthetics= monitors availabaility based on months/weeks/year. Can you sahre sample curl request for the same?
18 May 2022 08:09 PM
The curl is the one I referenced in my post on 19 May 2020. To do what I was asking for, you have to add the merge transformation, as referenced in the link that Philipp_Kastner referenced.
19 May 2020 05:36 AM
@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 ?
19 May 2020 11:47 AM
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"
23 May 2020 03:42 AM
Thank you so much @Antonio S. This is really helpful.
01 Apr 2022 09:39 AM
How to get the details of a particular synthetic , by executing the above query we are getting all the synthetic availability and also only the latest availaility