Splunk AppDynamics

How to get the Health Rule name in the email templates using template variables?

Narendra_Reddy1
New Member

Hi,

I would like to use the Email Template for the policies triggered. I want to display the Health Rule name in the email body using template variables. I have read this doc https://docs.appdynamics.com/display/PRO45/Predefined+Templating+Variables but there is no class or base class for Health Rule.

Also, I would like to use the background-color property of HTML in the Email template but it seems like Appdynamics is not recognizing the attribute.

Any help will be appreciated. Thanks in advance

Labels (3)
0 Karma
1 Solution

Haluk_Yaşar_Ero
Path Finder

Hi these variables will work. it is also necessary to use html code for coloring.

Subject : [ ${latestEvent.severity}] -${policy.name}

Application Name : ${latestEvent.application.name}
Tier Name : ${latestEvent.tier.name}
NodeName : ${latestEvent.node.name}
Event : ${latestEvent.displayName}
Event Time : ${action.triggerTime}
Event Url : ${latestEvent.deepLink}
Event Message : ${latestEvent.eventMessage}image.jpeg

View solution in original post

Haluk_Yaşar_Ero
Path Finder

Hi these variables will work. it is also necessary to use html code for coloring.

Subject : [ ${latestEvent.severity}] -${policy.name}

Application Name : ${latestEvent.application.name}
Tier Name : ${latestEvent.tier.name}
NodeName : ${latestEvent.node.name}
Event : ${latestEvent.displayName}
Event Time : ${action.triggerTime}
Event Url : ${latestEvent.deepLink}
Event Message : ${latestEvent.eventMessage}image.jpeg

Gopi_Krishnan
Explorer

Does anyone have a common template which is standard and will work for any health rule?

Regards,

Gopikrishnan

0 Karma

Haluk_Yaşar_Ero
Path Finder

I use this template in all of them. I created  One template for all alerts. However, I think it is necessary to create a separate eum related alerts. Some values ​​do not come.

Gopi_Krishnan
Explorer

Thanks Yasar.

But when the alert gets closed this wont work I guess?

0 Karma

Haluk_Yaşar_Ero
Path Finder

Hi , It will not e-mail when the warning is turned off. For example, I watch 35 applications, I check the status of .net agent and machine agents in all of them. If 1 agent falls to 0, it sends an email about the alarm. If I turn off the alarm, it will not send it. What exactly do you want at this point?

I will try to help if you give details

Gopi_Krishnan
Explorer

So when the agent falls to 0 it will send an email alert saying the agent is down and when the agent is up and running fine will this template send an email that the agent is working fine?

0 Karma

Haluk_Yaşar_Ero
Path Finder

Sure it sends.

Criteria are important when creating the alarm.

It is important to send the representative if it is working or to send it if the representative is not.

I do not use active states in my alarms. When it is at critical or alert level, the alarm sends an e-mail. If it continues, it throws, but I don't select send when the problem is resolved.

Gopi_Krishnan
Explorer

OK Thanks for your help

0 Karma

Oscar_Hopper
Explorer

Here's what I found in works in my environment in my email template:

Health Rule Name:  ${event.healthRule.name}.

Kashinath_Kumbh
New Member

Hi Oscar Wanted to check if this "Health Rule Name:  ${event.healthRule.name}" works with HTTP template also?

0 Karma

Prathamesh_Jos2
Engager

Hi Kashinath,

 

Yes ${latestEvent.healthRule.name} works, I have been using this to fetch health rule name in alerts.

${latestEvent.healthRule.name} works in Subject and body as well.

 

Let me know if you need more details.

 

Regards,

Prathamesh 

0 Karma
Get Updates on the Splunk Community!

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 ...

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...