25 Nov 2019 01:22 AM
Hi,
I have a question about Dynatrace Metric API (API v2)
We are capturing builtin:host.cpu.user.
We wonder how Dynatrace order target hosts.
We use scope function, but the order is different from scope.
example
scope=entity(Host1,Host2,Host3)
response: Host2 -> Host3 -> Host1
Best Regards,
Natsumi Tanaka
Solved! Go to Solution.
14 Jan 2020 10:10 AM
Sebastian
15 Jan 2020 01:04 AM
Thank you for your response!
In our environment, hosts are sorted by IP address like this.
HOST-7395C0805A33209F | 172.16.74.51 |
HOST-E09873E2C4EB8658 | 172.16.74.85 |
HOST-389551CF7323D34E | 172.16.75.54 |
HOST-B25461C52627701A | 172.16.133.212 |
However, I understood there is no guarantee as to the sorting order of these results.
I asked the same question via chat and got answer from the team.
"The short answer is there is no guarantee as to the sorting order of these results.
Conceptually, your scope expression filters a sorted list of hosts, and the resulting list is still sorted. The sorting order in which you get the results on a single page of metric query cannot be known for sure in advance. Some metric queries are split into sub-queries and these are carried out in parallel - so there's no way of knowing which sub-query will finish first.
It would be best not to rely on the order as this is an internal implementation of our underlying infrastructure and such things might change in the future."