Created on 01-20-2017 01:48 AM - edited 08-19-2019 01:43 AM
My Ambari Alert work ok, But I have problem when I check email on Outlook.
In I have status icon
But when open on outlook, it have only text
Anyone know how to fix this issue ?
Created 01-20-2017 04:10 AM
Notifications generated from Ambari are done so via a template called alert-templates.xml which can be found in /var/lib/ambari-server/resources. This template uses internal CSS to decorate the HTML elements. The version of Outlook you're using may strip out internal (or all) CSS. You will probably need to adjust this XML file to produce HTML which is compatible with the email clients you're using.
It's also possible that inline CSS would work with Outlook but for some reason internal CSS does not. We can certainly looking into changing the styles in a future build of Ambari.
Created 01-20-2017 05:52 AM
Thanks for quick reply
I found folder /var/lib/ambari-server/resources/ but I cannot see any file like alert-templates.xml
my ambari version: 2.4.1.0
my HDP version: 2.5.0.0
Created 01-20-2017 04:02 PM
My apologies - I had forgotten that we don't ship that file anymore. Instead, you need to provide you own and supply it to Ambari via ambari.properties. Please see https://cwiki.apache.org/confluence/display/AMBARI/Customizing+the+Alert+Template
However, you can see the one which we use by default here:
https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/alert-templates.xml
This file uses internal style sheets - Outlook may only like inline styles.
Created 02-01-2017 10:20 PM
I recently had a chance to test this using Outlook 2016 and the emails were displayed correctly. It's possible that it's an issue with your specific version of Outlook or your email provider stripping out CSS.