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.
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.
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
HTHYos
dt-execl.zip (2.15 KB)
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
Hi
I am getting this error
py.exe : Traceback (most recent call last):
At line:1 char:1
+ py.exe .\dt-execl.py https://{environmentid}.live.dynatrace.com dt0c01.2AVJU …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Traceback (most recent call last)::String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
File “.\dt-execl.py”, line 2, in <module>
import requests
ModuleNotFoundError: No module named ‘requests’
Hi,
Looks like are missing “requests” Python package installed.
Best regards
Hi
Am runinng from powershell. Could you pls clarify?
Hi,
Base on before messages, that is a python script, it means, you should have Python installed + requests module.
Best regards