Splunk AppDynamics

App agent and Machine agent list export python code

Haluk_Yaşar_Ero
Path Finder

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)

Labels (3)
Tags (3)

open768
Path Finder

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.

image.jpeg

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

iamryan
Community Manager
Community Manager

Hi @Haluk Yaşar.Erol,

Thanks so much for sharing this! I'm sure the community will find this very valuable!

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...