10 Jan 2023
04:39 PM
- last edited on
19 Jun 2023
12:36 PM
by
Karolina_Linda
Hi,
Happy new year 😉
From the menu Dynatrace -> Manage -> Deployment status, I need to export the list of all servers on which OneAgent is installed, in csv or xls.
Thank you so much for your support and your great collaboration.
Solved! Go to Solution.
Hi @yvan_dauby
Try the attached python code
run it with your environment url (without leading https:// and trailing /) as first parameter and token as the second parameter.
The token need to get access to v1 entity/infrastructure/hosts and entity/infrastructure/processes apis
thank you so much Yos. I will test and i give you a feedback 😉
Have a good evening.
Yvan
Hi Yosi,
i tried your script but can you send me the same script with the value ../api/v2/entities/..., i have a old version i think. I get 404 error for all requests 😞
Thank you so much for your great collaboration 😉
Kind regards.
Yvan
Hi @yvan_dauby
IMO 404 is not an issue of v1 or v2 endpoints
Check if you are running the the py as follows: py dt-execl.py {your-env-id}.live.dynatrace.com {token id}
HTH
Yos
Hi Yos,
that's works correctly. Thank you so much. You are the best. Your script is the real good job !
I would like to get the number of the Host units by server for manage the licensing. What's the modification i must to implement from your script ? Thank you so much 😉
You are more than welcome @yvan_dauby
For HU report we used @Julius_Loman Dynatrace License Reporting Scripts its working like a charm !
HTH
Yos
thank you so much Yos.
I will try the script for the reporting licence. I'll keep you in touch.
Have a nice day.
Yvan