Splunk AppDynamics

What is the Variable name to access the Health Rule condition to add in the Email Template?

Akhil_Pitta
New Member

What is the Variable name to access the Health Rule condition to add in the Email Template?

I want to add the HealthRule Condition(Which we manually write in the Critical/Warning condition) in the email subject.

Labels (3)
Tags (1)
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi @Akhil.Pitta

Thank you for posting your query in the AppDynamics community.

Do refer to Predefined Templating Variables, for detailed instruction on using variables. For Health Rules, you may use `policy` as the Base and `PolicyInfo` as the class. The docs provide the following example: 

Subject: $subject
Body:
...
 <!-- Subject changes dynamically based on the triggering event -->
#set($subject = #foreach(${events} in ${fullEventList}) ${events.eventType} #end )}
...

 Hope it helps. Let us know how it goes.

0 Karma

Akhil_Pitta
New Member

Hi Radhika,

Thanks for the udpate.

But i need the condition name which we enter manually in the Critical Condition Tab of HEalth Rules.

Regards,

Akhiimage.jpeg

0 Karma

Rugved_Sarode
Explorer

Hello,

There is already anenhancement to further expose values under eventMessage variable such as condition, violating values etc.

Currently eventMessage is the only option which is a long string.

You can use split / regex on a string as in the usual java context.

Example-

#set ($summary = ${latestEvent.summaryMessage})
#set ($job = $summary.split(" "))
summary: $summary
Job: $job[2]
Job2: $job.get(2)

This is the sample eventMessage-

AppDynamics has detected a problem with Node nodejs-api-services--9.
Memory utilization is too high started violating and is now critical.
All of the following conditions were found to be violating
For Node nodejs-api-services--9:
1) Hardware Resources|Memory|Used % Condition
Used %'s value 93.00 was greater than the threshold 90.00 for the last 30 minutes

where we have set condition name as "Hardware Resources|Memory|Used %"

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Synthetic Monitoring - Resolved Incident on Detector Alerts

We’ve discovered a bug that affected the auto-clear of Synthetic Detectors in the Splunk Synthetic Monitoring ...

Video | Tom’s Smartness Journey Continues

Remember Splunk Community member Tom Kopchak? If you caught the first episode of our Smartness interview ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud? Learn how unique features like ...