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

dt.entity.host dimensions when using metrics data explorer vs api are different

johannrenck
Visitor

Hi!, when using the following metricSelector:

 jmx.hikari.MaximumPoolSize:splitBy("dt.entity.host"):sum:sort(value(sum,descending)):limit(20)
 
In the browser data explorer it returns something like:
{
"dimensions": [
"tz-site-ccc-abcd",
"HOST-ABCDEFGHI"
],
"dimensionMap": {
"dt.entity.host": "HOST-ABCDEFGHI"
}
 
But when using the api it doesn't return the dimension tz-site-ccc-abcd, that has a more user friendly name for the host, Why the difference in the response?
 
Thanks!
 
Johann
 
 
 
4 REPLIES 4

there's some consideration you must take when coming to metric data points in API

1. use the same metric selector you've mentioned jmx.hikari.MaximumPoolSize:splitBy("dt.entity.host"):sum:sort(value(sum,descending)):limit(20) within the API with little transformation as mentioned in the following screenshot from the documentation https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-get-datapoints#parameters

MostafaHussein_0-1729548907184.png

 

2. make sure that you're using the same timeframe in API as you did in the data explorer, if you're using relative timeframe like `last 2 hours` so you can set it in the API parameters like this `?from=now-2h` and by default `to` query parameter is set to `now` or if you're using specific timeframe you can use it in this format `?from=1729549243&to=1729549243` (open this website will help you getting UNIX timestamps easily https://www.epochconverter.com/

3. make sure you're using the same resolution in your API parameters like `resolution=10m`

if there's miss understanding from my side just mention the format you're using and which API endpoint you're using v1 or v2 and I hope this helpful for you.

 

Certified Dynatrace Professional | Certified Dynatrace Services - Observability | Dynatrace Partner yourcompass.ca

Thanks for the reply, I can't see any difference, the data returned is the same but the data explorer adds a new dimension in the response:

dt01.PNGdt02.PNG

Peter_Youssef
Champion

Hello @johannrenck 

I believe it's related to the Dynatrace API Access limit as per the illustration below:

2024-10-22_16h39_54.png

and 😊

2024-10-22_16h58_22.png

2024-10-22_17h01_47.png

The below example might be a simulation to the raised concern

2024-10-22_17h05_51.png

Before the end 

2024-10-22_17h09_32.png

Finally Feel free to review: 

Hoping it adds value.

KR,

Peter.

Thanks for your reply, I tested it with limit 1 not sure if it will be reaching the access limit in any of the criteria.

Featured Posts