In the Dynatrace V2 API, my query returns the data however it gives me the cryptic host-Id.
I get this back (CSV Format):
metricId,dt.entity.host,time,value
builtin:host.cpu.system,HOST-FFFFFFCFD79DB1E0,4/6/2021 12:45,0.778690974
How can I get the actual server name back rather than dt.entity.host?
Any help is appreciated.
Thanks,
Lou
Solved! Go to Solution.
You need to use the ':names' transformation described here:
https://www.dynatrace.com/support/help/shortlink/api-metrics-v2-selector#names-transformation
James, how would you modify this line?
oooo, wait, I think I got it. Does this look right??
builtin:host.cpu.(system):names:merge(1)
@louis_gallo that is right! You just don't need the parentesis if you only want "system":
builtin:host.cpu.system:names:merge
You would put parenthesis if you want another value regarding the cpu:
builtin:host.cpu.(system,usage):names:merge
v2 are tricky but really cool, once you wrap your mind around it!
Thanks to all for helping me to get my feet wet. I'll be working on app stats next through the V2 API. Fun fun fun and more questions.