31 May 2020 12:10 AM - last edited on 13 Apr 2021 06:17 AM by MaciejNeumann
Iam trying to pull the Availability % of a Dynatrace Monitor through time series API.
Iam using the below query.
When I run this query the output that is returned is for all the locations and the value at different time intervals.
I need an aggregated value of availability % for a monitor.
Is there a way to aggregate and get a single output which say x% is the availability % of my Monitor in last 2 Hours.
I don't want the value % for each individual location for the time frame.
Solved! Go to Solution.
I believe using "resolution=Inf" is what you need.
Seems very similar to the problem I experienced before:
Thanks for confirming.
Can you please confirm the source for the below metric. Though the query is returning results curious to know the source/documentation for the below metric. I searched in v1 and v2 metrics section. Don't see the documentation for the metric. Please confirm
Yes, I use mainly v2. You should get your values with something like below, just put in the tenant (yyyy...) and Api Token (zzzzzzz...):
curl -X GET "https://yyyyyy.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin%3Asynthetic.browser.av...; -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token zzzzzzzzzzzzzzzzzzzzzzzzz"
The doccumentation is available in the following locations:
Thanks for the details. I checked both the sources. But still I don't see this metric in these documentation. Can you please confirm.
Now Iam trying to find the equivalent metric for HTTP Monitor.
I don't see any built-in metrics for Synthetic monitors when I check for V2 metrics. Please help
If you want to know all metrics, the best way is to query the list of metrics. This can be done by issuing the following API calls below. You should replace with your environment and API token. Please also notice that nextPageKey should be different, and if you've not done this before, look for it in the beginning of the reply of the first call:
Looks like you need to use "builtin:synthetic.http.availability.location.total" but I have never used that before, as I don't have HTTP monitors.