25 Aug 2020 11:33 AM
Hello,
I would like to extract the values of the keyrequest defined on services tagged with a specific value. On the timeseries API, It was possible to do that but it seems it is not working on the Metrics API:
https://ENV.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:service.keyRequest.response.time:names:percentile(50),builtin:service.keyRequest.count.total:parents:names&resolution=Inf&from=now-30m&entitySelector=type(SERVICE_METHOD),mzName("MZLABEL")
The query above works but extract ALL the keyrequest under the specified Management Zone. What we would like to achieve is this:
https://ENV.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:service.keyRequest.response.time:names:percentile(50),builtin:service.keyRequest.count.total:parents:names&resolution=Inf&from=now-30m&entitySelector=type(SERVICE_METHOD),tag("TAGVALUE")
Is it possible to do that? When we set the tag, the payload is empty.
Thank you,
26 Aug 2020 01:29 PM
Hi Davide,
are you using the Dynatrace APIv2 Interface in order to translate your request?
Or have you wrote the Api call in a human readable form for us?
this would be a real transalation of the Apiv2 after the "query?"
metricSelector=builtin%3Ahost.disk.usedPct%3Anames&resolution=Inf&from=now-4m&to=now&entitySelector=type%28%22HOST%22%29%2C%20tag%28%22windows%22%29
27 Aug 2020 11:53 AM
I am using Postman to execute the call above. It should be automatically converted in the correct format. Infact it works fine in other context (Host Metrics, Service metrics are working fine. The only metrics not working applying tags are the keyrequests one