-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51599/
-----------------------------------------------------------
(Updated 九月 3, 2016, 2:36 p.m.)
Review request for Ambari and Jonathan Hurley.
Bugs: AMBARI-18292
https://issues.apache.org/jira/browse/AMBARI-18292
Repository: ambari
Description (updated)
-------
By default, Ambari allow all notifications of all kinds of alert states
(OK,WARNING,CRITICAL,UNKNOWN) to dispatch in script-based alert dispatcher.
However, sometimes we hope to filter notification of some alert states
This patch will resolve this by setting
'notification.dispatch.alert.script.states' in ambari.properties as following:
#Only dispatch WARNING and CRITICAL state notification
notification.dispatch.alert.script.states=WARNING,CRITICAL
If you don't set this property that means all notifications will be dispatched.
I think making the desired alerts notifications configurable may be useful for
Ambari users.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcher.java
907588d
ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcherTest.java
9e0e406
Diff: https://reviews.apache.org/r/51599/diff/
Testing
-------
Tested
Running
org.apache.ambari.server.notifications.dispatchers.AlertScriptDispatcherTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.096 sec - in
Thanks,
yao lei