<?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 Alert template not displaying information in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Alert-template-not-displaying-information/m-p/150419#M112924</link>
    <description>&lt;P&gt;
	I am trying to modify the template of the alert notification. I see in the template code it tries to display ambari url but it never displays that. 
	

	The lower end of the template reads like &lt;/P&gt;&lt;PRE&gt;&amp;lt;div class="ambari-footer"&amp;gt;
    This notification was sent to $dispatch.getTargetName()
    &amp;lt;br/&amp;gt;
    Apache Ambari $ambari.getServerVersion()
    #if( $ambari.hasUrl() )
    &amp;lt;br/&amp;gt;
    Ambari Server link: &amp;lt;a href=$ambari.getUrl()&amp;gt;$ambari.getUrl()&amp;lt;/a&amp;gt;
    #end
  &amp;lt;/div&amp;gt;
&amp;lt;/html&amp;gt;
      ]]&amp;gt;
    &amp;lt;/body&amp;gt;&lt;/PRE&gt;&lt;P&gt;
	  But I think method &lt;/P&gt;&lt;PRE&gt;ambari.hasUrl()&lt;/PRE&gt;&lt;P&gt;is always false. I tried printing the &lt;/P&gt;&lt;PRE&gt;$ambari.getUrl()&lt;/PRE&gt;&lt;P&gt;but it displays as it is. In the emails I see "$ambari.getUrl()". I checked the code &lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/apache/ambari/blob/71a1f7e0e5985b1a77bf09b976ebda3ab3fdbbf5/ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java" target="_blank"&gt;https://github.com/apache/ambari/blob/71a1f7e0e5985b1a77bf09b976ebda3ab3fdbbf5/ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;@Inject
private Configuration m_configuration;&lt;/PRE&gt;&lt;P&gt;I am not sure from where it is getting injected from. Any suggestions why ambari url is not coming in the configs.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jun 2016 04:31:39 GMT</pubDate>
    <dc:creator>amey_jain</dc:creator>
    <dc:date>2016-06-22T04:31:39Z</dc:date>
    <item>
      <title>Alert template not displaying information</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Alert-template-not-displaying-information/m-p/150419#M112924</link>
      <description>&lt;P&gt;
	I am trying to modify the template of the alert notification. I see in the template code it tries to display ambari url but it never displays that. 
	

	The lower end of the template reads like &lt;/P&gt;&lt;PRE&gt;&amp;lt;div class="ambari-footer"&amp;gt;
    This notification was sent to $dispatch.getTargetName()
    &amp;lt;br/&amp;gt;
    Apache Ambari $ambari.getServerVersion()
    #if( $ambari.hasUrl() )
    &amp;lt;br/&amp;gt;
    Ambari Server link: &amp;lt;a href=$ambari.getUrl()&amp;gt;$ambari.getUrl()&amp;lt;/a&amp;gt;
    #end
  &amp;lt;/div&amp;gt;
&amp;lt;/html&amp;gt;
      ]]&amp;gt;
    &amp;lt;/body&amp;gt;&lt;/PRE&gt;&lt;P&gt;
	  But I think method &lt;/P&gt;&lt;PRE&gt;ambari.hasUrl()&lt;/PRE&gt;&lt;P&gt;is always false. I tried printing the &lt;/P&gt;&lt;PRE&gt;$ambari.getUrl()&lt;/PRE&gt;&lt;P&gt;but it displays as it is. In the emails I see "$ambari.getUrl()". I checked the code &lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/apache/ambari/blob/71a1f7e0e5985b1a77bf09b976ebda3ab3fdbbf5/ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java" target="_blank"&gt;https://github.com/apache/ambari/blob/71a1f7e0e5985b1a77bf09b976ebda3ab3fdbbf5/ambari-server/src/main/java/org/apache/ambari/server/state/services/AlertNoticeDispatchService.java&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;@Inject
private Configuration m_configuration;&lt;/PRE&gt;&lt;P&gt;I am not sure from where it is getting injected from. Any suggestions why ambari url is not coming in the configs.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 04:31:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Alert-template-not-displaying-information/m-p/150419#M112924</guid>
      <dc:creator>amey_jain</dc:creator>
      <dc:date>2016-06-22T04:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Alert template not displaying information</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Alert-template-not-displaying-information/m-p/150420#M112925</link>
      <description>&lt;P&gt;It needs to take a static value from the /etc/ambari-server/conf/ambari.properties file. You need to add this and restart:&lt;/P&gt;&lt;PRE&gt;ambari.display.url = &lt;A href="http://www.myserver.com" target="_blank"&gt;http://www.myserver.com&lt;/A&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jun 2016 05:19:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Alert-template-not-displaying-information/m-p/150420#M112925</guid>
      <dc:creator>jonathanhurley</dc:creator>
      <dc:date>2016-06-22T05:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Alert template not displaying information</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Alert-template-not-displaying-information/m-p/150421#M112926</link>
      <description>&lt;P&gt;I added &lt;/P&gt;&lt;P&gt;ambari.display.url = &lt;A href="http://100.123.123.123:8080"&gt;http://100.123.123.123:8080&lt;/A&gt; in properties file&lt;/P&gt;&lt;P&gt;but I still dont see ambari url in the email. I manually added &lt;/P&gt;&lt;P&gt;$ambari.getUrl() but it gets in the email as it is. Any other thing that I can do?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 06:08:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Alert-template-not-displaying-information/m-p/150421#M112926</guid>
      <dc:creator>amey_jain</dc:creator>
      <dc:date>2016-06-22T06:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Alert template not displaying information</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Alert-template-not-displaying-information/m-p/150422#M112927</link>
      <description>&lt;P&gt;Got it. Tried it on a different cluster and this is working&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 09:11:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Alert-template-not-displaying-information/m-p/150422#M112927</guid>
      <dc:creator>amey_jain</dc:creator>
      <dc:date>2016-06-22T09:11:32Z</dc:date>
    </item>
  </channel>
</rss>

