Hello,
Appdynamics agents cannot be exported. There are many similar topics in the forum. However, there were no definitive answers in my opinion.
I'm not a programmer. That's why I'm sharing the script I prepared for those who need ready-made codes like me.
For non-programmers like me, I think it will be useful for most people if such sample codes are shared. It may be under a separate title, but I think it would be really good for everyone and appdynamics teams to share powershell, python, api query examples. (Life gets better when shared 🙂 )
sorry but moderator friends are just giving directions.
For those who don't know software like me please I ask developers and script writers to share more scripts and software code.
import pandas as pd import requests import urllib3 urllib3.disable_warnings() from requests.auth import HTTPBasicAuth auth = HTTPBasicAuth('yourusername@customer1', 'yourpasswd')
app_url='https://yourapmurl/controller/rest/applications?output=json' app_resp=requests.get(app_url , verify=False, auth=auth).json()
dfs=list() for item in app_resp: name,node_id=item['name'],item['id'] node_url=f'https://yourappmurl/controller/rest/applications/{node_id}/nodes?output=json' response=requests.get(node_url , verify=False, auth=auth).json() df=pd.DataFrame(response) if len(df)>0: df=df[['machineName','tierName','appAgentVersion']] df['name']=name df['node_id']=node_id else: print(node_id) dfs.append(df) result=pd.concat(dfs).reset_index(drop=True) save_dir=r'export_your_path' result.to_excel(f'{save_dir}\\yourdata.xlsx',index=False)
... View more