How to troubleshoot Ambari Alerts Notification
1.Configure sample ambari alert using Ambari UI.
.
2.Login to ambari webui using [admin/admin]
.
3.Click on "Alerts"
.

.
4.Click "Action"-> "Manage Notification"
.

5.Add sample alert for service


.
6. In above example you can use Gmail username and password to test connection.
.
7. After adding sample alert close the screen.
.
8.From the ambari ui now stop one of the zookeeper service
.


.
9.You should be able to see alert indication in ambari ui for the zookeeper service stopped
.

.
10. Same time if you tail for ambari-alerts.log you will be able to see "Connection Failed" log messages for zookeeper service.
.
2016-05-27 14:57:31,541 [CRITICAL] [ZOOKEEPER] [zookeeper_server_process] (ZooKeeper Server Process) Connection failed: [Errno 111] Connection refused to node1.example.com:2181
.
11. Check your email and make sure you receive the alert.
.
12. If you don’t see alerts the enable debugging for Alerts in ambari log4j.properties as shown below.
.
13. Login to ambari server cli using superuser credentials [eg. root]
.
vi /etc/ambari-server/conf/log4j.properties
Modify
- log4j.logger.alerts=INFO,alerts to log4j.logger.alerts=DEBUG,alerts
Add below line to Alerts section -
log4j.logger.org.apache.ambari.server.notifications.dispatchers=DEBUG,alerts
.
14. Save the file and restart ambari server service.
.
15. Try to stop zookeeper on any one of the node and check for the ambari-server.log and amabri-alerts.log.
.
16. You should be able to see the alert logs sent on email via smtp settings you did.
.

