Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to put the alert name into the subject of an Ambari Alert

avatar
New Contributor

Hi,

I want to put the alert name in the subject of the email alert

 

I followed the example in https://github.com/apache/ambari/blob/branch-2.1/ambari-server/src/main/resources/alert-templates.xm... but the following does not fill in the  variables and I just the the variable names in the email.

<![CDATA[Ambari: [$alert.getAlertState()]-[$alert.getAlertName()]-[$alert.getAlertText()]]]>

If I use the template as it is, the email populates with the summary variables, ie:

<![CDATA[Alert Summary: OK[$summary.getOkCount()], Warning[$summary.getWarningCount()], Critical[$summary.getCriticalCount()], Unknown[$summary.getUnknownCount()]]]>

Is there a trick to get the subject to show the $alert variables to the subject?

Thanks in advance!

 

Eric

 

1 ACCEPTED SOLUTION

avatar
Master Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
1 REPLY 1

avatar
Master Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login