<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How to put the alert name into the subject of an Ambari Alert in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-put-the-alert-name-into-the-subject-of-an-Ambari/m-p/352355#M236497</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to put the alert name in the subject of the email alert&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed the example in &lt;A href="https://github.com/apache/ambari/blob/branch-2.1/ambari-server/src/main/resources/alert-templates.xml" target="_blank" rel="noopener"&gt;https://github.com/apache/ambari/blob/branch-2.1/ambari-server/src/main/resources/alert-templates.xml&lt;/A&gt;&amp;nbsp;but the following does not fill in the &amp;nbsp;variables and I just the the variable names in the email.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;![CDATA[Ambari: [$alert.getAlertState()]-[$alert.getAlertName()]-[$alert.getAlertText()]]]&amp;gt;&lt;/PRE&gt;&lt;P&gt;If I use the template as it is, the email populates with the summary variables, ie:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;&amp;lt;![CDATA[&lt;/SPAN&gt;Alert Summary: OK[$summary.getOkCount()], Warning[$summary.getWarningCount()], Critical[$summary.getCriticalCount()], Unknown[$summary.getUnknownCount()]&lt;SPAN class="pl-pds"&gt;]]&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Is there a trick to get the subject to show the $alert variables to the subject?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 16:59:17 GMT</pubDate>
    <dc:creator>Epollard</dc:creator>
    <dc:date>2022-09-15T16:59:17Z</dc:date>
    <item>
      <title>How to put the alert name into the subject of an Ambari Alert</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-put-the-alert-name-into-the-subject-of-an-Ambari/m-p/352355#M236497</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to put the alert name in the subject of the email alert&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed the example in &lt;A href="https://github.com/apache/ambari/blob/branch-2.1/ambari-server/src/main/resources/alert-templates.xml" target="_blank" rel="noopener"&gt;https://github.com/apache/ambari/blob/branch-2.1/ambari-server/src/main/resources/alert-templates.xml&lt;/A&gt;&amp;nbsp;but the following does not fill in the &amp;nbsp;variables and I just the the variable names in the email.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;![CDATA[Ambari: [$alert.getAlertState()]-[$alert.getAlertName()]-[$alert.getAlertText()]]]&amp;gt;&lt;/PRE&gt;&lt;P&gt;If I use the template as it is, the email populates with the summary variables, ie:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;&amp;lt;![CDATA[&lt;/SPAN&gt;Alert Summary: OK[$summary.getOkCount()], Warning[$summary.getWarningCount()], Critical[$summary.getCriticalCount()], Unknown[$summary.getUnknownCount()]&lt;SPAN class="pl-pds"&gt;]]&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Is there a trick to get the subject to show the $alert variables to the subject?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 16:59:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-put-the-alert-name-into-the-subject-of-an-Ambari/m-p/352355#M236497</guid>
      <dc:creator>Epollard</dc:creator>
      <dc:date>2022-09-15T16:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to put the alert name into the subject of an Ambari Alert</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-put-the-alert-name-into-the-subject-of-an-Ambari/m-p/389324#M246956</link>
      <description>&lt;P&gt;1. On the Abari server host, locate the `alert-templates.xml` file. By default, it is located in the `/etc/ambari-server/conf` directory.&lt;BR /&gt;2. Open the `alert-templates.xml` file and search for the `` section.&lt;BR /&gt;3. Within the `` section, locate the `` tag and modify its content.&lt;/P&gt;&lt;P&gt;4. Save the changes to the `alert-templates.xml` file.&lt;BR /&gt;5. Restart Ambari server for the changes to take effec&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 08:16:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-put-the-alert-name-into-the-subject-of-an-Ambari/m-p/389324#M246956</guid>
      <dc:creator>Kartik_Agarwal</dc:creator>
      <dc:date>2024-06-18T08:16:28Z</dc:date>
    </item>
  </channel>
</rss>

