----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45873/ -----------------------------------------------------------
(Updated Апрель 11, 2016, 3:18 п.п.) Review request for Ambari, Aravindan Vijayan, Jonathan Hurley, and Sid Wagle. Bugs: AMBARI-15766 https://issues.apache.org/jira/browse/AMBARI-15766 Repository: ambari Description ------- There are a few requirements around creating alerts based on the time-series data stored in AMS. They fall in the the general category of: - identify a metrics (name of the metrics, app name) - identify a window (e.g. last 10 minutes, last 1 day) - get the data points - add them up, or - compute average, or - compute standard deviations, or - ... - compare the value to a threshold - emit an alert if needed (WARN, CRITICAL, etc) We should also allow for alerts based on multiple metrics but there is no ask for such a capability. Just something to keep in mind while designing. It seems general enough that we should define an alert type that can be instantiated by services to define specific alerts. Users can add additional alerts if they so choose. Diffs (updated) ----- ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py b84832d ambari-agent/src/main/python/ambari_agent/alerts/ams_alert.py PRE-CREATION ambari-agent/src/main/python/ambari_agent/alerts/metric_alert.py d177bd4 ambari-agent/src/test/python/ambari_agent/TestAlertSchedulerHandler.py f4e7ba1 ambari-agent/src/test/python/ambari_agent/TestAlerts.py 9caee8a ambari-agent/src/test/python/ambari_agent/TestAmsAlert.py PRE-CREATION ambari-common/src/main/python/ambari_commons/aggregate_functions.py PRE-CREATION ambari-common/src/main/python/ambari_commons/firewall.py 64d396b ambari-common/src/main/python/ambari_commons/urllib_handlers.py aa2e3f6 ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinitionFactory.java 1676b53 ambari-server/src/main/java/org/apache/ambari/server/state/alert/AmsSource.java PRE-CREATION ambari-server/src/main/java/org/apache/ambari/server/state/alert/MetricSource.java 2ff438d ambari-server/src/main/java/org/apache/ambari/server/state/alert/SourceType.java 357baf9 ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json 3612de2 ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py 038592f ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java 5dc7f3b Diff: https://reviews.apache.org/r/45873/diff/ Testing ------- Unit tests passed Thanks, Dmytro Sen