Skip to content

Instantly share code, notes, and snippets.

@kylefurlong
Last active Nov 1, 2019
Embed
What would you like to do?
Python Agent API example
#!/usr/bin/python
import sys
import time
from appdynamics.agent import api as appd
appd_env = { 'APPD_CONFIG_FILE': '/home/stevew/code/python/appd.config' }
print 'Starting Appd'
if appd.init(appd_env, 5000):
print 'Started'
else:
print 'Failed'
sys.exit(1)
for x in range(20):
print 'Starting BT'
mybt = appd.start_bt('dostuff')
time.sleep(2)
appd.end_bt(mybt)
print 'BT finished'
time.sleep(1)
appd.shutdown()
print 'Bye'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment