Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get severity information for Business Transaction Health using AppDynamicsClient Python API


I am trying to show data for Node Health and Business Transaction Health, as displayed in AppDynamics Dashboard like the following :

AppDynamics Dashboard Screenshot

If you check the image severity information like critical, warning, normal etc., I am able to get those info for node health using the following code:

from appd.request import  AppDynamicsClient
app_id =8
c = AppDynamicsClient('','ay312917','appd@123')
healthrule_violations_list =c.get_healthrule_violations(app_id, 'BEFORE_NOW', 15)
for hv in healthrule_violations_list:
    print 'hv severity:',hv._severity

print 'number of healthrule violations:',len(healthrule_violations_list)

Here I am getting the severity information properly. Node Health Output

Similarly, I am trying to get severity information for business transactions as well using the following code:

business_transaction_list = c.get_bt_list(app_id)
for bt in business_transaction_list:
    print 'bt severity:', bt._severity

But I am getting this error :

AttributeError: 'BusinessTransaction' object has no attribute '_severity'

I tried looking into the object using the following code:

print bt.__dict__

and I get the output like the following:

{'name': u'_APPDYNAMICS_DEFAULT_TX_', 'is_background': False, 'internal_name': u'_APPDYNAMICS_DEFAULT_TX_', 'tier_name': u'Microsoft Dynamics CRM/AccountCreation', 'tier_id': 50, 'type': u'POCO', 'id': 685}

I'm not getting anything similar to the severity information.


AppDynamics Team (Retired)

According to this info on Stack Overflow, the severity param is not associated with BTs, so you can't call it that way.


Let me know if this helps.