Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
01-04-2023 02:46 AM - last edited on 01-04-2023 11:16 AM by Ryan.Paredez
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)
01-04-2023 11:19 AM
Thanks so much for sharing this! I'm sure the community will find this very valuable!
Thanks,
Ryan, Cisco AppDynamics Community Manager
Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.
Check out Observabiity in Action
new deep dive videos weekly in the Knowledge Base.
01-10-2023 02:09 PM
Hey @Haluk Yaşar.Erol , I applaud that you're sharing your code. great!!
Also you might want to look at my open source "rapport" tool which I also developed it like you, starting with simple scripts and going on to develop a complex web application.
I also use the api for extracting agent versions for each application. heres a screengrab of what it looks like.
Rapport can be found at https://chickenkatsu.co.uk/apps/rapport
maybe we can collaborate, im happy to add features to Rapport that you or anyone in the community would find useful.
regards
Sunil
User | Count |
---|---|
4 | |
3 | |
3 | |
1 | |
1 | |
1 |
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form