THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- On the Ambari Server host, browse to
/etc/ambari-server/conf
directory. - Edit the
ambari.properties
file. Add an entry for the location of your new template (that will override the default template).
Code Block alerts.template.file=/foo/var/alert-templates-custom.xml
- Save the file and restart Ambari Server.
...
Example: Modify Alert EMAIL Subject
The following example illustrates how to change the subject line of all outbound email notifications to include a hard coded identifier:
- Download the alert-templates.xml code as your starting point.
- On the Ambari Server, save the template to a location such as
/var/lib/ambari-server/resources/alert-templates-custom.xml
. - Edit the
alert-templates-custom.xml
file and modify the subject link for the<alert-template type="EMAIL">
template:
Code Block <subject> <![CDATA[Petstore Ambari has $summary.getTotalCount() alerts!]]> </subject>
- Save the file.
- Browse to
/etc/ambari-server/conf
directory. - Edit the
ambari.properties
file. Add an entry for the location of your new template file.
Code Block alerts.template.file=/var/lib/ambari-server/resources/alert-templates-custom.xml
- Save the file and restart Ambari Server.