Tutorial: Configure Apache Ambari email notifications in Azure HDInsight
In this tutorial, you'll configure Apache Ambari email notifications using SendGrid as an example. Apache Ambari simplifies the management and monitoring of an HDInsight cluster by providing an easy to use web UI and REST API. Ambari is included on HDInsight clusters, and is used to monitor the cluster and make configuration changes. SendGrid is a free cloud-based email service that provides reliable transactional email delivery, scalability, and real-time analytics along with flexible APIs that make custom integration easy. Azure customers can unlock 25,000 free emails each month.
SendGrid is not mandatory to configure Apache Ambari email notifications. You can also use other third party email box. For example, outlook, gmail and so on.
In this tutorial, you learn how to:
- Obtain Sendgrid Username
- Configure Apache Ambari email notifications
A SendGrid email account. See How to Send Email Using SendGrid with Azure for instructions.
An HDInsight cluster. See Create Apache Hadoop clusters using the Azure portal.
Users can no logner set passwords for their SendGrid account, so we need use apikey to send email.
Obtain SendGrid apikey
From the Azure portal, navigate to your SendGrid resource.
From the Overview page, click Open SaaS Account on publisher’s site, to go the SendGrid webpage for your account.
From the left menu, navigate to your Settings and then API Keys.
Click Create API Key to create an apikey and copy the apikey as smtp password in later use.
Configure Ambari e-mail notification
From a web browser, navigate to
CLUSTERNAMEis the name of your cluster.
From the Actions drop-down list, select Manage Notifications.
From the Manage Alert Notifications window, select the + icon.
From the Create Alert Notification dialog, provide the following information:
Property Description Name Provide a name for the notification. Groups Configure as desired. Severity Configure as desired. Description Optional. Method Leave at EMAIL. Email To Provide e-mail(s) to receive notifications, separated by a comma. SMTP Server
SMTP Port 25 or 587 (for unencrypted/TLS connections). Email From Provide an email address. The address doesn't need to be authentic. Use authentication Select this check box. Username Use "apikey" directly if using SendGrid Password Provide the password you copied when you created the SendGrid apikey in Azure. Password Confirmation Reenter password. Start TLS Select this check box
Select Save. You'll return to the Manage Alert Notifications window.
From the Manage Alert Notifications window, select Close.
No appropriate protocol error if the TLS checkbox is checked
If you select Start TLS from the Create Alert Notification page, and you receive a "No appropriate protocol" exception in the Ambari server log:
- Go to the Apache Ambari UI.
- Go to Alerts > ManageNotifications > Edit (Edit Notification).
- Select Add Property.
- Add the new property,
mail.smtp.ssl.protocolwith a value of
In this tutorial, you learned how to configure Apache Ambari email notifications using SendGrid. Use the following to learn more about Apache Ambari: