<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: App agent and Machine agent list export python code in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/App-agent-and-Machine-agent-list-export-python-code/m-p/720067#M1826</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.appdynamics.com/t5/user/viewprofilepage/user-id/147481"&gt;@Haluk Yaşar.Erol&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Thanks so much for sharing this! I'm sure the community will find this very valuable!&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jan 2023 19:19:47 GMT</pubDate>
    <dc:creator>iamryan</dc:creator>
    <dc:date>2023-01-04T19:19:47Z</dc:date>
    <item>
      <title>App agent and Machine agent list export python code</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/App-agent-and-Machine-agent-list-export-python-code/m-p/720066#M1825</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Appdynamics agents cannot be exported. There are many similar topics in the forum. However, there were no definitive answers in my opinion.&lt;/P&gt;
&lt;P&gt;I'm not a programmer. That's why I'm sharing the script I prepared for those who need ready-made codes like me.&lt;/P&gt;
&lt;P&gt;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. (&lt;STRONG&gt;Life gets better when shared &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/STRONG&gt; )&lt;/P&gt;
&lt;P&gt;sorry but moderator friends are just giving directions.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For those who don't know software like me please I ask developers and script writers to share more scripts and software code.&lt;/STRONG&gt;&lt;/P&gt;


&lt;P&gt;import pandas as pd&lt;BR /&gt;import requests&lt;BR /&gt;import urllib3&lt;BR /&gt;urllib3.disable_warnings()&lt;BR /&gt;from requests.auth import HTTPBasicAuth&lt;BR /&gt;auth = HTTPBasicAuth('yourusername@customer1', 'yourpasswd')&lt;/P&gt;
&lt;P&gt;app_url='&lt;A href="https://yourapmurl/controller/rest/applications?output=json" target="_blank" rel="noopener nofollow noreferrer"&gt;https://yourapmurl/controller/rest/applications?output=json&lt;/A&gt;'&lt;BR /&gt;app_resp=requests.get(app_url , verify=False, auth=auth).json()&lt;/P&gt;
&lt;P&gt;dfs=list()&lt;BR /&gt;for item in app_resp:&lt;BR /&gt;name,node_id=item['name'],item['id']&lt;BR /&gt;node_url=f'&lt;A href="https://yourappmurl/controller/rest/applications/{node_id}/nodes?output=json" target="_blank" rel="noopener nofollow noreferrer"&gt;https://yourappmurl/controller/rest/applications/{node_id}/nodes?output=json&lt;/A&gt;'&lt;BR /&gt;response=requests.get(node_url , verify=False, auth=auth).json()&lt;BR /&gt;df=pd.DataFrame(response)&lt;BR /&gt;if len(df)&amp;gt;0:&lt;BR /&gt;df=df[['machineName','tierName','appAgentVersion']]&lt;BR /&gt;df['name']=name&lt;BR /&gt;df['node_id']=node_id&lt;BR /&gt;else:&lt;BR /&gt;print(node_id)&lt;BR /&gt;dfs.append(df)&lt;BR /&gt;result=pd.concat(dfs).reset_index(drop=True)&lt;BR /&gt;save_dir=r'export_your_path'&lt;BR /&gt;result.to_excel(f'{save_dir}\\yourdata.xlsx',index=False)&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 10:46:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/App-agent-and-Machine-agent-list-export-python-code/m-p/720066#M1825</guid>
      <dc:creator>Haluk_Yaşar_Ero</dc:creator>
      <dc:date>2023-01-04T10:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: App agent and Machine agent list export python code</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/App-agent-and-Machine-agent-list-export-python-code/m-p/720067#M1826</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.appdynamics.com/t5/user/viewprofilepage/user-id/147481"&gt;@Haluk Yaşar.Erol&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Thanks so much for sharing this! I'm sure the community will find this very valuable!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 19:19:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/App-agent-and-Machine-agent-list-export-python-code/m-p/720067#M1826</guid>
      <dc:creator>iamryan</dc:creator>
      <dc:date>2023-01-04T19:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: App agent and Machine agent list export python code</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/App-agent-and-Machine-agent-list-export-python-code/m-p/720068#M1827</link>
      <description>&lt;P&gt;Hey &lt;A href="https://community.appdynamics.com/t5/user/viewprofilepage/user-id/147481"&gt;@Haluk Yaşar.Erol&lt;/A&gt;&amp;nbsp;, I applaud that you're sharing your code. great!!&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also use the api for extracting agent versions for each application. heres a screengrab of what it looks like.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="all versions.jpg" style="width: 636px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.jpeg"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/35547i11CC07CBF0946C5A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.jpeg" alt="image.jpeg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Rapport can be found at&amp;nbsp;&lt;A href="https://chickenkatsu.co.uk/apps/rapport" target="_blank" rel="nofollow noopener noreferrer"&gt;https://chickenkatsu.co.uk/apps/rapport&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;maybe we can collaborate, im happy to add features to Rapport that you or anyone in the community would find useful.&lt;BR /&gt;&lt;BR /&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sunil&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 22:09:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/App-agent-and-Machine-agent-list-export-python-code/m-p/720068#M1827</guid>
      <dc:creator>open768</dc:creator>
      <dc:date>2023-01-10T22:09:23Z</dc:date>
    </item>
  </channel>
</rss>

