Splunk AppDynamics

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

CommunityUser
Splunk Employee
Splunk Employee

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('http://10.201.51.40:8090','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.

Labels (1)
Tags (1)
0 Karma
1 Solution

CommunityUser
Splunk Employee
Splunk Employee

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

https://stackoverflow.com/questions/44805162/how-to-get-severity-information-for-business-transactio...

Let me know if this helps.

Cody

View solution in original post

CommunityUser
Splunk Employee
Splunk Employee

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

https://stackoverflow.com/questions/44805162/how-to-get-severity-information-for-business-transactio...

Let me know if this helps.

Cody

CommunityUser
Splunk Employee
Splunk Employee

hi 

Get Updates on the Splunk Community!

New This Month - Splunk Observability updates and improvements for faster ...

What’s New? This month, we’re delivering several enhancements across Splunk Observability Cloud for faster and ...

What's New in Splunk Cloud Platform 9.3.2411?

Hey Splunky People! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2411. This release ...

Buttercup Games: Further Dashboarding Techniques (Part 6)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...